Replace while form-group, not only form-group control.
This commit is contained in:
parent
f326fb12f6
commit
bbfbe036d6
3 changed files with 3 additions and 6 deletions
|
@ -210,7 +210,6 @@ class App.TicketCreate extends App.Controller
|
|||
# find element to replace
|
||||
for item in attributes
|
||||
if item.name is fieldNameToChange
|
||||
item.display = false
|
||||
item['filter'] = {}
|
||||
item['filter'][ fieldNameToChange ] = filter
|
||||
item.default = params[item.name]
|
||||
|
@ -219,7 +218,7 @@ class App.TicketCreate extends App.Controller
|
|||
newElement = ui.formGenItem( item, classname, form )
|
||||
|
||||
# replace new option list
|
||||
form.find('[name="' + fieldNameToChange + '"]').replaceWith( newElement )
|
||||
form.find('[name="' + fieldNameToChange + '"]').closest('.form-group').replaceWith( newElement )
|
||||
|
||||
new App.ControllerForm(
|
||||
el: @el.find('.ticket-form-top')
|
||||
|
|
|
@ -77,7 +77,6 @@ class Index extends App.ControllerContent
|
|||
# find element to replace
|
||||
for item in attributes
|
||||
if item.name is fieldNameToChange
|
||||
item.display = false
|
||||
item['filter'] = {}
|
||||
item['filter'][ fieldNameToChange ] = filter
|
||||
item.default = params[item.name]
|
||||
|
@ -86,7 +85,7 @@ class Index extends App.ControllerContent
|
|||
newElement = ui.formGenItem( item, classname, form )
|
||||
|
||||
# replace new option list
|
||||
form.find('[name="' + fieldNameToChange + '"]').replaceWith( newElement )
|
||||
form.find('[name="' + fieldNameToChange + '"]').closest('.form-group').replaceWith( newElement )
|
||||
|
||||
@html App.view('customer_ticket_create')( head: 'New Ticket' )
|
||||
|
||||
|
|
|
@ -202,7 +202,6 @@ class App.TicketZoom extends App.Controller
|
|||
# find element to replace
|
||||
for item in attributes
|
||||
if item.name is fieldNameToChange
|
||||
item.display = false
|
||||
item['filter'] = {}
|
||||
item['filter'][ fieldNameToChange ] = filter
|
||||
item.default = params[item.name]
|
||||
|
@ -211,7 +210,7 @@ class App.TicketZoom extends App.Controller
|
|||
newElement = ui.formGenItem( item, classname, form )
|
||||
|
||||
# replace new option list
|
||||
form.find('[name="' + fieldNameToChange + '"]').replaceWith( newElement )
|
||||
form.find('[name="' + fieldNameToChange + '"]').closest('.form-group').replaceWith( newElement )
|
||||
|
||||
defaults = ticket.attributes()
|
||||
task_state = @taskGet('ticket')
|
||||
|
|
Loading…
Reference in a new issue