2011-10-08 23:36:38 +02:00
|
|
|
.user_new
|
|
|
|
= form_for [:admin, @admin_user] do |f|
|
|
|
|
-if @admin_user.errors.any?
|
|
|
|
#error_explanation
|
|
|
|
%ul
|
|
|
|
- @admin_user.errors.full_messages.each do |msg|
|
|
|
|
%li= msg
|
|
|
|
|
2012-04-16 22:33:03 +02:00
|
|
|
.row
|
|
|
|
.span6
|
|
|
|
.clearfix
|
|
|
|
= f.label :name
|
|
|
|
.input
|
|
|
|
= f.text_field :name
|
2012-04-18 03:34:14 +02:00
|
|
|
%span.help-inline * required
|
2012-04-16 22:33:03 +02:00
|
|
|
.clearfix
|
|
|
|
= f.label :email
|
|
|
|
.input
|
|
|
|
= f.text_field :email
|
2012-04-18 03:34:14 +02:00
|
|
|
%span.help-inline * required
|
2012-06-26 23:59:08 +02:00
|
|
|
%hr
|
|
|
|
|
|
|
|
-if f.object.new_record?
|
|
|
|
.clearfix
|
2012-08-11 00:07:50 +02:00
|
|
|
= f.label :admin, class: "checkbox" do
|
2012-06-27 00:55:54 +02:00
|
|
|
= f.check_box :force_random_password, {}, true, nil
|
2012-06-26 23:59:08 +02:00
|
|
|
%span Generate random password
|
|
|
|
|
|
|
|
%div.password-fields
|
|
|
|
.clearfix
|
|
|
|
= f.label :password
|
2012-08-11 00:07:50 +02:00
|
|
|
.input= f.password_field :password, disabled: f.object.force_random_password
|
2012-06-26 23:59:08 +02:00
|
|
|
.clearfix
|
|
|
|
= f.label :password_confirmation
|
2012-08-11 00:07:50 +02:00
|
|
|
.input= f.password_field :password_confirmation, disabled: f.object.force_random_password
|
2012-04-16 22:33:03 +02:00
|
|
|
%hr
|
|
|
|
.clearfix
|
|
|
|
= f.label :skype
|
|
|
|
.input= f.text_field :skype
|
|
|
|
.clearfix
|
|
|
|
= f.label :linkedin
|
|
|
|
.input= f.text_field :linkedin
|
|
|
|
.clearfix
|
|
|
|
= f.label :twitter
|
|
|
|
.input= f.text_field :twitter
|
|
|
|
.span6
|
|
|
|
.clearfix
|
|
|
|
= f.label :projects_limit
|
2012-08-11 00:07:50 +02:00
|
|
|
.input= f.text_field :projects_limit, class: "small_input"
|
2011-10-20 00:34:05 +02:00
|
|
|
|
2012-04-16 22:33:03 +02:00
|
|
|
.alert
|
|
|
|
.clearfix
|
2012-07-18 01:11:51 +02:00
|
|
|
%p Make the user a GitLab administrator.
|
2012-08-11 00:07:50 +02:00
|
|
|
= f.label :admin, class: "checkbox" do
|
2012-04-16 22:33:03 +02:00
|
|
|
= f.check_box :admin
|
|
|
|
%span Administrator
|
2012-04-18 03:34:14 +02:00
|
|
|
- unless @admin_user.new_record?
|
2012-04-16 22:33:03 +02:00
|
|
|
.alert.alert-error
|
|
|
|
- if @admin_user.blocked
|
|
|
|
%span
|
2012-08-11 00:07:50 +02:00
|
|
|
= link_to 'Unblock', unblock_admin_user_path(@admin_user), method: :put, class: "btn small"
|
2012-07-18 01:11:51 +02:00
|
|
|
This user is blocked and is not able to login to GitLab
|
2012-04-16 22:33:03 +02:00
|
|
|
- else
|
|
|
|
%span
|
2012-08-11 00:07:50 +02:00
|
|
|
= link_to 'Block', block_admin_user_path(@admin_user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn small danger"
|
2012-07-18 01:11:51 +02:00
|
|
|
Blocked users will be removed from all projects & will not be able to login to GitLab.
|
2011-10-08 23:36:38 +02:00
|
|
|
.actions
|
2012-08-11 00:07:50 +02:00
|
|
|
= f.submit 'Save', class: "btn primary"
|
2012-04-18 03:34:14 +02:00
|
|
|
- if @admin_user.new_record?
|
2012-08-11 00:07:50 +02:00
|
|
|
= link_to 'Cancel', admin_users_path, class: "btn"
|
2012-04-18 03:34:14 +02:00
|
|
|
- else
|
2012-08-11 00:07:50 +02:00
|
|
|
= link_to 'Cancel', admin_user_path(@admin_user), class: "btn"
|