[UPDT] BASE: Send mail preview function updated
This commit is contained in:
@@ -176,13 +176,13 @@
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function previewMail(){
|
||||
var id = $('#template').val();
|
||||
var body = $('#ack-form-{{cand.id}} [name="body"]').val()
|
||||
if (id.length) {
|
||||
if (body && body.trim() !== '') {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: `/recruitment/get-mail-preview/${id}/`,
|
||||
url: `/recruitment/get-mail-preview/`,
|
||||
data: { "candidate_id": "{{cand.id}}", "body":body },
|
||||
dataType: "Json",
|
||||
success: function (response) {
|
||||
|
||||
@@ -471,7 +471,7 @@ urlpatterns = [
|
||||
name="skill-zone-cand-delete",
|
||||
),
|
||||
path("get-template/<int:obj_id>/", get_template, name="get-template"),
|
||||
path("get-mail-preview/<int:obj_id>/", get_mail_preview, name="get-mail-preview"),
|
||||
path("get-mail-preview/", get_mail_preview, name="get-mail-preview"),
|
||||
path("get-template-hint/", get_template_hint, name="get-template-hint"),
|
||||
path(
|
||||
"create-candidate-rating/<int:cand_id>/",
|
||||
|
||||
@@ -443,7 +443,7 @@ def get_template_hint(request, obj_id=None):
|
||||
|
||||
|
||||
@login_required
|
||||
def get_mail_preview(request, obj_id=None):
|
||||
def get_mail_preview(request):
|
||||
"""
|
||||
This method is used to return the mail template
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user