Show More
@@ -41,10 +41,10 b' var prButtonLock = function(lockEnabled,' | |||||
41 | } |
|
41 | } | |
42 | var checksMeet = prButtonLockChecks.compare && prButtonLockChecks.reviewers; |
|
42 | var checksMeet = prButtonLockChecks.compare && prButtonLockChecks.reviewers; | |
43 | if (lockEnabled) { |
|
43 | if (lockEnabled) { | |
44 |
$('# |
|
44 | $('#pr_submit').attr('disabled', 'disabled'); | |
45 | } |
|
45 | } | |
46 | else if (checksMeet) { |
|
46 | else if (checksMeet) { | |
47 |
$('# |
|
47 | $('#pr_submit').removeAttr('disabled'); | |
48 | } |
|
48 | } | |
49 |
|
49 | |||
50 | if (msg) { |
|
50 | if (msg) { |
@@ -98,7 +98,7 b'' | |||||
98 | </div> |
|
98 | </div> | |
99 | <div class="input"> |
|
99 | <div class="input"> | |
100 | <div class="pr-submit-button"> |
|
100 | <div class="pr-submit-button"> | |
101 |
${ |
|
101 | <input id="pr_submit" class="btn" name="save" type="submit" value="${_('Submit Pull Request')}"> | |
102 | </div> |
|
102 | </div> | |
103 | <div id="pr_open_message"></div> |
|
103 | <div id="pr_open_message"></div> | |
104 | </div> |
|
104 | </div> | |
@@ -171,6 +171,7 b'' | |||||
171 | var defaultTargetRepoData = ${c.default_repo_data['target_refs_json']|n}; |
|
171 | var defaultTargetRepoData = ${c.default_repo_data['target_refs_json']|n}; | |
172 |
|
172 | |||
173 | var $pullRequestForm = $('#pull_request_form'); |
|
173 | var $pullRequestForm = $('#pull_request_form'); | |
|
174 | var $pullRequestSubmit = $('#pr_submit', $pullRequestForm); | |||
174 | var $sourceRepo = $('#source_repo', $pullRequestForm); |
|
175 | var $sourceRepo = $('#source_repo', $pullRequestForm); | |
175 | var $targetRepo = $('#target_repo', $pullRequestForm); |
|
176 | var $targetRepo = $('#target_repo', $pullRequestForm); | |
176 | var $sourceRef = $('#source_ref', $pullRequestForm); |
|
177 | var $sourceRef = $('#source_ref', $pullRequestForm); | |
@@ -510,6 +511,10 b'' | |||||
510 |
|
511 | |||
511 | }); |
|
512 | }); | |
512 |
|
513 | |||
|
514 | $pullRequestForm.on('submit', function(e){ | |||
|
515 | prButtonLock(true, null, 'all'); | |||
|
516 | }); | |||
|
517 | ||||
513 | prButtonLock(true, "${_('Please select source and target')}", 'all'); |
|
518 | prButtonLock(true, "${_('Please select source and target')}", 'all'); | |
514 |
|
519 | |||
515 | // auto-load on init, the target refs select2 |
|
520 | // auto-load on init, the target refs select2 |
General Comments 0
You need to be logged in to leave comments.
Login now