[UPDT] RECRUITMENT: Updated send mail preview url method from GET to POST

This commit is contained in:
Horilla
2025-02-28 15:10:28 +05:30
parent 57fe4f2014
commit f228f91dc5
2 changed files with 4 additions and 3 deletions

View File

@@ -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">

View File

@@ -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: