diff options
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(); |