diff --git a/css/gamumail.css b/css/gamumail.css index 2d72a1d..39dbfdf 100644 --- a/css/gamumail.css +++ b/css/gamumail.css @@ -205,6 +205,14 @@ width: 50px; } +.editer_repondre_a { + display: flex; +} + +.editer_repondre_a label { + width: 120px; +} + .reponse_formulaire { padding: 1rem; margin-bottom: 2rem; diff --git a/formulaires/gamumail.html b/formulaires/gamumail.html index 5bed229..6b38840 100644 --- a/formulaires/gamumail.html +++ b/formulaires/gamumail.html @@ -29,7 +29,7 @@ - +
#SET{name,envoi_separe} #SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}} @@ -46,7 +46,7 @@
- +
@@ -71,6 +71,19 @@
+ +
+ #SET{name,repondre_a} + #SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}} + #SET{obli,"obligatoire"} +
+ + [(#GET{erreurs})] + +
+
+ +
#SET{name,sujet} #SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}} diff --git a/formulaires/gamumail.php b/formulaires/gamumail.php index e618059..d9f390d 100644 --- a/formulaires/gamumail.php +++ b/formulaires/gamumail.php @@ -26,6 +26,7 @@ function formulaires_gamumail_charger_dist($slug, $destinataires = 0, $Tclient = $Tcc = lire_config('gamumail/mail_cc') !== '' ? explode(',', lire_config('gamumail/mail_cc', '')) : []; $Tcci = lire_config('gamumail/mail_cci') !== '' ? explode(',', lire_config('gamumail/mail_cci', '')) : []; + $Trepondre_a = lire_config('gamumail/mail_repondre_a') !== '' ? explode(',', lire_config('gamumail/mail_repondre_a', '')) : []; if (!empty($destinataires) and !is_array($destinataires)) { $destinataires = explode(',', $destinataires); @@ -81,6 +82,7 @@ function formulaires_gamumail_charger_dist($slug, $destinataires = 0, $Tclient = 'pour' => implode(',', $Tmails), 'cc' => implode(',', $Tcc), 'cci' => implode(',', $Tcci), + 'repondre_a' => implode(',', $Trepondre_a), 'TFichierpdfs' => $TFichierPdf, 'Tpdfs_ok' => [], 'docs_spip' => $gamuMail['id_docs'] ?? '', @@ -250,11 +252,13 @@ function formulaires_gamumail_traiter_dist($slug, $destinataires = 0, $Tclient = function gamuSend($slug, $options, $destinataires, $Tclient, $Tpdf, $redirect, &$retour = []) { - $cc = _request('cc'); - $cci = _request('cci'); + $cc = _request('cc'); + $cci = _request('cci'); + $repondre_a = _request('repondre_a'); $cc = explode(',', $cc); $cci = explode(',', $cci); + $repondre_a = explode(',', $repondre_a); $sujet = _request('sujet'); $html = propre(_request('texte')); @@ -400,6 +404,9 @@ function gamuSend($slug, $options, $destinataires, $Tclient, $Tpdf, $redirect, & 'cci' => $cci, 'pieces_jointes' => $pieces_jointes ]; + if ($repondre_a) { + $corps['repondre_a'] = $repondre_a; + } // surcharges de traiter : d'abord les surcharges pour tous les slugs (tous_traiter.php) puis les spécifiques par slug (nom_slug_traiter.php)