Commit 31c963ed authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Improve admin/user form

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent fc43c4e7
...@@ -98,3 +98,7 @@ label { ...@@ -98,3 +98,7 @@ label {
z-index: 2; z-index: 2;
} }
} }
.fieldset-form fieldset {
margin-bottom: 20px;
}
.user_new .user_new
= form_for [:admin, @user], html: { class: 'form-horizontal' } do |f| = form_for [:admin, @user], html: { class: 'form-horizontal fieldset-form' } do |f|
-if @user.errors.any? -if @user.errors.any?
#error_explanation #error_explanation
.alert.alert-danger .alert.alert-danger
...@@ -61,16 +61,13 @@ ...@@ -61,16 +61,13 @@
.col-sm-10 You cannot remove your own admin rights .col-sm-10 You cannot remove your own admin rights
- else - else
.col-sm-10= f.check_box :admin .col-sm-10= f.check_box :admin
- unless @user.new_record? || current_user == @user
.alert.alert-danger
- if @user.blocked?
%p This user is blocked and is not able to login to GitLab
= link_to 'Unblock User', unblock_admin_user_path(@user), method: :put, class: "btn btn-small"
- else
%p Blocked users will be removed from all projects &amp; will not be able to login to GitLab.
= link_to 'Block User', block_admin_user_path(@user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-small btn-remove"
%fieldset %fieldset
%legend Profile %legend Profile
.form-group
= f.label :avatar, class: 'control-label'
.col-sm-10
= f.file_field :avatar
.form-group .form-group
= f.label :skype, class: 'control-label' = f.label :skype, class: 'control-label'
.col-sm-10= f.text_field :skype, class: 'form-control' .col-sm-10= f.text_field :skype, class: 'form-control'
......
%h3.page-title %h3.page-title
#{@user.name} &rarr; Edit user: #{@user.name}
%i.icon-edit .back-link
Edit user = link_to admin_user_path(@user) do
&larr; Back to user page
%hr %hr
= render 'form' = render 'form'
%h3.page-title %h3.page-title
%i.icon-plus
New user New user
%hr %hr
= render 'form' = render 'form'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment