Commit 95e6a5dcd380d738fbf9d959111f049d15ca8d11
1 parent
f1266765
Exists in
spb-stable
and in
3 other branches
Fix admin forms UI
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
3 changed files
with
55 additions
and
55 deletions
Show diff stats
app/views/admin/groups/edit.html.haml
1 | 1 | %h3.page-title Edit Group |
2 | 2 | %hr |
3 | -= form_for [:admin, @group] do |f| | |
3 | += form_for [:admin, @group], html: { class: "form-horizontal" } do |f| | |
4 | 4 | - if @group.errors.any? |
5 | 5 | .alert.alert-danger |
6 | 6 | %span= @group.errors.full_messages.first |
7 | 7 | .form-group.group_name_holder |
8 | - = f.label :name do | |
8 | + = f.label :name, class: 'control-label' do | |
9 | 9 | Group name |
10 | 10 | .col-sm-10 |
11 | 11 | = f.text_field :name, placeholder: "Example Group", class: "form-control" |
12 | 12 | |
13 | 13 | .form-group.group-description-holder |
14 | - = f.label :description, "Details" | |
14 | + = f.label :description, "Details", class: 'control-label' | |
15 | 15 | .col-sm-10 |
16 | 16 | = f.text_area :description, maxlength: 250, class: "form-control js-gfm-input", rows: 4 |
17 | 17 | |
18 | 18 | .form-group.group_name_holder |
19 | - = f.label :path do | |
19 | + = f.label :path, class: 'control-label' do | |
20 | 20 | %span.cred Group path |
21 | 21 | .col-sm-10 |
22 | 22 | = f.text_field :path, placeholder: "example-group", class: "form-control danger" | ... | ... |
app/views/admin/groups/new.html.haml
1 | 1 | %h3.page-title New Group |
2 | 2 | %hr |
3 | -= form_for [:admin, @group] do |f| | |
3 | += form_for [:admin, @group], html: { class: 'group-form form-horizontal' } do |f| | |
4 | 4 | - if @group.errors.any? |
5 | 5 | .alert.alert-danger |
6 | 6 | %span= @group.errors.full_messages.first |
7 | 7 | .form-group |
8 | - = f.label :name do | |
8 | + = f.label :name, class: 'control-label' do | |
9 | 9 | Group name |
10 | 10 | .col-sm-10 |
11 | - = f.text_field :name, placeholder: "Ex. OpenSource", class: "form-control left" | |
11 | + = f.text_field :name, placeholder: "Ex. OpenSource", class: "form-control" | |
12 | + | |
12 | 13 | .form-group.group-description-holder |
13 | - = f.label :description, "Details" | |
14 | + = f.label :description, "Details", class: 'control-label' | |
14 | 15 | .col-sm-10 |
15 | 16 | = f.text_area :description, maxlength: 250, class: "form-control js-gfm-input", rows: 4 |
16 | 17 | |
18 | + .form-group | |
19 | + .col-sm-2 | |
20 | + .col-sm-10 | |
21 | + %ul | |
22 | + %li A group is a collection of several projects | |
23 | + %li Groups are private by default | |
24 | + %li Members of a group may only view projects they have permission to access | |
25 | + %li Group project URLs are prefixed with the group namespace | |
26 | + %li Existing projects may be moved into a group | |
27 | + | |
17 | 28 | .form-actions |
18 | 29 | = f.submit 'Create group', class: "btn btn-create" |
19 | 30 | |
20 | - %hr | |
21 | - .padded | |
22 | - %ul | |
23 | - %li Group is kind of directory for several projects | |
24 | - %li All created groups are private | |
25 | - %li People within a group see only projects they have access to | |
26 | - %li All projects of group will be stored in a group directory | |
27 | - %li You will be able to move existing projects into group | |
31 | + | ... | ... |
app/views/admin/users/_form.html.haml
1 | 1 | .user_new |
2 | - = form_for [:admin, @user] do |f| | |
2 | + = form_for [:admin, @user], html: { class: 'form-horizontal' } do |f| | |
3 | 3 | -if @user.errors.any? |
4 | 4 | #error_explanation |
5 | 5 | %ul.unstyled.alert.alert-danger |
... | ... | @@ -9,26 +9,26 @@ |
9 | 9 | %fieldset |
10 | 10 | %legend Account |
11 | 11 | .form-group |
12 | - = f.label :name | |
12 | + = f.label :name, class: 'control-label' | |
13 | 13 | .col-sm-10 |
14 | - = f.text_field :name, required: true, autocomplete: "off" | |
14 | + = f.text_field :name, required: true, autocomplete: "off", class: 'form-control' | |
15 | 15 | %span.help-inline * required |
16 | 16 | .form-group |
17 | - = f.label :username | |
17 | + = f.label :username, class: 'control-label' | |
18 | 18 | .col-sm-10 |
19 | - = f.text_field :username, required: true, autocomplete: "off" | |
19 | + = f.text_field :username, required: true, autocomplete: "off", class: 'form-control' | |
20 | 20 | %span.help-inline * required |
21 | 21 | .form-group |
22 | - = f.label :email | |
22 | + = f.label :email, class: 'control-label' | |
23 | 23 | .col-sm-10 |
24 | - = f.text_field :email, required: true, autocomplete: "off" | |
24 | + = f.text_field :email, required: true, autocomplete: "off", class: 'form-control' | |
25 | 25 | %span.help-inline * required |
26 | 26 | |
27 | 27 | - if @user.new_record? |
28 | 28 | %fieldset |
29 | 29 | %legend Password |
30 | 30 | .form-group |
31 | - = f.label :password | |
31 | + = f.label :password, class: 'control-label' | |
32 | 32 | .col-sm-10 |
33 | 33 | %strong |
34 | 34 | A temporary password will be generated and sent to user. |
... | ... | @@ -38,48 +38,44 @@ |
38 | 38 | %fieldset |
39 | 39 | %legend Password |
40 | 40 | .form-group |
41 | - = f.label :password | |
42 | - .col-sm-10= f.password_field :password, disabled: f.object.force_random_password | |
41 | + = f.label :password, class: 'control-label' | |
42 | + .col-sm-10= f.password_field :password, disabled: f.object.force_random_password, class: 'form-control' | |
43 | 43 | .form-group |
44 | - = f.label :password_confirmation | |
45 | - .col-sm-10= f.password_field :password_confirmation, disabled: f.object.force_random_password | |
44 | + = f.label :password_confirmation, class: 'control-label' | |
45 | + .col-sm-10= f.password_field :password_confirmation, disabled: f.object.force_random_password, class: 'form-control' | |
46 | 46 | |
47 | 47 | %fieldset |
48 | 48 | %legend Access |
49 | - .row | |
50 | - .col-md-8 | |
51 | - .form-group | |
52 | - = f.label :projects_limit | |
53 | - .col-sm-10= f.number_field :projects_limit | |
49 | + .form-group | |
50 | + = f.label :projects_limit, class: 'control-label' | |
51 | + .col-sm-10= f.number_field :projects_limit, class: 'form-control' | |
54 | 52 | |
55 | - .form-group | |
56 | - = f.label :can_create_group | |
57 | - .col-sm-10= f.check_box :can_create_group | |
53 | + .form-group | |
54 | + = f.label :can_create_group, class: 'control-label' | |
55 | + .col-sm-10= f.check_box :can_create_group | |
58 | 56 | |
59 | - .form-group | |
60 | - = f.label :admin do | |
61 | - %strong.cred Administrator | |
62 | - .col-sm-10= f.check_box :admin | |
63 | - .col-md-4 | |
64 | - - unless @user.new_record? | |
65 | - .alert.alert-danger | |
66 | - - if @user.blocked? | |
67 | - %p This user is blocked and is not able to login to GitLab | |
68 | - = link_to 'Unblock User', unblock_admin_user_path(@user), method: :put, class: "btn btn-small" | |
69 | - - else | |
70 | - %p Blocked users will be removed from all projects & will not be able to login to GitLab. | |
71 | - = 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" | |
57 | + .form-group | |
58 | + = f.label :admin, class: 'control-label' | |
59 | + .col-sm-10= f.check_box :admin | |
60 | + - unless @user.new_record? | |
61 | + .alert.alert-danger | |
62 | + - if @user.blocked? | |
63 | + %p This user is blocked and is not able to login to GitLab | |
64 | + = link_to 'Unblock User', unblock_admin_user_path(@user), method: :put, class: "btn btn-small" | |
65 | + - else | |
66 | + %p Blocked users will be removed from all projects & will not be able to login to GitLab. | |
67 | + = 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" | |
72 | 68 | %fieldset |
73 | 69 | %legend Profile |
74 | 70 | .form-group |
75 | - = f.label :skype | |
76 | - .col-sm-10= f.text_field :skype | |
71 | + = f.label :skype, class: 'control-label' | |
72 | + .col-sm-10= f.text_field :skype, class: 'form-control' | |
77 | 73 | .form-group |
78 | - = f.label :linkedin | |
79 | - .col-sm-10= f.text_field :linkedin | |
74 | + = f.label :linkedin, class: 'control-label' | |
75 | + .col-sm-10= f.text_field :linkedin, class: 'form-control' | |
80 | 76 | .form-group |
81 | - = f.label :twitter | |
82 | - .col-sm-10= f.text_field :twitter | |
77 | + = f.label :twitter, class: 'control-label' | |
78 | + .col-sm-10= f.text_field :twitter, class: 'form-control' | |
83 | 79 | |
84 | 80 | .form-actions |
85 | 81 | - if @user.new_record? | ... | ... |