[UPDT] RECRUITMENT: Updated send mail preview url method from GET to POST
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
{% load i18n %}
|
||||
<button hidden id="previewHxButton" hx-get="{% url 'get-mail-preview' %}?candidate_id={{cand.id}}" hx-target="#preview"
|
||||
<button hidden id="previewHxButton" hx-post="{% url 'get-mail-preview' %}?candidate_id={{cand.id}}" hx-target="#preview"
|
||||
hx-include="#writeField"
|
||||
hx-on-htmx-before-request="if (!$('#template').val()) { event.preventDefault(); }"></button>
|
||||
hx-on-htmx-before-request="if (!$('#template').val()) { event.preventDefault(); }">
|
||||
</button>
|
||||
<div id="ack-message-{{cand.id}}"></div>
|
||||
|
||||
<div class="oh-modal__dialog-header">
|
||||
|
||||
@@ -447,7 +447,7 @@ def get_mail_preview(request):
|
||||
"""
|
||||
This method is used to return the mail template preview as an HTTP response.
|
||||
"""
|
||||
body = request.GET.get("body")
|
||||
body = request.POST.get("body")
|
||||
candidate_id = request.GET.get("candidate_id")
|
||||
|
||||
if not body:
|
||||
|
||||
Reference in New Issue
Block a user