Commit 15a4a7d5 authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray Committed by Jose Ivan Vargas

Update approval input using checkbox

parent 060fd0a5
......@@ -366,6 +366,11 @@ import Vue from 'vue';
});
};
})(this));
$('#require_approvals').on('change', (e) => {
var $approvalInput = $('#project_approvals_before_merge');
$approvalInput.val($('#require_approvals').prop("checked") ? 1 : 0);
});
}
UsersSelect.prototype.initSelection = function(element, callback) {
......
......@@ -45,8 +45,8 @@
.form-group.reset-approvals-on-push
.checkbox
= form.label :approvals_before_merge do
= form.check_box :approvals_before_merge
= label_tag :require_approvals do
= check_box_tag :require_approvals
%strong Activate merge request approvals
//TODO: correct help path
= link_to icon('question-circle'), "https://docs.gitlab.com/ee/user/project/merge_requests/merge_request_approvals.html#merge-request-approvals", target: '_blank'
......@@ -91,9 +91,8 @@
.form-group
= form.label :approvals_before_merge, class: 'label-light' do
Approvals required
= form.number_field :approvals_before_merge, class: "form-control"
= form.number_field :approvals_before_merge, class: "form-control", min: 0
.help-block
NUMBER approvals are required, from the above list you specified
.form-group.reset-approvals-on-push
.checkbox
......
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