Don't require a comment for clear pending rejection/clear needs human review (#20881)
+ drive by cleanup: JS code for set needs human review is no longer needed since it's a regular action and not a button calling the API now.
This commit is contained in:
Родитель
445458fe84
Коммит
b204dde19e
|
@ -738,6 +738,7 @@ class ReviewHelper:
|
|||
),
|
||||
'multiple_versions': True,
|
||||
'minimal': True,
|
||||
'comments': False,
|
||||
'available': is_appropriate_admin_reviewer,
|
||||
}
|
||||
actions['clear_needs_human_review_multiple_versions'] = {
|
||||
|
@ -749,6 +750,7 @@ class ReviewHelper:
|
|||
),
|
||||
'multiple_versions': True,
|
||||
'minimal': True,
|
||||
'comments': False,
|
||||
'available': is_appropriate_admin_reviewer,
|
||||
}
|
||||
actions['set_needs_human_review_multiple_versions'] = {
|
||||
|
|
|
@ -261,20 +261,6 @@ function initExtraReviewActions() {
|
|||
}),
|
||||
);
|
||||
|
||||
$('#set_needs_human_review').click(
|
||||
_pd(function () {
|
||||
var $button = $(this).prop('disabled', true); // Prevent double-send.
|
||||
var apiUrl = $button.data('api-url');
|
||||
var data = $button.data('api-data') || null;
|
||||
var $due_date_update_input = $('#due_date_update');
|
||||
callReviewersAPI(apiUrl, 'post', data, function (response) {
|
||||
$button.remove();
|
||||
$due_date_update_input.parents('li').removeClass('hidden').show();
|
||||
$due_date_update_input.val(response.due_date);
|
||||
});
|
||||
}),
|
||||
);
|
||||
|
||||
// One-off-style buttons.
|
||||
$('.more-actions button.oneoff[data-api-url]').click(
|
||||
_pd(function () {
|
||||
|
|
Загрузка…
Ссылка в новой задаче