Commit eace1ce6 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix new group form

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 3c7a8064
...@@ -114,39 +114,23 @@ ...@@ -114,39 +114,23 @@
} }
.project-visibility-level-holder { .project-visibility-level-holder {
.controls { .radio {
padding-bottom: 9px; margin-bottom: 10px;
}
.controls { i {
input { margin: 0 3px;
float: left; font-size: 20px;
} }
.descr {
display: block;
margin-left: 1.5em;
&.restricted {
color: #888;
}
label { .option-title {
float: none; font-weight: bold;
padding: 0;
margin: 0;
text-align: left;
}
}
.info {
display: block;
margin-top: 5px;
}
strong {
display: inline-block; display: inline-block;
width: 4em;
} }
}
i { .option-descr {
color: inherit; margin-left: 24px;
color: #666;
}
} }
} }
......
= form_for @group do |f| = form_for @group, html: { class: 'group-form form-horizontal' } do |f|
- if @group.errors.any? - if @group.errors.any?
.alert.alert-danger .alert.alert-danger
%span= @group.errors.full_messages.first %span= @group.errors.full_messages.first
.form-group .form-group
= f.label :name do = f.label :name, class: 'control-label' do
Group name Group name
.col-sm-10 .col-sm-10
= f.text_field :name, placeholder: "Ex. OpenSource", class: "form-control left" = f.text_field :name, placeholder: "Ex. OpenSource", class: "form-control"
.form-group.group-description-holder .form-group.group-description-holder
= f.label :description, "Details" = f.label :description, "Details", class: 'control-label'
.col-sm-10 .col-sm-10
= f.text_area :description, maxlength: 250, class: "form-control js-gfm-input", rows: 4 = f.text_area :description, maxlength: 250, class: "form-control js-gfm-input", rows: 4
.form-group .form-group
.col-sm-2
.col-sm-10 .col-sm-10
%ul %ul
%li A group is a collection of several projects %li A group is a collection of several projects
......
...@@ -5,15 +5,15 @@ ...@@ -5,15 +5,15 @@
.col-sm-10 .col-sm-10
- if can_change_visibility_level - if can_change_visibility_level
- Gitlab::VisibilityLevel.values.each do |level| - Gitlab::VisibilityLevel.values.each do |level|
.append-bottom-10 .radio
- restricted = restricted_visibility_levels.include?(level) - restricted = restricted_visibility_levels.include?(level)
= f.radio_button :visibility_level, level, checked: (visibility_level == level), disabled: restricted = f.radio_button :visibility_level, level, checked: (visibility_level == level), disabled: restricted
%span.descr{:class => ("restricted" if restricted)} = label :project_visibility_level, level do
= label :project_visibility_level, level do = visibility_level_icon(level)
= visibility_level_icon(level) .option-title
%strong = visibility_level_label(level)
= visibility_level_label(level) .option-descr
.light.prepend-left-20= visibility_level_description(level) = visibility_level_description(level)
- unless restricted_visibility_levels.empty? - unless restricted_visibility_levels.empty?
.col-sm-10 .col-sm-10
%span.info %span.info
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment