internetee-registry/app/views/admin/admin_users/_form.haml
2015-04-21 11:00:57 +03:00

43 lines
1.4 KiB
Text

= form_for([:admin, @admin_user], html: { class: 'form-horizontal' }) do |f|
= render 'shared/full_errors', object: @admin_user
.row
.col-md-8
.form-group
.col-md-4.control-label
= f.label :username
.col-md-8
= f.text_field(:username, class: 'form-control')
.form-group
.col-md-4.control-label
= f.label :password
.col-md-8
= f.text_field(:password, class: 'form-control')
%hr
.form-group
.col-md-4.control-label
= f.label :identity_code
.col-md-8
= f.text_field(:identity_code, class: 'form-control')
.form-group
.col-md-4.control-label
= f.label :email
.col-md-8
= f.text_field(:email, class: 'form-control', email: true)
.form-group
.col-md-4.control-label
= f.label :country_code, t(:country)
.col-md-8
= f.select(:country_code,
SortedCountry.all_options(f.object.country_code), {}, class: 'form-control')
%hr
.form-group
.col-md-4.control-label
= f.label :role
.col-md-8
= select_tag 'admin_user[roles][]', options_for_select(AdminUser::ROLES.map {|x| [t(x), x] }, @admin_user.roles.try(:first)), class: 'form-control selectize'
%hr
.row
.col-md-8.text-right
= button_tag(t(:save), class: 'btn btn-primary')