Improved merge dialog (increased width and prevent submit bubbling).

This commit is contained in:
Martin Edenhofer 2016-12-15 08:38:57 +01:00
parent b19e54b3f4
commit 1962bb9b98
2 changed files with 8 additions and 1 deletions

View file

@ -813,6 +813,7 @@ class App.ControllerModal extends App.Controller
@onCancel(e)
submit: (e) =>
e.stopPropagation()
e.preventDefault()
@onSubmit(e)

View file

@ -3,6 +3,7 @@ class App.TicketMerge extends App.ControllerModal
buttonCancel: true
buttonSubmit: true
head: 'Merge'
large: true
shown: false
constructor: ->
@ -56,11 +57,16 @@ class App.TicketMerge extends App.ControllerModal
@formDisable(e)
params = @formParam(e.target)
if !params.master_ticket_number
alert(App.i18n.translateInline('%s required!', 'Ticket#'))
@formEnable(e)
return
# merge tickets
@ajax(
id: 'ticket_merge'
type: 'GET'
url: "#{@apiPath}/ticket_merge/#{@ticket.id}/#{params['master_ticket_number']}"
url: "#{@apiPath}/ticket_merge/#{@ticket.id}/#{params.master_ticket_number}"
processData: true,
success: (data, status, xhr) =>