From e28b3f0969b7d193522d6c7281fa61bf880ff58f Mon Sep 17 00:00:00 2001 From: "Luke \"Jared\" Bennett" Date: Mon, 7 Nov 2016 16:30:33 +0000 Subject: [PATCH 1/4] Updated new group page Added new orange and applied to private visibility radio Review changes --- app/assets/stylesheets/framework/common.scss | 1 + app/assets/stylesheets/framework/forms.scss | 1 - app/assets/stylesheets/pages/projects.scss | 4 ++ app/views/groups/new.html.haml | 43 ++++++++------- .../_choose_group_avatar_button.html.haml | 2 +- app/views/shared/_group_form.html.haml | 53 +++++++++---------- 6 files changed, 56 insertions(+), 48 deletions(-) diff --git a/app/assets/stylesheets/framework/common.scss b/app/assets/stylesheets/framework/common.scss index ad5ac589d0fc..5c6f054bf33f 100644 --- a/app/assets/stylesheets/framework/common.scss +++ b/app/assets/stylesheets/framework/common.scss @@ -30,6 +30,7 @@ .underlined-link { text-decoration: underline; } .hint { font-style: italic; color: #999; } .light { color: $gl-gray; } +.lighter { color: $gl-gray-light; } .slead { color: $gl-gray; diff --git a/app/assets/stylesheets/framework/forms.scss b/app/assets/stylesheets/framework/forms.scss index f0727e9688ae..2d46b099a4a9 100644 --- a/app/assets/stylesheets/framework/forms.scss +++ b/app/assets/stylesheets/framework/forms.scss @@ -167,4 +167,3 @@ label { color: $gl-text-color; } } - diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index f7d545645307..d9f326427285 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -284,6 +284,10 @@ margin-left: 29px; color: #54565b; } + + .fa-lock { + color: $orange-dark; + } } } diff --git a/app/views/groups/new.html.haml b/app/views/groups/new.html.haml index d19eaa6add94..0dd067066dba 100644 --- a/app/views/groups/new.html.haml +++ b/app/views/groups/new.html.haml @@ -1,25 +1,30 @@ - page_title 'New Group' - header_title "Groups", dashboard_groups_path -%h3.page-title - New Group -%hr +.row.prepend-top-default + .col-lg-3.profile-settings-sidebar + %h4.prepend-top-0 + New Group + %p + A group is a collection of several projects. + Groups can be private, public or limited to any logged in users. + You can move existing projects to a group. + .col-lg-9 + = form_for @group, html: { class: 'group-form form-horizontal gl-show-field-errors' } do |f| + = form_errors(@group) + = render 'shared/group_form', f: f, autofocus: true -= form_for @group, html: { class: 'group-form form-horizontal gl-show-field-errors' } do |f| - = form_errors(@group) - = render 'shared/group_form', f: f, autofocus: true + .form-group.col-xs-12 + = f.label :description, class: 'label-light' do + Group avatar + %br + = render 'shared/choose_group_avatar_button', f: f - .form-group.group-description-holder - = f.label :avatar, "Group avatar", class: 'control-label' - .col-sm-10 - = render 'shared/choose_group_avatar_button', f: f + .form-group.col-xs-12.project-visibility-level-holder + = f.label :visibility_level, class: 'label-light' do + Visibility Level + = link_to icon('question-circle'), help_page_path("public_access/public_access") + = render('shared/visibility_radios', model_method: :visibility_level, form: f, can_change_visibility_level: true, selected_level: default_group_visibility, form_model: @group) - = render 'shared/visibility_level', f: f, visibility_level: default_group_visibility, can_change_visibility_level: true, form_model: @group - - .form-group - .col-sm-offset-2.col-sm-10 - = render 'shared/group_tips' - - .form-actions - = f.submit 'Create group', class: "btn btn-create", tabindex: 3 - = link_to 'Cancel', dashboard_groups_path, class: 'btn btn-cancel' + = f.submit 'Create group', class: "btn btn-create", tabindex: 3 + = link_to 'Cancel', dashboard_groups_path, class: 'btn btn-cancel' diff --git a/app/views/shared/_choose_group_avatar_button.html.haml b/app/views/shared/_choose_group_avatar_button.html.haml index 000532b1c9a8..b6618aef7cb5 100644 --- a/app/views/shared/_choose_group_avatar_button.html.haml +++ b/app/views/shared/_choose_group_avatar_button.html.haml @@ -4,4 +4,4 @@   %span.file_name.js-avatar-filename File name... = f.file_field :avatar, class: 'js-group-avatar-input hidden' -.light The maximum file size allowed is 200KB. +.lighter The maximum file size allowed is 200KB. diff --git a/app/views/shared/_group_form.html.haml b/app/views/shared/_group_form.html.haml index ba25e09d638a..0fb63a81cb1e 100644 --- a/app/views/shared/_group_form.html.haml +++ b/app/views/shared/_group_form.html.haml @@ -1,31 +1,30 @@ - if @group.persisted? - .form-group - = f.label :name, class: 'control-label' do - Group name - .col-sm-10 - = f.text_field :name, placeholder: 'open-source', class: 'form-control' + .form-group.col-xs-12 + = f.label :name, class: 'label-light' do + %span Group name + = f.text_field :name, placeholder: 'open-source', class: 'form-control' -.form-group - = f.label :path, class: 'control-label' do - Group path - .col-sm-10 - .input-group.gl-field-error-anchor - .input-group-addon - = root_url - = f.text_field :path, placeholder: 'open-source', class: 'form-control', - autofocus: local_assigns[:autofocus] || false, pattern: "[a-zA-Z0-9-_]+", - required: true, title: 'Please choose a group name with no special characters.' +.form-group.col-xs-12 + = f.label :path, class: 'label-light' do + %span Group path + .input-group.gl-field-error-anchor + .input-group-addon + = root_url + = f.text_field :path, placeholder: 'open-source', class: 'form-control', + autofocus: local_assigns[:autofocus] || false, pattern: "[a-zA-Z0-9-_]+", + required: true, title: 'Please choose a group name with no special characters.' - - if @group.persisted? - .alert.alert-warning.prepend-top-10 - %ul - %li Changing group path can have unintended side effects. - %li Renaming group path will rename directory for all related projects - %li It will change web url for access group and group projects. - %li It will change the git path to repositories under this group. + - if @group.persisted? + .alert.alert-warning.prepend-top-10 + %ul + %li Changing group path can have unintended side effects. + %li Renaming group path will rename directory for all related projects + %li It will change web url for access group and group projects. + %li It will change the git path to repositories under this group. -.form-group.group-description-holder - = f.label :description, class: 'control-label' - .col-sm-10 - = f.text_area :description, maxlength: 250, - class: 'form-control js-gfm-input', rows: 4 +.form-group.col-xs-12 + = f.label :description, class: 'label-light' do + Description + %span.lighter (optional) + = f.text_area :description, maxlength: 250, + class: 'form-control js-gfm-input', rows: 4 -- GitLab From be4856c4ce9580cd76e3b68e3b4b8b0546af5331 Mon Sep 17 00:00:00 2001 From: "Luke \"Jared\" Bennett" Date: Mon, 3 Apr 2017 17:26:17 +0100 Subject: [PATCH 2/4] Updated changes with recent codebase --- app/assets/stylesheets/framework/common.scss | 1 - app/assets/stylesheets/framework/forms.scss | 4 ++ app/assets/stylesheets/pages/projects.scss | 2 +- app/views/admin/groups/_form.html.haml | 50 +++++++++---------- app/views/admin/groups/new.html.haml | 2 - app/views/groups/_create_chat_team.html.haml | 24 ++++----- .../groups/_group_lfs_settings.html.haml | 19 ++++--- app/views/groups/new.html.haml | 6 +-- .../_choose_group_avatar_button.html.haml | 2 +- app/views/shared/_group_form.html.haml | 3 +- app/views/shared/_group_tips.html.haml | 5 -- 11 files changed, 54 insertions(+), 64 deletions(-) delete mode 100644 app/views/shared/_group_tips.html.haml diff --git a/app/assets/stylesheets/framework/common.scss b/app/assets/stylesheets/framework/common.scss index 6a7cc23c5d12..2c33b235980b 100644 --- a/app/assets/stylesheets/framework/common.scss +++ b/app/assets/stylesheets/framework/common.scss @@ -31,7 +31,6 @@ .underlined-link { text-decoration: underline; } .hint { font-style: italic; color: $hint-color; } .light { color: $common-gray; } -.lighter { color: $gl-gray-light; } .slead { color: $common-gray; diff --git a/app/assets/stylesheets/framework/forms.scss b/app/assets/stylesheets/framework/forms.scss index 432024779fde..862bc93b3f5b 100644 --- a/app/assets/stylesheets/framework/forms.scss +++ b/app/assets/stylesheets/framework/forms.scss @@ -34,6 +34,10 @@ label { &.label-light { font-weight: 600; } + + &.label-block { + display: block; + } } .control-label { diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index eb0c9d2faef9..5cbd14974a5f 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -305,7 +305,7 @@ } .fa-lock { - color: $orange-dark; + color: $red-500; } } } diff --git a/app/views/admin/groups/_form.html.haml b/app/views/admin/groups/_form.html.haml index 589f4557b526..db4783f46d0f 100644 --- a/app/views/admin/groups/_form.html.haml +++ b/app/views/admin/groups/_form.html.haml @@ -1,30 +1,30 @@ -= form_for [:admin, @group], html: { class: "form-horizontal" } do |f| - = form_errors(@group) - = render 'shared/group_form', f: f +.row.prepend-top-default + .col-lg-3.profile-settings-sidebar + %h4.prepend-top-0 + New Group + %p + A group is a collection of several projects. + Groups can be private, public or limited to any logged in users. + You can move existing projects to a group. + .col-lg-9 + = form_for [:admin, @group], html: { class: "form-horizontal" } do |f| + = form_errors(@group) + = render 'shared/group_form', f: f - .form-group.group-description-holder - = f.label :avatar, "Group avatar", class: 'control-label' - .col-sm-10 - = render 'shared/choose_group_avatar_button', f: f + .form-group.col-xs-12 + = f.label :avatar, 'Group avatar', class: 'label-light label-block' + = render 'shared/choose_group_avatar_button', f: f - = render 'shared/visibility_level', f: f, visibility_level: visibility_level, can_change_visibility_level: can_change_group_visibility_level?(@group), form_model: @group + .form-group.col-xs-12.project-visibility-level-holder + = f.label :visibility_level, class: 'label-light' do + Visibility Level + = link_to icon('question-circle'), help_page_path("public_access/public_access") + = render('shared/visibility_radios', model_method: :visibility_level, form: f, can_change_visibility_level: can_change_group_visibility_level?(@group), selected_level: visibility_level, form_model: @group) - .form-group - .col-sm-offset-2.col-sm-10 - = render 'shared/allow_request_access', form: f + .form-group.col-xs-12 + = render 'shared/allow_request_access', form: f - = render 'groups/group_lfs_settings', f: f + = render 'groups/group_lfs_settings', f: f - - if @group.new_record? - .form-group - .col-sm-offset-2.col-sm-10 - .alert.alert-info - = render 'shared/group_tips' - .form-actions - = f.submit 'Create group', class: "btn btn-create" - = link_to 'Cancel', admin_groups_path, class: "btn btn-cancel" - - - else - .form-actions - = f.submit 'Save changes', class: "btn btn-save" - = link_to 'Cancel', admin_group_path(@group), class: "btn btn-cancel" + = f.submit "#{@group.new_record? ? 'Create group' : 'Save changes'}", class: 'btn btn-create' + = link_to 'Cancel', @group.new_record? ? admin_groups_path : admin_group_path(@group), class: 'btn btn-cancel' diff --git a/app/views/admin/groups/new.html.haml b/app/views/admin/groups/new.html.haml index 8f9fe96249f7..a57334b34a99 100644 --- a/app/views/admin/groups/new.html.haml +++ b/app/views/admin/groups/new.html.haml @@ -1,4 +1,2 @@ - page_title "New Group" -%h3.page-title New group -%hr = render 'form', visibility_level: default_group_visibility diff --git a/app/views/groups/_create_chat_team.html.haml b/app/views/groups/_create_chat_team.html.haml index 20de1b4c973c..bcdb631ca922 100644 --- a/app/views/groups/_create_chat_team.html.haml +++ b/app/views/groups/_create_chat_team.html.haml @@ -1,16 +1,14 @@ -.form-group - = f.label :create_chat_team, class: 'control-label' do +.form-group.col-xs-12 + = f.label :create_chat_team, class: 'label-block' do %span.mattermost-icon = custom_icon('icon_mattermost') Mattermost - .col-sm-10 - .checkbox.js-toggle-container - = f.label :create_chat_team do - .js-toggle-button= f.check_box(:create_chat_team, { checked: true }, true, false) - Create a Mattermost team for this group - %br - %small.light.js-toggle-content - Mattermost URL: - = Settings.mattermost.host - %span> / - %span{ "data-bind-out" => "create_chat_team" } + .checkbox.js-toggle-container + = f.label :create_chat_team, class: 'label-block' do + .js-toggle-button= f.check_box(:create_chat_team, { checked: true }, true, false) + Create a Mattermost team for this group + %small.hint.js-toggle-content + Mattermost URL: + = Settings.mattermost.host + %span> / + %span{ "data-bind-out" => "create_chat_team" } diff --git a/app/views/groups/_group_lfs_settings.html.haml b/app/views/groups/_group_lfs_settings.html.haml index 3c622ca5c3c8..9df36eb58272 100644 --- a/app/views/groups/_group_lfs_settings.html.haml +++ b/app/views/groups/_group_lfs_settings.html.haml @@ -1,11 +1,10 @@ - if current_user.admin? - .form-group - .col-sm-offset-2.col-sm-10 - .checkbox - = f.label :lfs_enabled do - = f.check_box :lfs_enabled, checked: @group.lfs_enabled? - %strong - Allow projects within this group to use Git LFS - = link_to icon('question-circle'), help_page_path('workflow/lfs/manage_large_binaries_with_git_lfs') - %br/ - %span.descr This setting can be overridden in each project. + .form-group.col-xs-12 + .checkbox + = f.label :lfs_enabled do + = f.check_box :lfs_enabled, checked: @group.lfs_enabled? + %strong + Allow projects within this group to use Git LFS + = link_to icon('question-circle'), help_page_path('workflow/lfs/manage_large_binaries_with_git_lfs') + %br/ + %span.descr This setting can be overridden in each project. diff --git a/app/views/groups/new.html.haml b/app/views/groups/new.html.haml index 08739ff7ed17..d51d88509af2 100644 --- a/app/views/groups/new.html.haml +++ b/app/views/groups/new.html.haml @@ -15,9 +15,7 @@ = render 'shared/group_form', f: f, autofocus: true .form-group.col-xs-12 - = f.label :description, class: 'label-light' do - Group avatar - %br + = f.label :description, 'Group avatar', class: 'label-light label-block' = render 'shared/choose_group_avatar_button', f: f .form-group.col-xs-12.project-visibility-level-holder @@ -28,5 +26,5 @@ = render 'create_chat_team', f: f if Gitlab.config.mattermost.enabled - = f.submit 'Create group', class: "btn btn-create", tabindex: 3 + = f.submit 'Create group', class: 'btn btn-create', tabindex: 3 = link_to 'Cancel', dashboard_groups_path, class: 'btn btn-cancel' diff --git a/app/views/shared/_choose_group_avatar_button.html.haml b/app/views/shared/_choose_group_avatar_button.html.haml index 96956ccc9d85..ec40f47f3984 100644 --- a/app/views/shared/_choose_group_avatar_button.html.haml +++ b/app/views/shared/_choose_group_avatar_button.html.haml @@ -4,4 +4,4 @@   %span.file_name.js-avatar-filename File name... = f.file_field :avatar, class: 'js-group-avatar-input hidden' -.lighter The maximum file size allowed is 200KB. +.hint The maximum file size allowed is 200KB. diff --git a/app/views/shared/_group_form.html.haml b/app/views/shared/_group_form.html.haml index 89e176bb9090..20b667f3921a 100644 --- a/app/views/shared/_group_form.html.haml +++ b/app/views/shared/_group_form.html.haml @@ -7,7 +7,6 @@ %span Group name = f.text_field :name, placeholder: 'open-source', class: 'form-control' -<<<<<<< HEAD .form-group.col-xs-12 = f.label :path, class: 'label-light' do %span Group path @@ -35,6 +34,6 @@ .form-group.col-xs-12 = f.label :description, class: 'label-light' do Description - %span.lighter (optional) + %span.hint (optional) = f.text_area :description, maxlength: 250, class: 'form-control js-gfm-input', rows: 4 diff --git a/app/views/shared/_group_tips.html.haml b/app/views/shared/_group_tips.html.haml deleted file mode 100644 index 46e4340511a5..000000000000 --- a/app/views/shared/_group_tips.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -%ul - %li A group is a collection of several projects - %li Members of a group may only view projects they have permission to access - %li Group project URLs are prefixed with the group namespace - %li Existing projects may be moved into a group -- GitLab From 153d844029d825b89816bff5b926b51f24cc9b51 Mon Sep 17 00:00:00 2001 From: "Luke \"Jared\" Bennett" Date: Wed, 5 Apr 2017 16:10:01 +0100 Subject: [PATCH 3/4] Review changes --- app/assets/stylesheets/pages/projects.scss | 2 +- app/helpers/icons_helper.rb | 5 ++++- app/views/admin/groups/_form.html.haml | 6 +++--- app/views/groups/new.html.haml | 6 +++--- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index 5cbd14974a5f..e654ead5f10b 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -304,7 +304,7 @@ color: $project-option-descr-color; } - .fa-lock { + .private { color: $red-500; } } diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb index ab3ef454e1c2..f17528b8b781 100644 --- a/app/helpers/icons_helper.rb +++ b/app/helpers/icons_helper.rb @@ -37,9 +37,12 @@ def boolean_to_icon(value) end def visibility_level_icon(level, fw: true) + options = {} + name = case level when Gitlab::VisibilityLevel::PRIVATE + options[:class] = 'private' 'lock' when Gitlab::VisibilityLevel::INTERNAL 'shield' @@ -49,7 +52,7 @@ def visibility_level_icon(level, fw: true) name << " fw" if fw - icon(name) + icon(name, options) end def file_type_icon_class(type, mode, name) diff --git a/app/views/admin/groups/_form.html.haml b/app/views/admin/groups/_form.html.haml index db4783f46d0f..584e1a78fec2 100644 --- a/app/views/admin/groups/_form.html.haml +++ b/app/views/admin/groups/_form.html.haml @@ -1,12 +1,12 @@ .row.prepend-top-default - .col-lg-3.profile-settings-sidebar + .col-xs-12.col-lg-3.profile-settings-sidebar %h4.prepend-top-0 New Group %p A group is a collection of several projects. Groups can be private, public or limited to any logged in users. You can move existing projects to a group. - .col-lg-9 + .col-xs-12.col-lg-9 = form_for [:admin, @group], html: { class: "form-horizontal" } do |f| = form_errors(@group) = render 'shared/group_form', f: f @@ -18,7 +18,7 @@ .form-group.col-xs-12.project-visibility-level-holder = f.label :visibility_level, class: 'label-light' do Visibility Level - = link_to icon('question-circle'), help_page_path("public_access/public_access") + = link_to icon('question-circle'), help_page_path("public_access/public_access"), 'aria-hidden' => 'true' = render('shared/visibility_radios', model_method: :visibility_level, form: f, can_change_visibility_level: can_change_group_visibility_level?(@group), selected_level: visibility_level, form_model: @group) .form-group.col-xs-12 diff --git a/app/views/groups/new.html.haml b/app/views/groups/new.html.haml index d51d88509af2..41cba5686871 100644 --- a/app/views/groups/new.html.haml +++ b/app/views/groups/new.html.haml @@ -2,14 +2,14 @@ - header_title "Groups", dashboard_groups_path .row.prepend-top-default - .col-lg-3.profile-settings-sidebar + .col-xs-12.col-lg-3.profile-settings-sidebar %h4.prepend-top-0 New Group %p A group is a collection of several projects. Groups can be private, public or limited to any logged in users. You can move existing projects to a group. - .col-lg-9 + .col-xs-12.col-lg-9 = form_for @group, html: { class: 'group-form form-horizontal gl-show-field-errors' } do |f| = form_errors(@group) = render 'shared/group_form', f: f, autofocus: true @@ -21,7 +21,7 @@ .form-group.col-xs-12.project-visibility-level-holder = f.label :visibility_level, class: 'label-light' do Visibility Level - = link_to icon('question-circle'), help_page_path("public_access/public_access") + = link_to icon('question-circle'), help_page_path("public_access/public_access"), 'aria-hidden' => 'true' = render('shared/visibility_radios', model_method: :visibility_level, form: f, can_change_visibility_level: true, selected_level: default_group_visibility, form_model: @group) = render 'create_chat_team', f: f if Gitlab.config.mattermost.enabled -- GitLab From f7723b8ebdc437feb731275d9a3cc109a6ce1761 Mon Sep 17 00:00:00 2001 From: "Luke \"Jared\" Bennett" Date: Mon, 10 Apr 2017 12:53:56 +0100 Subject: [PATCH 4/4] Apply changes since nested group changes --- app/assets/stylesheets/pages/projects.scss | 8 ++-- .../groups/_group_lfs_settings.html.haml | 10 ----- app/views/shared/_group_form.html.haml | 42 ++++++++----------- 3 files changed, 21 insertions(+), 39 deletions(-) delete mode 100644 app/views/groups/_group_lfs_settings.html.haml diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index 212bbcdddc83..4ca5683b6285 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -291,6 +291,10 @@ i { margin: 2px 0; font-size: 20px; + + &.private { + color: $red-500; + } } .option-title { @@ -303,10 +307,6 @@ margin-left: 29px; color: $project-option-descr-color; } - - .private { - color: $red-500; - } } } diff --git a/app/views/groups/_group_lfs_settings.html.haml b/app/views/groups/_group_lfs_settings.html.haml deleted file mode 100644 index 9df36eb58272..000000000000 --- a/app/views/groups/_group_lfs_settings.html.haml +++ /dev/null @@ -1,10 +0,0 @@ -- if current_user.admin? - .form-group.col-xs-12 - .checkbox - = f.label :lfs_enabled do - = f.check_box :lfs_enabled, checked: @group.lfs_enabled? - %strong - Allow projects within this group to use Git LFS - = link_to icon('question-circle'), help_page_path('workflow/lfs/manage_large_binaries_with_git_lfs') - %br/ - %span.descr This setting can be overridden in each project. diff --git a/app/views/shared/_group_form.html.haml b/app/views/shared/_group_form.html.haml index 50f432880f9e..b364ffe64350 100644 --- a/app/views/shared/_group_form.html.haml +++ b/app/views/shared/_group_form.html.haml @@ -6,27 +6,19 @@ .form-group.col-xs-12 = f.label :path, class: 'label-light' do - %span Group path - .col-sm-10 - .input-group.gl-field-error-anchor - .group-root-path.input-group-addon.has-tooltip{ title: group_path, :'data-placement' => 'bottom' } - %span>= root_url - - if parent - %strong= parent.full_path + '/' - = f.text_field :path, placeholder: 'open-source', class: 'form-control', - autofocus: local_assigns[:autofocus] || false, required: true, - pattern: Gitlab::Regex::NAMESPACE_REGEX_STR_JS, - title: 'Please choose a group path with no special characters.', - "data-bind-in" => "#{'create_chat_team' if Gitlab.config.mattermost.enabled}" + Group path + .input-group.gl-field-error-anchor + .group-root-path.input-group-addon.has-tooltip{ title: group_path, :'data-placement' => 'bottom' } + %span>= root_url - if parent %strong= parent.full_path + '/' - = f.text_field :path, placeholder: 'open-source', class: 'form-control', + = f.text_field :path, placeholder: 'group-path', class: 'form-control', autofocus: local_assigns[:autofocus] || false, required: true, pattern: Gitlab::Regex::NAMESPACE_REGEX_STR_JS, - title: 'Please choose a group name with no special characters.', + title: 'Please choose a group path with no special characters.', "data-bind-in" => "#{'create_chat_team' if Gitlab.config.mattermost.enabled}" - - if parent - = f.hidden_field :parent_id, value: parent.id + - if parent + = f.hidden_field :parent_id, value: parent.id - if @group.persisted? .alert.alert-warning.prepend-top-10 @@ -37,15 +29,15 @@ %li It will change the git path to repositories under this group. .form-group.group-name-holder.col-xs-12 - = f.label :name, class: 'control-label' do + = f.label :name, class: 'label-light' do Group name - .col-sm-10 - = f.text_field :name, class: 'form-control', - required: true, - title: 'You can choose a descriptive name different from the path.' + = f.text_field :name, placeholder: 'Group name', class: 'form-control', + required: true, + title: 'You can choose a descriptive name different from the path.' .form-group.group-description-holder.col-xs-12 - = f.label :description, class: 'control-label' - .col-sm-10 - = f.text_area :description, maxlength: 250, - class: 'form-control js-gfm-input', rows: 4 + = f.label :description, class: 'label-light' do + Description + %span.hint (optional) + = f.text_area :description, maxlength: 250, + class: 'form-control js-gfm-input', rows: 4 -- GitLab