Fixed submission-field Button Disabling (#22825)
* Fixed buttons disabling when submission-field exists but does not have data-submissions-enabled; * ===
This commit is contained in:
Родитель
da0d02c7d9
Коммит
f2047381d0
|
@ -47,10 +47,11 @@ $(document).ready(function () {
|
|||
initUploadPreview();
|
||||
});
|
||||
|
||||
// disable buttons if submission is disabled
|
||||
// disable buttons if submission is explicitly disabled
|
||||
const submissionField = $('#submission-field');
|
||||
const submissionsDisabled =
|
||||
submissionField && !submissionField.data('submissions-enabled');
|
||||
submissionField && submissionField.data('submissions-enabled') === false;
|
||||
|
||||
$('.submission-buttons .button').toggleClass('disabled', submissionsDisabled);
|
||||
|
||||
// Add-on uploader
|
||||
|
|
Загрузка…
Ссылка в новой задаче