Also fill out _consfirm input box with existing value.

This commit is contained in:
Martin Edenhofer 2012-10-31 11:44:20 +01:00
parent 88340ce77c
commit 54f36bcf0d

View file

@ -29,9 +29,14 @@ class App.ControllerForm extends App.Controller
# if password, add confirm password item
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.name = attribute.name + '_confirm';
item = @formGenItem( attribute, @model.className, fieldset )
item.appendTo(fieldset)