From 57912c1b31b7a03dd90ce6f950cf1b949b502e9c Mon Sep 17 00:00:00 2001 From: Julien Cougnaud Date: Fri, 20 Sep 2024 17:46:49 +0200 Subject: [PATCH] [OS-1257] Fix the sending of an updated email --- templates/admission/continuing_education/checklist.html | 7 +++++++ .../includes/checklist/decision_cancel_form.html | 1 + .../includes/checklist/decision_deny_form.html | 1 + .../includes/checklist/decision_fac_approval_form.html | 1 + .../includes/checklist/decision_hold_form.html | 1 + .../includes/checklist/decision_send_to_fac_form.html | 1 + .../includes/checklist/decision_validation_form.html | 1 + 7 files changed, 13 insertions(+) diff --git a/templates/admission/continuing_education/checklist.html b/templates/admission/continuing_education/checklist.html index 646ec1d1d..a6db81ce1 100644 --- a/templates/admission/continuing_education/checklist.html +++ b/templates/admission/continuing_education/checklist.html @@ -528,6 +528,13 @@ htmx.trigger('#' + this.id, 'modal-reload'); }); + // Pass the ckeditor data to the form data if necessary + $(document).on('click', '.ckeditor-form [name="save"]', function(event) { + $(this).closest('form').find("textarea").each(function() { + const editor = CKEDITOR.instances[$(this).attr('id')]; + if (editor) editor.updateElement(); + }); + }); })(jQuery); {% endblock script %} diff --git a/templates/admission/continuing_education/includes/checklist/decision_cancel_form.html b/templates/admission/continuing_education/includes/checklist/decision_cancel_form.html index 0d423c0ae..3b0576333 100644 --- a/templates/admission/continuing_education/includes/checklist/decision_cancel_form.html +++ b/templates/admission/continuing_education/includes/checklist/decision_cancel_form.html @@ -30,6 +30,7 @@ hx-swap="outerHTML" style="overflow: auto;" id="decision-cancel-form" + class="ckeditor-form" >