rosa-build/app/views/users/base/_form.html.haml

42 lines
1.7 KiB
Plaintext
Raw Normal View History

- if current_user.admin?
2014-01-21 04:51:49 +00:00
.leftlist= f.label :role, t("activerecord.attributes.user.role"), class: :label
.rightlist= f.select :role, User::ROLES, {}, {name: 'role'}
- if @user.new_record?
.leftlist= f.label :uname, t("activerecord.attributes.user.uname")
.rightlist= f.text_field :uname
.leftlist= f.label :password, t("activerecord.attributes.user.password")
.rightlist= f.password_field :password
.both
.leftlist= f.label :password_confirmation, t("activerecord.attributes.user.password_confirm")
.rightlist= f.password_field :password_confirmation
.both
.leftlist= f.label :name, t("activerecord.attributes.user.name")
.rightlist= f.text_field :name
.both
.leftlist= f.label :email, t("activerecord.attributes.user.email")
.rightlist= f.text_field :email
.both
.leftlist= f.label :site, t("activerecord.attributes.user.site")
.rightlist= f.text_field :site
.both
.leftlist= f.label :language, t("activerecord.attributes.user.language")
.rightlist= f.select :language, User::LANGUAGES_FOR_SELECT
.both
.leftlist= f.label :company, t("activerecord.attributes.user.company")
.rightlist= f.text_field :company
.both
.leftlist= f.label :location, t("activerecord.attributes.user.location")
.rightlist= f.text_field :location
.both
2014-01-21 04:51:49 +00:00
= render 'shared/avatar_form', subject: @user, f: f
.leftlist= f.label :professional_experience, t("activerecord.attributes.user.professional_experience")
.rightlist= f.text_area :professional_experience
.both
.leftlist= f.label :sound_notifications, t("activerecord.attributes.user.sound_notifications")
.rightlist= f.check_box :sound_notifications
.both
.leftlist
\ 
2014-01-21 04:51:49 +00:00
.rightlist= submit_tag t('layout.save'), data: {'disable-with' => t('layout.saving')}
.both