Commit 76ae76cf authored by samdbeckham's avatar samdbeckham

Added the correct checkbox markup for the push rules

parent 1302eb7c
......@@ -3,10 +3,9 @@
- form = local_assigns.fetch(:form)
- push_rule = local_assigns.fetch(:push_rule)
.form-group
= form.check_box :commit_committer_check, class: "float-left", disabled: !can_change_push_rule?(form.object, :commit_committer_check)
.prepend-left-20
= form.label :commit_committer_check, class: "label-light append-bottom-0" do
= s_("PushRule|Committer restriction")
%p.light.append-bottom-0
= commit_committer_check_description(push_rule)
.form-check
= form.check_box :commit_committer_check, class: "form-check-input", disabled: !can_change_push_rule?(form.object, :commit_committer_check)
= form.label :commit_committer_check, class: "label-light form-check-label" do
= s_("PushRule|Committer restriction")
%p.text-muted
= commit_committer_check_description(push_rule)
......@@ -2,33 +2,30 @@
= render 'shared/push_rules/reject_unsigned_commits_setting', form: f, push_rule: f.object
.form-group
= f.check_box :deny_delete_tag, class: "float-left"
.prepend-left-20
= f.label :deny_delete_tag, class: "label-light append-bottom-0" do
Do not allow users to remove git tags with
%code git push
%p.light.append-bottom-0
Tags can still be deleted through the web UI.
.form-check
= f.check_box :deny_delete_tag, class: "form-check-input"
= f.label :deny_delete_tag, class: "label-light form-check-label" do
Do not allow users to remove git tags with
%code git push
%p.text-muted
Tags can still be deleted through the web UI.
.form-group
= f.check_box :member_check, class: "float-left"
.prepend-left-20
= f.label :member_check, "Check whether author is a GitLab user", class: "label-light append-bottom-0"
%p.light.append-bottom-0
Restrict commits by author (email) to existing GitLab users
.form-check
= f.check_box :member_check, class: "form-check-input"
= f.label :member_check, "Check whether author is a GitLab user", class: "label-light form-check-label"
%p.text-muted
Restrict commits by author (email) to existing GitLab users
.form-group
= f.check_box :prevent_secrets, class: "float-left"
.prepend-left-20
= f.label :prevent_secrets, "Prevent committing secrets to Git", class: "label-light append-bottom-0"
%p.light.append-bottom-0
GitLab will reject any files that are likely to contain secrets.
The list of file names we reject is available in the #{link_to "documentation", help_page_path('push_rules/push_rules')}.
.form-check
= f.check_box :prevent_secrets, class: "form-check-input"
= f.label :prevent_secrets, "Prevent committing secrets to Git", class: "label-light form-check-label"
%p.text-muted
GitLab will reject any files that are likely to contain secrets.
The list of file names we reject is available in the #{link_to "documentation", help_page_path('push_rules/push_rules')}.
.form-group
= f.label :commit_message_regex, "Commit message", class: 'label-light'
= f.label :commit_message_regex, "Commit message", class: "label-light"
= f.text_field :commit_message_regex, class: "form-control", placeholder: 'Example: Fixes \d+\..*'
.form-text.text-muted
All commit messages must match this
......@@ -38,7 +35,7 @@
For example you can require that an issue number is always mentioned in the commit message.
.form-group
= f.label :branch_name_regex, "Branch name", class: 'label-light'
= f.label :branch_name_regex, "Branch name", class: "label-light"
= f.text_field :branch_name_regex, class: "form-control", placeholder: 'Example: (feature|hotfix)\/*'
.form-text.text-muted
All branch names must match this
......@@ -47,7 +44,7 @@
If this field is empty it allows any branch name.
.form-group
= f.label :author_email_regex, "Commit author's email", class: 'label-light'
= f.label :author_email_regex, "Commit author's email", class: "label-light"
= f.text_field :author_email_regex, class: "form-control", placeholder: 'Example: @my-company.com$'
.form-text.text-muted
All commit author's email must match this
......@@ -56,7 +53,7 @@
If this field is empty it allows any email.
.form-group
= f.label :file_name_regex, "Prohibited file names", class: 'label-light'
= f.label :file_name_regex, "Prohibited file names", class: "label-light"
= f.text_field :file_name_regex, class: "form-control", placeholder: 'Example: (jar|exe)$'
.form-text.text-muted
All commited filenames must not match this
......@@ -65,7 +62,7 @@
If this field is empty it allows any filenames.
.form-group
= f.label :max_file_size, "Maximum file size (MB)", class: 'label-light'
= f.label :max_file_size, "Maximum file size (MB)", class: "label-light"
= f.number_field :max_file_size, class: "form-control", min: 0
.form-text.text-muted
Pushes that contain added or updated files that exceed this file size are rejected.
......
......@@ -3,10 +3,9 @@
- form = local_assigns.fetch(:form)
- push_rule = local_assigns.fetch(:push_rule)
.form-group
= form.check_box :reject_unsigned_commits, class: "float-left", disabled: !can_change_push_rule?(form.object, :reject_unsigned_commits)
.prepend-left-20
= form.label :reject_unsigned_commits, class: "label-light append-bottom-0" do
Reject unsigned commits
%p.light.append-bottom-0
= reject_unsigned_commits_description(push_rule)
.form-check
= form.check_box :reject_unsigned_commits, class: "form-check-input", disabled: !can_change_push_rule?(form.object, :reject_unsigned_commits)
= form.label :reject_unsigned_commits, class: "label-light form-check-label" do
Reject unsigned commits
%p.text-muted
= reject_unsigned_commits_description(push_rule)
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