gitlab-org--gitlab-foss/app/views/admin/users/_form.html.haml

89 lines
3.0 KiB
Plaintext
Raw Normal View History

2011-10-08 21:36:38 +00:00
.user_new
= form_for [:admin, @admin_user] do |f|
-if @admin_user.errors.any?
#error_explanation
2012-08-25 17:31:19 +00:00
%ul.unstyled.alert.alert-error
2011-10-08 21:36:38 +00:00
- @admin_user.errors.full_messages.each do |msg|
%li= msg
%fieldset
%legend Account
.clearfix
= f.label :name
.input
2013-02-06 14:26:46 +00:00
= f.text_field :name, required: true, autocomplete: "off"
%span.help-inline * required
.clearfix
= f.label :username
.input
2013-02-06 14:26:46 +00:00
= f.text_field :username, required: true, autocomplete: "off"
%span.help-inline * required
.clearfix
= f.label :email
.input
= f.text_field :email, required: true, autocomplete: "off"
%span.help-inline * required
%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 17:31:19 +00:00
.clearfix
= f.label :projects_limit
.input= f.number_field :projects_limit
2013-01-25 09:30:49 +00:00
.clearfix
= f.label :can_create_group
.input= f.check_box :can_create_group
.clearfix
= f.label :can_create_team
.input= f.check_box :can_create_team
.clearfix
2012-08-25 17:31:19 +00:00
= f.label :admin do
%strong.cred Administrator
.input= f.check_box :admin
.span4
2012-08-25 17:31:19 +00:00
- unless @admin_user.new_record?
.alert.alert-error
- if @admin_user.blocked?
%p This user is blocked and is not able to login to GitLab
2013-01-29 20:29:21 +00:00
= link_to 'Unblock User', unblock_admin_user_path(@admin_user), method: :put, class: "btn btn-small"
2012-08-25 17:31:19 +00:00
- else
%p Blocked users will be removed from all projects & will not be able to login to GitLab.
2013-01-29 20:29:21 +00:00
= link_to 'Block User', block_admin_user_path(@admin_user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn btn-small btn-remove"
%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 17:31:19 +00:00
2011-10-08 21:36:38 +00:00
.actions
2012-04-18 01:34:14 +00:00
- if @admin_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-01-29 20:18:19 +00:00
= link_to 'Cancel', admin_user_path(@admin_user), class: "btn btn-cancel"