Commit 304fc4ae authored by Alfredo Sumaran's avatar Alfredo Sumaran

Disable submit button when required data is missing

[ci skip]
parent 312d3370
......@@ -41,9 +41,7 @@
const $allowedToMergeInputs = this.$wrap.find('input[name^="protected_branch[merge_access_levels_attributes]"]');
const $allowedToPushInputs = this.$wrap.find('input[name^="protected_branch[push_access_levels_attributes]"]');
if ($branchInput.val() && $allowedToMergeInputs.length && $allowedToPushInputs.length){
this.$form.find('input[type="submit"]').removeAttr('disabled');
}
this.$form.find('input[type="submit"]').attr('disabled', !($branchInput.val() && $allowedToMergeInputs.length && $allowedToPushInputs.length));
}
}
......
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