2011-10-08 23:36:38 +02:00
|
|
|
.user_new
|
|
|
|
= form_for [:admin, @admin_user] do |f|
|
|
|
|
-if @admin_user.errors.any?
|
|
|
|
#error_explanation
|
2012-08-25 19:31:19 +02:00
|
|
|
%ul.unstyled.alert.alert-error
|
2011-10-08 23:36:38 +02:00
|
|
|
- @admin_user.errors.full_messages.each do |msg|
|
|
|
|
%li= msg
|
|
|
|
|
2012-11-27 07:31:15 +01:00
|
|
|
%fieldset
|
|
|
|
%legend Account
|
|
|
|
.clearfix
|
|
|
|
= f.label :name
|
|
|
|
.input
|
|
|
|
= f.text_field :name, required: true
|
|
|
|
%span.help-inline * required
|
|
|
|
.clearfix
|
|
|
|
= f.label :username
|
|
|
|
.input
|
|
|
|
= f.text_field :username, required: true
|
|
|
|
%span.help-inline * required
|
|
|
|
.clearfix
|
|
|
|
= f.label :email
|
|
|
|
.input
|
|
|
|
= f.text_field :email, required: true
|
|
|
|
%span.help-inline * required
|
2012-11-23 07:11:09 +01:00
|
|
|
|
2012-11-27 07:31:15 +01:00
|
|
|
%fieldset
|
|
|
|
%legend Password
|
|
|
|
.clearfix
|
|
|
|
= f.label :password
|
|
|
|
.input= f.password_field :password, disabled: f.object.force_random_password
|
|
|
|
.clearfix
|
|
|
|
= f.label :password_confirmation
|
|
|
|
.input= f.password_field :password_confirmation, disabled: f.object.force_random_password
|
|
|
|
-if f.object.new_record?
|
|
|
|
.clearfix
|
|
|
|
= f.label :force_random_password do
|
|
|
|
%span Generate random password
|
|
|
|
.input= f.check_box :force_random_password, {}, true, nil
|
|
|
|
|
|
|
|
%fieldset
|
|
|
|
%legend Access
|
|
|
|
.row
|
|
|
|
.span8
|
2012-08-25 19:31:19 +02:00
|
|
|
.clearfix
|
|
|
|
= f.label :projects_limit
|
|
|
|
.input= f.number_field :projects_limit
|
2011-10-20 00:34:05 +02:00
|
|
|
|
2012-04-16 22:33:03 +02:00
|
|
|
.clearfix
|
2012-08-25 19:31:19 +02:00
|
|
|
= f.label :admin do
|
|
|
|
%strong.cred Administrator
|
|
|
|
.input= f.check_box :admin
|
2012-11-27 07:31:15 +01:00
|
|
|
.span4
|
2012-08-25 19:31:19 +02:00
|
|
|
- unless @admin_user.new_record?
|
2012-11-27 07:31:15 +01:00
|
|
|
.alert.alert-error
|
2012-08-25 19:31:19 +02:00
|
|
|
- if @admin_user.blocked
|
2012-11-27 07:31:15 +01:00
|
|
|
%p This user is blocked and is not able to login to GitLab
|
|
|
|
= link_to 'Unblock User', unblock_admin_user_path(@admin_user), method: :put, class: "btn small"
|
2012-08-25 19:31:19 +02:00
|
|
|
- else
|
2012-11-27 07:31:15 +01:00
|
|
|
%p Blocked users will be removed from all projects & will not be able to login to GitLab.
|
|
|
|
= link_to 'Block User', block_admin_user_path(@admin_user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn small danger"
|
|
|
|
%fieldset
|
|
|
|
%legend Profile
|
|
|
|
.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
|
2012-08-25 19:31:19 +02:00
|
|
|
|
2011-10-08 23:36:38 +02:00
|
|
|
.actions
|
2012-08-30 19:00:16 +02:00
|
|
|
= f.submit 'Save', class: "btn save-btn"
|
2012-04-18 03:34:14 +02:00
|
|
|
- if @admin_user.new_record?
|
2012-08-30 19:00:16 +02:00
|
|
|
= link_to 'Cancel', admin_users_path, class: "btn cancel-btn"
|
2012-04-18 03:34:14 +02:00
|
|
|
- else
|
2012-08-30 19:00:16 +02:00
|
|
|
= link_to 'Cancel', admin_user_path(@admin_user), class: "btn cancel-btn"
|