Commit 49fa9907ae55be4922929def98afb9be29281c1e
1 parent
a43a3803
Exists in
master
and in
4 other branches
use control-group classes for inline forms in admin area
Showing
4 changed files
with
38 additions
and
38 deletions
Show diff stats
app/views/admin/groups/edit.html.haml
... | ... | @@ -4,21 +4,21 @@ |
4 | 4 | - if @group.errors.any? |
5 | 5 | .alert.alert-error |
6 | 6 | %span= @group.errors.full_messages.first |
7 | - .clearfix.group_name_holder | |
7 | + .control-group.group_name_holder | |
8 | 8 | = f.label :name do |
9 | 9 | Group name is |
10 | - .input | |
10 | + .controls | |
11 | 11 | = f.text_field :name, placeholder: "Example Group", class: "xxlarge" |
12 | 12 | |
13 | - .clearfix.group-description-holder | |
13 | + .control-group.group-description-holder | |
14 | 14 | = f.label :description, "Details" |
15 | - .input | |
15 | + .controls | |
16 | 16 | = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4 |
17 | 17 | |
18 | - .clearfix.group_name_holder | |
18 | + .control-group.group_name_holder | |
19 | 19 | = f.label :path do |
20 | 20 | %span.cred Group path is |
21 | - .input | |
21 | + .controls | |
22 | 22 | = f.text_field :path, placeholder: "example-group", class: "xxlarge danger" |
23 | 23 | %ul.cred |
24 | 24 | %li Changing group path can have unintended side effects. | ... | ... |
app/views/admin/groups/new.html.haml
... | ... | @@ -4,14 +4,14 @@ |
4 | 4 | - if @group.errors.any? |
5 | 5 | .alert.alert-error |
6 | 6 | %span= @group.errors.full_messages.first |
7 | - .clearfix | |
7 | + .control-group | |
8 | 8 | = f.label :name do |
9 | 9 | Group name is |
10 | - .input | |
10 | + .controls | |
11 | 11 | = f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left" |
12 | - .clearfix.group-description-holder | |
12 | + .control-group.group-description-holder | |
13 | 13 | = f.label :description, "Details" |
14 | - .input | |
14 | + .controls | |
15 | 15 | = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4 |
16 | 16 | |
17 | 17 | .form-actions | ... | ... |
app/views/admin/hooks/index.html.haml
... | ... | @@ -10,9 +10,9 @@ |
10 | 10 | .alert.alert-error |
11 | 11 | - @hook.errors.full_messages.each do |msg| |
12 | 12 | %p= msg |
13 | - .clearfix | |
13 | + .control-group | |
14 | 14 | = f.label :url, "URL:" |
15 | - .input | |
15 | + .controls | |
16 | 16 | = f.text_field :url, class: "text_field xxlarge input-xpadding" |
17 | 17 | |
18 | 18 | = f.submit "Add System Hook", class: "btn btn-create" | ... | ... |
app/views/admin/users/_form.html.haml
... | ... | @@ -8,28 +8,28 @@ |
8 | 8 | |
9 | 9 | %fieldset |
10 | 10 | %legend Account |
11 | - .clearfix | |
11 | + .control-group | |
12 | 12 | = f.label :name |
13 | - .input | |
13 | + .controls | |
14 | 14 | = f.text_field :name, required: true, autocomplete: "off" |
15 | 15 | %span.help-inline * required |
16 | - .clearfix | |
16 | + .control-group | |
17 | 17 | = f.label :username |
18 | - .input | |
18 | + .controls | |
19 | 19 | = f.text_field :username, required: true, autocomplete: "off" |
20 | 20 | %span.help-inline * required |
21 | - .clearfix | |
21 | + .control-group | |
22 | 22 | = f.label :email |
23 | - .input | |
23 | + .controls | |
24 | 24 | = f.text_field :email, required: true, autocomplete: "off" |
25 | 25 | %span.help-inline * required |
26 | 26 | |
27 | 27 | - if @user.new_record? |
28 | 28 | %fieldset |
29 | 29 | %legend Password |
30 | - .clearfix | |
30 | + .control-group | |
31 | 31 | = f.label :password |
32 | - .input | |
32 | + .controls | |
33 | 33 | %strong |
34 | 34 | A temporary password will be generated and sent to user. |
35 | 35 | %br |
... | ... | @@ -37,33 +37,33 @@ |
37 | 37 | - else |
38 | 38 | %fieldset |
39 | 39 | %legend Password |
40 | - .clearfix | |
40 | + .control-group | |
41 | 41 | = f.label :password |
42 | - .input= f.password_field :password, disabled: f.object.force_random_password | |
43 | - .clearfix | |
42 | + .controls= f.password_field :password, disabled: f.object.force_random_password | |
43 | + .control-group | |
44 | 44 | = f.label :password_confirmation |
45 | - .input= f.password_field :password_confirmation, disabled: f.object.force_random_password | |
45 | + .controls= f.password_field :password_confirmation, disabled: f.object.force_random_password | |
46 | 46 | |
47 | 47 | %fieldset |
48 | 48 | %legend Access |
49 | 49 | .row |
50 | 50 | .span8 |
51 | - .clearfix | |
51 | + .control-group | |
52 | 52 | = f.label :projects_limit |
53 | - .input= f.number_field :projects_limit | |
53 | + .controls= f.number_field :projects_limit | |
54 | 54 | |
55 | - .clearfix | |
55 | + .control-group | |
56 | 56 | = f.label :can_create_group |
57 | - .input= f.check_box :can_create_group | |
57 | + .controls= f.check_box :can_create_group | |
58 | 58 | |
59 | - .clearfix | |
59 | + .control-group | |
60 | 60 | = f.label :can_create_team |
61 | - .input= f.check_box :can_create_team | |
61 | + .controls= f.check_box :can_create_team | |
62 | 62 | |
63 | - .clearfix | |
63 | + .control-group | |
64 | 64 | = f.label :admin do |
65 | 65 | %strong.cred Administrator |
66 | - .input= f.check_box :admin | |
66 | + .controls= f.check_box :admin | |
67 | 67 | .span4 |
68 | 68 | - unless @user.new_record? |
69 | 69 | .alert.alert-error |
... | ... | @@ -75,15 +75,15 @@ |
75 | 75 | = link_to 'Block User', block_admin_user_path(@user), confirm: 'USER WILL BE BLOCKED! Are you sure?', method: :put, class: "btn btn-small btn-remove" |
76 | 76 | %fieldset |
77 | 77 | %legend Profile |
78 | - .clearfix | |
78 | + .control-group | |
79 | 79 | = f.label :skype |
80 | - .input= f.text_field :skype | |
81 | - .clearfix | |
80 | + .controls= f.text_field :skype | |
81 | + .control-group | |
82 | 82 | = f.label :linkedin |
83 | - .input= f.text_field :linkedin | |
84 | - .clearfix | |
83 | + .controls= f.text_field :linkedin | |
84 | + .control-group | |
85 | 85 | = f.label :twitter |
86 | - .input= f.text_field :twitter | |
86 | + .controls= f.text_field :twitter | |
87 | 87 | |
88 | 88 | .actions |
89 | 89 | - if @user.new_record? | ... | ... |