2011-10-08 21:36:38 +00:00
.user_new
2013-06-26 12:57:02 +00:00
= form_for [:admin, @user] do |f|
-if @user.errors.any?
2011-10-08 21:36:38 +00:00
#error_explanation
2013-12-31 14:34:14 +00:00
%ul.unstyled.alert.alert-danger
2013-06-26 12:57:02 +00:00
- @user.errors.full_messages.each do |msg|
2011-10-08 21:36:38 +00:00
%li= msg
2012-11-27 06:31:15 +00:00
%fieldset
%legend Account
2013-12-30 23:27:02 +00:00
.form-group
2012-11-27 06:31:15 +00:00
= f.label :name
2013-12-30 23:27:02 +00:00
.col-sm-10
2013-02-06 14:26:46 +00:00
= f.text_field :name, required: true, autocomplete: "off"
2012-11-27 06:31:15 +00:00
%span.help-inline * required
2013-12-30 23:27:02 +00:00
.form-group
2012-11-27 06:31:15 +00:00
= f.label :username
2013-12-30 23:27:02 +00:00
.col-sm-10
2013-02-06 14:26:46 +00:00
= f.text_field :username, required: true, autocomplete: "off"
2012-11-27 06:31:15 +00:00
%span.help-inline * required
2013-12-30 23:27:02 +00:00
.form-group
2012-11-27 06:31:15 +00:00
= f.label :email
2013-12-30 23:27:02 +00:00
.col-sm-10
2013-02-06 14:27:09 +00:00
= f.text_field :email, required: true, autocomplete: "off"
2012-11-27 06:31:15 +00:00
%span.help-inline * required
2012-11-23 06:11:09 +00:00
2013-06-26 12:57:02 +00:00
- if @user.new_record?
2013-06-13 18:06:27 +00:00
%fieldset
%legend Password
2013-12-30 23:27:02 +00:00
.form-group
2013-06-13 18:06:27 +00:00
= f.label :password
2013-12-30 23:27:02 +00:00
.col-sm-10
2013-06-13 18:06:27 +00:00
%strong
A temporary password will be generated and sent to user.
%br
User will be forced to change it after first sign in
- else
%fieldset
%legend Password
2013-12-30 23:27:02 +00:00
.form-group
2013-06-13 18:06:27 +00:00
= f.label :password
2013-12-30 23:27:02 +00:00
.col-sm-10= f.password_field :password, disabled: f.object.force_random_password
.form-group
2013-06-13 18:06:27 +00:00
= f.label :password_confirmation
2013-12-30 23:27:02 +00:00
.col-sm-10= f.password_field :password_confirmation, disabled: f.object.force_random_password
2012-11-27 06:31:15 +00:00
%fieldset
%legend Access
.row
2013-12-30 21:55:15 +00:00
.col-md-8
2013-12-30 23:27:02 +00:00
.form-group
2012-08-25 17:31:19 +00:00
= f.label :projects_limit
2013-12-30 23:27:02 +00:00
.col-sm-10= f.number_field :projects_limit
2011-10-19 22:34:05 +00:00
2013-12-30 23:27:02 +00:00
.form-group
2013-01-25 09:30:49 +00:00
= f.label :can_create_group
2013-12-30 23:27:02 +00:00
.col-sm-10= f.check_box :can_create_group
2013-01-25 09:30:49 +00:00
2013-12-30 23:27:02 +00:00
.form-group
2012-08-25 17:31:19 +00:00
= f.label :admin do
%strong.cred Administrator
2013-12-30 23:27:02 +00:00
.col-sm-10= f.check_box :admin
2013-12-30 21:55:15 +00:00
.col-md-4
2013-06-26 12:57:02 +00:00
- unless @user.new_record?
2013-12-31 14:34:14 +00:00
.alert.alert-danger
2013-06-26 12:57:02 +00:00
- if @user.blocked?
2012-11-27 06:31:15 +00:00
%p This user is blocked and is not able to login to GitLab
2013-06-26 12:57:02 +00:00
= link_to 'Unblock User', unblock_admin_user_path(@user), method: :put, class: "btn btn-small"
2012-08-25 17:31:19 +00:00
- else
2012-11-27 06:31:15 +00:00
%p Blocked users will be removed from all projects & will not be able to login to GitLab.
2013-12-10 19:33:21 +00:00
= link_to 'Block User', block_admin_user_path(@user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-small btn-remove"
2012-11-27 06:31:15 +00:00
%fieldset
%legend Profile
2013-12-30 23:27:02 +00:00
.form-group
2012-11-27 06:31:15 +00:00
= f.label :skype
2013-12-30 23:27:02 +00:00
.col-sm-10= f.text_field :skype
.form-group
2012-11-27 06:31:15 +00:00
= f.label :linkedin
2013-12-30 23:27:02 +00:00
.col-sm-10= f.text_field :linkedin
.form-group
2012-11-27 06:31:15 +00:00
= f.label :twitter
2013-12-30 23:27:02 +00:00
.col-sm-10= f.text_field :twitter
2012-08-25 17:31:19 +00:00
2013-08-07 20:35:24 +00:00
.form-actions
2013-06-26 12:57:02 +00:00
- if @user.new_record?
2013-04-18 14:28:09 +00:00
= f.submit 'Create user', class: "btn btn-create"
2013-01-29 20:18:19 +00:00
= link_to 'Cancel', admin_users_path, class: "btn btn-cancel"
2012-04-18 01:34:14 +00:00
- else
2013-04-18 14:28:09 +00:00
= f.submit 'Save changes', class: "btn btn-save"
2013-06-26 12:57:02 +00:00
= link_to 'Cancel', admin_user_path(@user), class: "btn btn-cancel"