diff --git a/app/assets/stylesheets/generic/forms.scss b/app/assets/stylesheets/generic/forms.scss index 36551f85b6a4e2c2e5b897bf19db09c29440754c..bd9d4bceb83be2b18c0380d89b582ec2a7222126 100644 --- a/app/assets/stylesheets/generic/forms.scss +++ b/app/assets/stylesheets/generic/forms.scss @@ -98,3 +98,7 @@ label { z-index: 2; } } + +.fieldset-form fieldset { + margin-bottom: 20px; +} diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml index b9e6382ea885787103b2090539f590ed2a3e86bb..d00772d4dfefe30298a454faa6208e493c5e3440 100644 --- a/app/views/admin/users/_form.html.haml +++ b/app/views/admin/users/_form.html.haml @@ -1,5 +1,5 @@ .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? #error_explanation .alert.alert-danger @@ -61,16 +61,13 @@ .col-sm-10 You cannot remove your own admin rights - else .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 & 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 %legend Profile + .form-group + = f.label :avatar, class: 'control-label' + .col-sm-10 + = f.file_field :avatar + .form-group = f.label :skype, class: 'control-label' .col-sm-10= f.text_field :skype, class: 'form-control' diff --git a/app/views/admin/users/edit.html.haml b/app/views/admin/users/edit.html.haml index 2a4f8c60546e97e5b4af55e56e6136152fd41b88..d71d8189c51274626eb34781fc8ecc462964f0a7 100644 --- a/app/views/admin/users/edit.html.haml +++ b/app/views/admin/users/edit.html.haml @@ -1,6 +1,7 @@ %h3.page-title - #{@user.name} → - %i.icon-edit - Edit user + Edit user: #{@user.name} +.back-link + = link_to admin_user_path(@user) do + ← Back to user page %hr = render 'form' diff --git a/app/views/admin/users/new.html.haml b/app/views/admin/users/new.html.haml index a1c90c48946ce4992dcf6cdbc27a84b1bb8d408c..8fbb757f42455c1673a7d25681ee513c07740f62 100644 --- a/app/views/admin/users/new.html.haml +++ b/app/views/admin/users/new.html.haml @@ -1,5 +1,4 @@ %h3.page-title - %i.icon-plus New user %hr = render 'form'