2011-10-08 17:36:38 -04:00
|
|
|
.user_new
|
2014-06-03 06:05:06 -04:00
|
|
|
= form_for [:admin, @user], html: { class: 'form-horizontal fieldset-form' } do |f|
|
2016-04-04 21:25:38 -04:00
|
|
|
= form_errors(@user)
|
2011-10-08 17:36:38 -04:00
|
|
|
|
2012-11-27 01:31:15 -05:00
|
|
|
%fieldset
|
|
|
|
%legend Account
|
2013-12-30 18:27:02 -05:00
|
|
|
.form-group
|
2014-01-10 07:39:45 -05:00
|
|
|
= f.label :name, class: 'control-label'
|
2013-12-30 18:27:02 -05:00
|
|
|
.col-sm-10
|
2016-04-14 14:32:33 -04:00
|
|
|
= f.text_field :name, required: true, autocomplete: 'off', class: 'form-control'
|
2012-11-27 01:31:15 -05:00
|
|
|
%span.help-inline * required
|
2013-12-30 18:27:02 -05:00
|
|
|
.form-group
|
2014-01-10 07:39:45 -05:00
|
|
|
= f.label :username, class: 'control-label'
|
2013-12-30 18:27:02 -05:00
|
|
|
.col-sm-10
|
2016-04-14 14:32:33 -04:00
|
|
|
= f.text_field :username, required: true, autocomplete: 'off', autocorrect: 'off', autocapitalize: 'off', spellcheck: false, class: 'form-control'
|
2012-11-27 01:31:15 -05:00
|
|
|
%span.help-inline * required
|
2013-12-30 18:27:02 -05:00
|
|
|
.form-group
|
2014-01-10 07:39:45 -05:00
|
|
|
= f.label :email, class: 'control-label'
|
2013-12-30 18:27:02 -05:00
|
|
|
.col-sm-10
|
2016-04-14 14:32:33 -04:00
|
|
|
= f.text_field :email, required: true, autocomplete: 'off', class: 'form-control'
|
2012-11-27 01:31:15 -05:00
|
|
|
%span.help-inline * required
|
2012-11-23 01:11:09 -05:00
|
|
|
|
2013-06-26 08:57:02 -04:00
|
|
|
- if @user.new_record?
|
2013-06-13 14:06:27 -04:00
|
|
|
%fieldset
|
|
|
|
%legend Password
|
2013-12-30 18:27:02 -05:00
|
|
|
.form-group
|
2014-01-10 07:39:45 -05:00
|
|
|
= f.label :password, class: 'control-label'
|
2013-12-30 18:27:02 -05:00
|
|
|
.col-sm-10
|
2013-06-13 14:06:27 -04:00
|
|
|
%strong
|
2014-07-17 08:03:17 -04:00
|
|
|
Reset link will be generated and sent to the user.
|
2013-06-13 14:06:27 -04:00
|
|
|
%br
|
2014-07-17 08:03:17 -04:00
|
|
|
User will be forced to set the password on first sign in.
|
2013-06-13 14:06:27 -04:00
|
|
|
- else
|
|
|
|
%fieldset
|
|
|
|
%legend Password
|
2013-12-30 18:27:02 -05:00
|
|
|
.form-group
|
2014-01-10 07:39:45 -05:00
|
|
|
= f.label :password, class: 'control-label'
|
|
|
|
.col-sm-10= f.password_field :password, disabled: f.object.force_random_password, class: 'form-control'
|
2013-12-30 18:27:02 -05:00
|
|
|
.form-group
|
2014-01-10 07:39:45 -05:00
|
|
|
= f.label :password_confirmation, class: 'control-label'
|
|
|
|
.col-sm-10= f.password_field :password_confirmation, disabled: f.object.force_random_password, class: 'form-control'
|
2012-11-27 01:31:15 -05:00
|
|
|
|
2017-02-06 11:58:05 -05:00
|
|
|
= render partial: 'access_levels', locals: { f: f }
|
2016-03-10 16:08:11 -05:00
|
|
|
|
2012-11-27 01:31:15 -05:00
|
|
|
%fieldset
|
|
|
|
%legend Profile
|
2014-06-03 06:05:06 -04:00
|
|
|
.form-group
|
|
|
|
= f.label :avatar, class: 'control-label'
|
|
|
|
.col-sm-10
|
|
|
|
= f.file_field :avatar
|
|
|
|
|
2013-12-30 18:27:02 -05:00
|
|
|
.form-group
|
2014-01-10 07:39:45 -05:00
|
|
|
= f.label :skype, class: 'control-label'
|
|
|
|
.col-sm-10= f.text_field :skype, class: 'form-control'
|
2013-12-30 18:27:02 -05:00
|
|
|
.form-group
|
2014-01-10 07:39:45 -05:00
|
|
|
= f.label :linkedin, class: 'control-label'
|
|
|
|
.col-sm-10= f.text_field :linkedin, class: 'form-control'
|
2013-12-30 18:27:02 -05:00
|
|
|
.form-group
|
2014-01-10 07:39:45 -05:00
|
|
|
= f.label :twitter, class: 'control-label'
|
|
|
|
.col-sm-10= f.text_field :twitter, class: 'form-control'
|
2014-01-18 14:07:00 -05:00
|
|
|
.form-group
|
2014-01-20 08:05:19 -05:00
|
|
|
= f.label :website_url, 'Website', class: 'control-label'
|
2014-01-18 14:07:00 -05:00
|
|
|
.col-sm-10= f.text_field :website_url, class: 'form-control'
|
2012-08-25 13:31:19 -04:00
|
|
|
|
2013-08-07 16:35:24 -04:00
|
|
|
.form-actions
|
2013-06-26 08:57:02 -04:00
|
|
|
- if @user.new_record?
|
2013-04-18 10:28:09 -04:00
|
|
|
= f.submit 'Create user', class: "btn btn-create"
|
2013-01-29 15:18:19 -05:00
|
|
|
= link_to 'Cancel', admin_users_path, class: "btn btn-cancel"
|
2012-04-17 21:34:14 -04:00
|
|
|
- else
|
2013-04-18 10:28:09 -04:00
|
|
|
= f.submit 'Save changes', class: "btn btn-save"
|
2013-06-26 08:57:02 -04:00
|
|
|
= link_to 'Cancel', admin_user_path(@user), class: "btn btn-cancel"
|