Commit d70591cc authored by Florian Joriot's avatar Florian Joriot
Browse files

Merge remote-tracking branch 'origin/b24' into b24

parents 75da7ce0 ccd85aff
Loading
Loading
Loading
Loading
Loading
+1 −1
Changes for module/Intervenant/src/Controller/NoteController.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -150,7 +150,7 @@ class NoteController extends AbstractController
                $mail->text($content);
                $mail->html($content);
                if (!empty($copy)) {
                    $mail->cc($copy);
                   $mail->bcc(...array_map('trim', explode(';', $copy)));
                }
                $this->getMailService()->send($mail);
                //Création d'une trace de l'envoi dans les notes de l'intervenant
+12 −1
Changes for module/Intervenant/view/intervenant/note/envoyer-email.phtml: 12 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -26,12 +26,23 @@ echo $this->form()->closeTag();
        var selector = "textarea#<?= $form->get('content')->getAttribute('id') ?>";
        var form = $("form#<?= $form->getAttribute('id') ?>");
        var message = "Êtes-vous sûr(e) de vouloir envoyer ce message à l'intervenant ?";
        var copyFormatError = $('<div class="alert alert-danger" role="alert" style="display:none"></div>')
            .prependTo(form);


        installEditor(selector, form);

        //  avant de POSTer
        //  avant le POST verification de la construction des adresse mail
        form.submit(function (e) {
            var copy = form.find('[name="copy"]').val();
            if (copy.includes(',') || copy.includes('/')) {
                e.preventDefault();
                e.stopPropagation();
                copyFormatError.text('Format incorrect : séparez les adresses par des points-virgules (;).').show();
                return;
            }
            copyFormatError.hide();

            if (!confirm(message)) {
                e.preventDefault();
                e.stopPropagation();