foodsoft/app/views/shared/_user_form_fields.html.haml
2013-04-08 15:08:57 +02:00

15 lines
581 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}]"}
= 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]