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,21 +4,21 @@ | ||
4 | - if @group.errors.any? | 4 | - if @group.errors.any? |
5 | .alert.alert-error | 5 | .alert.alert-error |
6 | %span= @group.errors.full_messages.first | 6 | %span= @group.errors.full_messages.first |
7 | - .clearfix.group_name_holder | 7 | + .control-group.group_name_holder |
8 | = f.label :name do | 8 | = f.label :name do |
9 | Group name is | 9 | Group name is |
10 | - .input | 10 | + .controls |
11 | = f.text_field :name, placeholder: "Example Group", class: "xxlarge" | 11 | = f.text_field :name, placeholder: "Example Group", class: "xxlarge" |
12 | 12 | ||
13 | - .clearfix.group-description-holder | 13 | + .control-group.group-description-holder |
14 | = f.label :description, "Details" | 14 | = f.label :description, "Details" |
15 | - .input | 15 | + .controls |
16 | = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4 | 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 | = f.label :path do | 19 | = f.label :path do |
20 | %span.cred Group path is | 20 | %span.cred Group path is |
21 | - .input | 21 | + .controls |
22 | = f.text_field :path, placeholder: "example-group", class: "xxlarge danger" | 22 | = f.text_field :path, placeholder: "example-group", class: "xxlarge danger" |
23 | %ul.cred | 23 | %ul.cred |
24 | %li Changing group path can have unintended side effects. | 24 | %li Changing group path can have unintended side effects. |
app/views/admin/groups/new.html.haml
@@ -4,14 +4,14 @@ | @@ -4,14 +4,14 @@ | ||
4 | - if @group.errors.any? | 4 | - if @group.errors.any? |
5 | .alert.alert-error | 5 | .alert.alert-error |
6 | %span= @group.errors.full_messages.first | 6 | %span= @group.errors.full_messages.first |
7 | - .clearfix | 7 | + .control-group |
8 | = f.label :name do | 8 | = f.label :name do |
9 | Group name is | 9 | Group name is |
10 | - .input | 10 | + .controls |
11 | = f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left" | 11 | = f.text_field :name, placeholder: "Ex. OpenSource", class: "xxlarge left" |
12 | - .clearfix.group-description-holder | 12 | + .control-group.group-description-holder |
13 | = f.label :description, "Details" | 13 | = f.label :description, "Details" |
14 | - .input | 14 | + .controls |
15 | = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4 | 15 | = f.text_area :description, maxlength: 250, class: "xxlarge js-gfm-input", rows: 4 |
16 | 16 | ||
17 | .form-actions | 17 | .form-actions |
app/views/admin/hooks/index.html.haml
@@ -10,9 +10,9 @@ | @@ -10,9 +10,9 @@ | ||
10 | .alert.alert-error | 10 | .alert.alert-error |
11 | - @hook.errors.full_messages.each do |msg| | 11 | - @hook.errors.full_messages.each do |msg| |
12 | %p= msg | 12 | %p= msg |
13 | - .clearfix | 13 | + .control-group |
14 | = f.label :url, "URL:" | 14 | = f.label :url, "URL:" |
15 | - .input | 15 | + .controls |
16 | = f.text_field :url, class: "text_field xxlarge input-xpadding" | 16 | = f.text_field :url, class: "text_field xxlarge input-xpadding" |
17 | | 17 | |
18 | = f.submit "Add System Hook", class: "btn btn-create" | 18 | = f.submit "Add System Hook", class: "btn btn-create" |
app/views/admin/users/_form.html.haml
@@ -8,28 +8,28 @@ | @@ -8,28 +8,28 @@ | ||
8 | 8 | ||
9 | %fieldset | 9 | %fieldset |
10 | %legend Account | 10 | %legend Account |
11 | - .clearfix | 11 | + .control-group |
12 | = f.label :name | 12 | = f.label :name |
13 | - .input | 13 | + .controls |
14 | = f.text_field :name, required: true, autocomplete: "off" | 14 | = f.text_field :name, required: true, autocomplete: "off" |
15 | %span.help-inline * required | 15 | %span.help-inline * required |
16 | - .clearfix | 16 | + .control-group |
17 | = f.label :username | 17 | = f.label :username |
18 | - .input | 18 | + .controls |
19 | = f.text_field :username, required: true, autocomplete: "off" | 19 | = f.text_field :username, required: true, autocomplete: "off" |
20 | %span.help-inline * required | 20 | %span.help-inline * required |
21 | - .clearfix | 21 | + .control-group |
22 | = f.label :email | 22 | = f.label :email |
23 | - .input | 23 | + .controls |
24 | = f.text_field :email, required: true, autocomplete: "off" | 24 | = f.text_field :email, required: true, autocomplete: "off" |
25 | %span.help-inline * required | 25 | %span.help-inline * required |
26 | 26 | ||
27 | - if @user.new_record? | 27 | - if @user.new_record? |
28 | %fieldset | 28 | %fieldset |
29 | %legend Password | 29 | %legend Password |
30 | - .clearfix | 30 | + .control-group |
31 | = f.label :password | 31 | = f.label :password |
32 | - .input | 32 | + .controls |
33 | %strong | 33 | %strong |
34 | A temporary password will be generated and sent to user. | 34 | A temporary password will be generated and sent to user. |
35 | %br | 35 | %br |
@@ -37,33 +37,33 @@ | @@ -37,33 +37,33 @@ | ||
37 | - else | 37 | - else |
38 | %fieldset | 38 | %fieldset |
39 | %legend Password | 39 | %legend Password |
40 | - .clearfix | 40 | + .control-group |
41 | = f.label :password | 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 | = f.label :password_confirmation | 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 | %fieldset | 47 | %fieldset |
48 | %legend Access | 48 | %legend Access |
49 | .row | 49 | .row |
50 | .span8 | 50 | .span8 |
51 | - .clearfix | 51 | + .control-group |
52 | = f.label :projects_limit | 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 | = f.label :can_create_group | 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 | = f.label :can_create_team | 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 | = f.label :admin do | 64 | = f.label :admin do |
65 | %strong.cred Administrator | 65 | %strong.cred Administrator |
66 | - .input= f.check_box :admin | 66 | + .controls= f.check_box :admin |
67 | .span4 | 67 | .span4 |
68 | - unless @user.new_record? | 68 | - unless @user.new_record? |
69 | .alert.alert-error | 69 | .alert.alert-error |
@@ -75,15 +75,15 @@ | @@ -75,15 +75,15 @@ | ||
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" | 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 | %fieldset | 76 | %fieldset |
77 | %legend Profile | 77 | %legend Profile |
78 | - .clearfix | 78 | + .control-group |
79 | = f.label :skype | 79 | = f.label :skype |
80 | - .input= f.text_field :skype | ||
81 | - .clearfix | 80 | + .controls= f.text_field :skype |
81 | + .control-group | ||
82 | = f.label :linkedin | 82 | = f.label :linkedin |
83 | - .input= f.text_field :linkedin | ||
84 | - .clearfix | 83 | + .controls= f.text_field :linkedin |
84 | + .control-group | ||
85 | = f.label :twitter | 85 | = f.label :twitter |
86 | - .input= f.text_field :twitter | 86 | + .controls= f.text_field :twitter |
87 | 87 | ||
88 | .actions | 88 | .actions |
89 | - if @user.new_record? | 89 | - if @user.new_record? |