Refactor user to admin and api user

This commit is contained in:
Martin Lensment 2015-02-13 16:17:06 +02:00
parent f3215680d5
commit 037cb57e00
34 changed files with 551 additions and 551 deletions

View file

@ -0,0 +1,35 @@
= form_for([:admin, @admin_user]) do |f|
- if @admin_user.errors.any?
- @admin_user.errors.each do |attr, err|
= err
%br
- if @admin_user.errors.any?
%hr
.row
.col-md-6
.form-group
= f.label :username
= f.text_field(:username, class: 'form-control')
.form-group
= f.label :password
= f.text_field(:password, class: 'form-control')
.form-group
= f.label :country_code
= f.text_field :country_code, class: 'form-control'
.form-group
= f.label :identity_code
= f.text_field(:identity_code, class: 'form-control')
.col-md-6
.form-group
= f.label :email
= f.text_field(:email, class: 'form-control')
.form-group
= f.label :role
= 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-12.text-right
= button_tag(t('save'), class: 'btn btn-primary')