gitlabhq/app/views/admin/users/_form.html.haml
Pat Thoyts 787e5e94ac Fix english on the edit user form.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2012-07-20 22:18:42 +01:00

73 lines
2.5 KiB
Plaintext

.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
.row
.span6
.clearfix
= f.label :name
.input
= f.text_field :name
%span.help-inline * required
.clearfix
= f.label :email
.input
= f.text_field :email
%span.help-inline * required
%hr
-if f.object.new_record?
.clearfix
= f.label :admin, :class => "checkbox" do
= f.check_box :force_random_password, {}, true, nil
%span Generate random password
%div.password-fields
.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
%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
.input= f.text_field :projects_limit, :class => "small_input"
.alert
.clearfix
%p Make the user a GitLab administrator.
= f.label :admin, :class => "checkbox" do
= f.check_box :admin
%span Administrator
- unless @admin_user.new_record?
.alert.alert-error
- if @admin_user.blocked
%span
= link_to 'Unblock', unblock_admin_user_path(@admin_user), :method => :put, :class => "btn small"
This user is blocked and is not able to login to GitLab
- else
%span
= link_to 'Block', block_admin_user_path(@admin_user), :confirm => 'USER WILL BE BLOCKED! Are you sure?', :method => :put, :class => "btn small danger"
Blocked users will be removed from all projects &amp; will not be able to login to GitLab.
.actions
= f.submit 'Save', :class => "btn primary"
- if @admin_user.new_record?
= link_to 'Cancel', admin_users_path, :class => "btn"
- else
= link_to 'Cancel', admin_user_path(@admin_user), :class => "btn"