gitlabhq/app/views/admin/users/_form.html.haml

64 lines
2.1 KiB
Plaintext
Raw Normal View History

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
.row
.span6
.clearfix
= f.label :name
.input
= f.text_field :name
2012-04-18 03:34:14 +02:00
%span.help-inline * required
.clearfix
= f.label :email
.input
= f.text_field :email
2012-04-18 03:34:14 +02:00
%span.help-inline * required
.clearfix
= f.label :password
.input= f.password_field :password
.clearfix
= f.label :password_confirmation
.input= f.password_field :password_confirmation
%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 Give user ability to manage application.
2012-04-18 03:34:14 +02:00
= f.label :admin, :class => "checkbox" do
= f.check_box :admin
%span Administrator
2012-04-18 03:34:14 +02:00
- 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 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 user will removed from all projects & will not be able to login to GitLab.
2011-10-08 23:36:38 +02:00
.actions
= f.submit 'Save', :class => "btn primary"
2012-04-18 03:34:14 +02:00
- if @admin_user.new_record?
2012-02-11 18:56:18 +01:00
= link_to 'Cancel', admin_users_path, :class => "btn"
2012-04-18 03:34:14 +02:00
- else
2012-02-11 18:56:18 +01:00
= link_to 'Cancel', admin_user_path(@admin_user), :class => "btn"