diff options
| author | polo <ordipolo@gmx.fr> | 2025-07-04 10:29:45 +0200 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2025-07-04 10:29:45 +0200 |
| commit | 3104104e838b7d57de49daba0178b1aefe646548 (patch) | |
| tree | 8af33f7bb83ccfef04b6e82a0fcd687ef475d455 /src/view/FormBuilder.php | |
| parent | 2d7bacce891eab0adb0263d598bfe44418788f42 (diff) | |
| download | cms-3104104e838b7d57de49daba0178b1aefe646548.tar.gz cms-3104104e838b7d57de49daba0178b1aefe646548.tar.bz2 cms-3104104e838b7d57de49daba0178b1aefe646548.zip | |
formulaire de contact 4
Diffstat (limited to 'src/view/FormBuilder.php')
| -rw-r--r-- | src/view/FormBuilder.php | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/view/FormBuilder.php b/src/view/FormBuilder.php index 508763b..7a2adcb 100644 --- a/src/view/FormBuilder.php +++ b/src/view/FormBuilder.php | |||
| @@ -22,27 +22,21 @@ class FormBuilder extends AbstractBuilder | |||
| 22 | $captcha = new Captcha; | 22 | $captcha = new Captcha; |
| 23 | $_SESSION['captcha'] = $captcha->getSolution(); | 23 | $_SESSION['captcha'] = $captcha->getSolution(); |
| 24 | 24 | ||
| 25 | $email = $email ?? Config::$email_dest; | ||
| 26 | |||
| 25 | $admin_content = ''; | 27 | $admin_content = ''; |
| 26 | if($_SESSION['admin']) | 28 | if($_SESSION['admin']) |
| 27 | { | 29 | { |
| 28 | $admin_content = '' | 30 | $admin_content = '<div class="admin_form"> |
| 29 | //. '<h3>Configuration du formulaire</h3>' . "\n" | 31 | <p> |
| 30 | . '<div class="admin_form">' . "\n" | 32 | <label for="recipient">E-mail de destination de ce formulaire</label> |
| 31 | /*. '<p> | ||
| 32 | <label for="recipient">E-mail de destination</label> | ||
| 33 | <input id="recipient" type="email" name="recipient" placeholder="mon-adresse@email.fr" value="' . $email . '"> | 33 | <input id="recipient" type="email" name="recipient" placeholder="mon-adresse@email.fr" value="' . $email . '"> |
| 34 | <input type="hidden" id="recipient_hidden" value=""> | 34 | <input type="hidden" id="recipient_hidden" value=""> |
| 35 | <button onclick="changeRecipient(' . $node->getNodeData()->getId() . ')">Valider</button> | 35 | <button onclick="changeRecipient(' . $node->getNodeData()->getId() . ')">Valider</button> |
| 36 | </p> | 36 | </p> |
| 37 | <p> | 37 | <p><button onclick="sendTestEmail(' . $node->getNodeData()->getId() . ')">Envoi d\'un e-mail de test</button></p> |
| 38 | <label for="smtp">Serveur SMTP</label> | 38 | <p class="test_email_success full_width_column"></p> |
| 39 | <input id="smtp" type="text" name="smtp" value="' . $smtp . '"> | 39 | </div>' . "\n"; |
| 40 | <input type="hidden" id="smtp_hidden" value=""> | ||
| 41 | <button onclick="changeSmtp(' . $node->getNodeData()->getId() . ')">Valider</button> | ||
| 42 | </p>' . "\n"*/ | ||
| 43 | . '<p><button onclick="sendTestEmail()">Envoi d\'un e-mail de test</button></p>' . "\n" | ||
| 44 | . '<p class="test_email_success full_width_column"></p>' | ||
| 45 | . '</div>' . "\n"; | ||
| 46 | } | 40 | } |
| 47 | 41 | ||
| 48 | ob_start(); | 42 | ob_start(); |
