Commit eace1ce645f285f01b49128328c18f582376bc3a
1 parent
3c7a8064
Exists in
spb-stable
and in
3 other branches
Fix new group form
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
3 changed files
with
24 additions
and
39 deletions
Show diff stats
app/assets/stylesheets/sections/projects.scss
... | ... | @@ -114,39 +114,23 @@ |
114 | 114 | } |
115 | 115 | |
116 | 116 | .project-visibility-level-holder { |
117 | - .controls { | |
118 | - padding-bottom: 9px; | |
119 | - } | |
117 | + .radio { | |
118 | + margin-bottom: 10px; | |
120 | 119 | |
121 | - .controls { | |
122 | - input { | |
123 | - float: left; | |
120 | + i { | |
121 | + margin: 0 3px; | |
122 | + font-size: 20px; | |
124 | 123 | } |
125 | - .descr { | |
126 | - display: block; | |
127 | - margin-left: 1.5em; | |
128 | - &.restricted { | |
129 | - color: #888; | |
130 | - } | |
131 | 124 | |
132 | - label { | |
133 | - float: none; | |
134 | - padding: 0; | |
135 | - margin: 0; | |
136 | - text-align: left; | |
137 | - } | |
138 | - } | |
139 | - .info { | |
140 | - display: block; | |
141 | - margin-top: 5px; | |
142 | - } | |
143 | - strong { | |
125 | + .option-title { | |
126 | + font-weight: bold; | |
144 | 127 | display: inline-block; |
145 | - width: 4em; | |
146 | 128 | } |
147 | - } | |
148 | - i { | |
149 | - color: inherit; | |
129 | + | |
130 | + .option-descr { | |
131 | + margin-left: 24px; | |
132 | + color: #666; | |
133 | + } | |
150 | 134 | } |
151 | 135 | } |
152 | 136 | ... | ... |
app/views/groups/new.html.haml
1 | -= form_for @group do |f| | |
1 | += form_for @group, html: { class: 'group-form form-horizontal' } do |f| | |
2 | 2 | - if @group.errors.any? |
3 | 3 | .alert.alert-danger |
4 | 4 | %span= @group.errors.full_messages.first |
5 | 5 | .form-group |
6 | - = f.label :name do | |
6 | + = f.label :name, class: 'control-label' do | |
7 | 7 | Group name |
8 | 8 | .col-sm-10 |
9 | - = f.text_field :name, placeholder: "Ex. OpenSource", class: "form-control left" | |
9 | + = f.text_field :name, placeholder: "Ex. OpenSource", class: "form-control" | |
10 | 10 | |
11 | 11 | .form-group.group-description-holder |
12 | - = f.label :description, "Details" | |
12 | + = f.label :description, "Details", class: 'control-label' | |
13 | 13 | .col-sm-10 |
14 | 14 | = f.text_area :description, maxlength: 250, class: "form-control js-gfm-input", rows: 4 |
15 | 15 | |
16 | 16 | .form-group |
17 | + .col-sm-2 | |
17 | 18 | .col-sm-10 |
18 | 19 | %ul |
19 | 20 | %li A group is a collection of several projects | ... | ... |
app/views/projects/_visibility_level.html.haml
... | ... | @@ -5,15 +5,15 @@ |
5 | 5 | .col-sm-10 |
6 | 6 | - if can_change_visibility_level |
7 | 7 | - Gitlab::VisibilityLevel.values.each do |level| |
8 | - .append-bottom-10 | |
8 | + .radio | |
9 | 9 | - restricted = restricted_visibility_levels.include?(level) |
10 | 10 | = f.radio_button :visibility_level, level, checked: (visibility_level == level), disabled: restricted |
11 | - %span.descr{:class => ("restricted" if restricted)} | |
12 | - = label :project_visibility_level, level do | |
13 | - = visibility_level_icon(level) | |
14 | - %strong | |
15 | - = visibility_level_label(level) | |
16 | - .light.prepend-left-20= visibility_level_description(level) | |
11 | + = label :project_visibility_level, level do | |
12 | + = visibility_level_icon(level) | |
13 | + .option-title | |
14 | + = visibility_level_label(level) | |
15 | + .option-descr | |
16 | + = visibility_level_description(level) | |
17 | 17 | - unless restricted_visibility_levels.empty? |
18 | 18 | .col-sm-10 |
19 | 19 | %span.info | ... | ... |