From 988b28ec1a379d38f6ac9ed04886ee564fd447fd Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 2 Mar 2020 12:07:57 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../admin/application_settings/_visibility_and_access.html.haml | 5 ++--- app/views/groups/settings/_permissions.html.haml | 1 + app/views/shared/_default_branch_protection.html.haml | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 app/views/shared/_default_branch_protection.html.haml (limited to 'app/views') diff --git a/app/views/admin/application_settings/_visibility_and_access.html.haml b/app/views/admin/application_settings/_visibility_and_access.html.haml index ae90ffd9efc..a4acbe6c885 100644 --- a/app/views/admin/application_settings/_visibility_and_access.html.haml +++ b/app/views/admin/application_settings/_visibility_and_access.html.haml @@ -2,9 +2,8 @@ = form_errors(@application_setting) %fieldset - .form-group - = f.label :default_branch_protection, class: 'label-bold' - = f.select :default_branch_protection, options_for_select(Gitlab::Access.protection_options, @application_setting.default_branch_protection), {}, class: 'form-control' + = render 'shared/default_branch_protection', f: f, selected_level: @application_setting.default_branch_protection + .form-group = f.label s_('ProjectCreationLevel|Default project creation protection'), class: 'label-bold' = f.select :default_project_creation, options_for_select(Gitlab::Access.project_creation_options, @application_setting.default_project_creation), {}, class: 'form-control' diff --git a/app/views/groups/settings/_permissions.html.haml b/app/views/groups/settings/_permissions.html.haml index 618cfe57be4..016a9c8e054 100644 --- a/app/views/groups/settings/_permissions.html.haml +++ b/app/views/groups/settings/_permissions.html.haml @@ -33,6 +33,7 @@ = render_if_exists 'groups/settings/ip_restriction', f: f, group: @group = render_if_exists 'groups/settings/allowed_email_domain', f: f, group: @group = render 'groups/settings/lfs', f: f + = render 'shared/default_branch_protection', f: f, selected_level: @group.default_branch_protection = render 'groups/settings/project_creation_level', f: f, group: @group = render 'groups/settings/subgroup_creation_level', f: f, group: @group = render 'groups/settings/two_factor_auth', f: f diff --git a/app/views/shared/_default_branch_protection.html.haml b/app/views/shared/_default_branch_protection.html.haml new file mode 100644 index 00000000000..d7ae21debd8 --- /dev/null +++ b/app/views/shared/_default_branch_protection.html.haml @@ -0,0 +1,3 @@ +.form-group + = f.label :default_branch_protection, class: 'label-bold' + = f.select :default_branch_protection, options_for_select(Gitlab::Access.protection_options, selected_level), {}, class: 'form-control' -- cgit v1.2.1