Admin/users refactored.
This commit is contained in:
parent
ea6348bc5c
commit
a787b3cf24
10 changed files with 100 additions and 99 deletions
13
app/views/shared/_user_form_fields.html.haml
Normal file
13
app/views/shared/_user_form_fields.html.haml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
= f.input :nick
|
||||
= f.input :first_name
|
||||
= f.input :last_name
|
||||
= f.input :email
|
||||
= f.input :phone
|
||||
= f.input :password
|
||||
= f.input :password_confirmation
|
||||
- for setting in User::setting_keys.keys
|
||||
.input.boolean
|
||||
= check_box_tag "user[setting_attributes][#{setting}]",
|
||||
'1', @user.settings[setting] == '1' || @user.settings_default(setting),
|
||||
:class => 'boolean'
|
||||
%label.boolean{:for => "user[setting_attributes][#{setting}]"}= h User::setting_keys[setting]
|
||||
Loading…
Add table
Add a link
Reference in a new issue