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

16 lines
581 B
Text
Raw Normal View History

2011-06-09 22:03:27 +02:00
= 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?
2011-06-09 22:03:27 +02:00
= f.input :password_confirmation
.control-group
.controls
- for setting in User::setting_keys.keys
%label.checkbox{:for => "user[setting_attributes][#{setting}]"}
= hidden_field_tag "user[setting_attributes][#{setting}]", '0'
= check_box_tag "user[setting_attributes][#{setting}]", '1',
f.object.settings[setting] == '1' || f.object.settings_default(setting)
= User::setting_keys[setting]