Skip to content

Commit

Permalink
Make feedback button ID more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
Splines committed Oct 22, 2023
1 parent 6e8c769 commit 7f60853
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/assets/javascripts/feedback.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ function registerToasts() {
}

function registerSubmitButtonHandler() {
const submitButton = $('#submit-form-btn');
const submitButton = $('#submit-feedback-form-btn');

// Invoke the hidden submit button inside the actual Rails form
$('#submit-form-btn-outside').click(() => {
$('#submit-feedback-form-btn-outside').click(() => {
submitButton.click();
});

Expand Down
4 changes: 2 additions & 2 deletions app/views/feedbacks/_feedback_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

<%# Submit %>
<%# Dummy submit button, the actual submit button is in the modal footer %>
<%= f.submit 'Submit', id: 'submit-form-btn', style: 'display: none;' %>
<%= f.submit 'Submit', id: 'submit-feedback-form-btn', style: 'display: none;' %>
<% end %>
</div>

Expand All @@ -56,7 +56,7 @@
</button>

<%# Submit %>
<button type="button" id="submit-form-btn-outside" class="btn btn-primary">
<button type="button" id="submit-feedback-form-btn-outside" class="btn btn-primary">
<%= t('buttons.send_variant') %>
</button>
</div>

0 comments on commit 7f60853

Please sign in to comment.