Skip to content

Commit e0d7a70

Browse files
authored
Merge pull request #18892 from eduardoj/fix/issue_18788
Fix form jQuery selector to correctly match a form with id suffix
2 parents 78c0548 + 203f7b8 commit e0d7a70

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/api/app/components/request_decision_component.html.haml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@
8282
});
8383

8484
// Only require the text if submitting a comment, declining or reopening
85-
$('#request_handle_form [name=revoked], #request_handle_form [name=accepted]').on('click', function () {
86-
$('#request_handle_form #new_comment_body').removeAttr('required');
85+
$('[id^="request_handle_form_"]').find('[name=revoked], [name=accepted]').on('click', function () {
86+
$('#new_comment_body').removeAttr('required');
8787
});
88-
$('#request_handle_form [name=new], #request_handle_form [name=declined], #request_handle_form [name=commented]').on('click', function () {
89-
$('#request_handle_form #new_comment_body').attr('required', 'required');
88+
$('[id^="request_handle_form_"]').find('[name=new], [name=declined], [name=commented]').on('click', function () {
89+
$('#new_comment_body').attr('required', 'required');
9090
});

0 commit comments

Comments
 (0)