Also fill out _consfirm input box with existing value.
This commit is contained in:
parent
88340ce77c
commit
54f36bcf0d
1 changed files with 6 additions and 1 deletions
|
@ -29,9 +29,14 @@ class App.ControllerForm extends App.Controller
|
||||||
# if password, add confirm password item
|
# if password, add confirm password item
|
||||||
if attribute.type is 'password'
|
if attribute.type is 'password'
|
||||||
|
|
||||||
|
# get existing value, if exists
|
||||||
|
if @params
|
||||||
|
if attribute.name of @params
|
||||||
|
attribute.value = @params[attribute.name]
|
||||||
|
|
||||||
|
# rename display and name to _confirm
|
||||||
attribute.display = attribute.display + ' (confirm)'
|
attribute.display = attribute.display + ' (confirm)'
|
||||||
attribute.name = attribute.name + '_confirm';
|
attribute.name = attribute.name + '_confirm';
|
||||||
|
|
||||||
item = @formGenItem( attribute, @model.className, fieldset )
|
item = @formGenItem( attribute, @model.className, fieldset )
|
||||||
item.appendTo(fieldset)
|
item.appendTo(fieldset)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue