foodsoft/app/views/shared/_user_form_fields.html.haml

14 lines
510 B
Text

= f.input :nick
= f.input :first_name
= f.input :last_name
= f.input :email
= f.input :phone
= f.input :password, :required => f.object.new_record?
= f.input :password_confirmation
.control-group
.controls
- for setting in User::setting_keys.keys
%label.checkbox{:for => "user[setting_attributes][#{setting}]"}
= check_box_tag "user[setting_attributes][#{setting}]", '1',
f.object.settings[setting] == '1' || f.object.settings_default(setting)
= User::setting_keys[setting]