refactor: inline the ERB template instead of passing via a data-path (#13657)
This commit is contained in:
parent
a0ddb6a848
commit
355d510f88
1 changed files with 6 additions and 6 deletions
|
|
@ -145,7 +145,7 @@
|
|||
<%= text_area_tag :affected_email_body, affected_email_details[:body], class: "form-control my-1", style: "height: 300px;", id: "affected__body__#{feedback_message.id}" %>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-primary" type="button" id="send__email__btn__<%= feedback_message.id %>" data-path="<%= send_email_admin_reports_path %>">Send Email ✉️</button>
|
||||
<button class="btn btn-primary" type="button" id="send__email__btn__<%= feedback_message.id %>">Send Email ✉️</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="email__alert alert w-100 mt-2 d-none" id="email__alert__<%= feedback_message.id %>">
|
||||
|
|
@ -154,7 +154,7 @@
|
|||
<div class="col-12">
|
||||
<h3>Status:</h3>
|
||||
<%= f.select :status, %w[Open Invalid Resolved], {}, id: "status__#{feedback_message.id}" %>
|
||||
<button class="btn btn-primary d-block mt-3" type="button" id="save__status__<%= feedback_message.id %>" data-path="<%= save_status_admin_reports_path %>">Save Status</button>
|
||||
<button class="btn btn-primary d-block mt-3" type="button" id="save__status__<%= feedback_message.id %>">Save Status</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row my-3">
|
||||
|
|
@ -187,7 +187,7 @@
|
|||
class="notefield"
|
||||
id="note__content__<%= feedback_message.id %>"
|
||||
required>
|
||||
<button class="btn btn-primary" type="button" id="note__submit__<%= feedback_message.id %>" data-path="<%= create_note_admin_reports_path %>">Submit Note 📝</button>
|
||||
<button class="btn btn-primary" type="button" id="note__submit__<%= feedback_message.id %>">Submit Note 📝</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -210,7 +210,7 @@
|
|||
formData.append('id', id);
|
||||
formData.append('status', statusSelectTag.options[statusSelectTag.selectedIndex].value);
|
||||
|
||||
fetch(statusBtn.dataset.path, {
|
||||
fetch("<%= save_status_admin_reports_path %>", {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-Token': document.querySelector("meta[name='csrf-token']").content,
|
||||
|
|
@ -277,7 +277,7 @@
|
|||
formData.append('email_subject', subjectLine);
|
||||
formData.append('email_type', userType);
|
||||
|
||||
fetch(sendEmailBtn.dataset.path, {
|
||||
fetch("<%= send_email_admin_reports_path %>", {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-Token': document.querySelector("meta[name='csrf-token']").content,
|
||||
|
|
@ -347,7 +347,7 @@
|
|||
formData.append('noteable_type', document.getElementById('note__noteable-type__' + id).value)
|
||||
formData.append('author_id', document.getElementById('note__author-id__' + id).value)
|
||||
|
||||
fetch(submitNoteBtn.dataset.path, {
|
||||
fetch("<%= create_note_admin_reports_path %>", {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'X-CSRF-Token': document.querySelector("meta[name='csrf-token']").content,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue