diff options
| author | polo <ordipolo@gmx.fr> | 2025-06-30 17:22:26 +0200 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2025-06-30 17:22:26 +0200 |
| commit | ea3eaf84c6de3f96d6bb73e817147f8571fd6c1f (patch) | |
| tree | a1a27445fd758c16bbb15baa1830118a4f01eca1 /public | |
| parent | ef60a4bd581ec9fb85384c6a262b499373a37d67 (diff) | |
| download | cms-ea3eaf84c6de3f96d6bb73e817147f8571fd6c1f.tar.gz cms-ea3eaf84c6de3f96d6bb73e817147f8571fd6c1f.tar.bz2 cms-ea3eaf84c6de3f96d6bb73e817147f8571fd6c1f.zip | |
formulaire de contact 2
Diffstat (limited to 'public')
| -rw-r--r-- | public/css/body.css | 4 | ||||
| -rw-r--r-- | public/css/tinymce.css | 4 | ||||
| -rw-r--r-- | public/js/form.js | 15 |
3 files changed, 13 insertions, 10 deletions
diff --git a/public/css/body.css b/public/css/body.css index a2b099a..eb198e6 100644 --- a/public/css/body.css +++ b/public/css/body.css | |||
| @@ -7,6 +7,10 @@ body | |||
| 7 | background-color: #0cceec; | 7 | background-color: #0cceec; |
| 8 | } | 8 | } |
| 9 | 9 | ||
| 10 | .hidden{ | ||
| 11 | display: none; | ||
| 12 | } | ||
| 13 | |||
| 10 | #bloc_page | 14 | #bloc_page |
| 11 | {} | 15 | {} |
| 12 | 16 | ||
diff --git a/public/css/tinymce.css b/public/css/tinymce.css index 55639e0..1a99de9 100644 --- a/public/css/tinymce.css +++ b/public/css/tinymce.css | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | .tox-promotion{ | 1 | .tox-promotion{ |
| 2 | display: none; | 2 | display: none; |
| 3 | } | 3 | } |
| 4 | .hidden{ | 4 | /*.hidden{ |
| 5 | display: none; | 5 | display: none; |
| 6 | } \ No newline at end of file | 6 | }*/ \ No newline at end of file |
diff --git a/public/js/form.js b/public/js/form.js index 6386ea8..1752f55 100644 --- a/public/js/form.js +++ b/public/js/form.js | |||
| @@ -1,24 +1,23 @@ | |||
| 1 | //function sendMessage(){} | 1 | //function sendMessage(){} |
| 2 | 2 | ||
| 3 | function changeRecipient(){ | 3 | function changeRecipient(id){ |
| 4 | const email = document.getElementById('recipient').value; | 4 | const email = document.getElementById('recipient').value; |
| 5 | const id_form = ''; | 5 | const warning = document.querySelector('.no_recipient_warning'); |
| 6 | 6 | ||
| 7 | fetch('index.php?action=recipient_email', { | 7 | fetch('index.php?action=recipient_email', { |
| 8 | method: 'POST', | 8 | method: 'POST', |
| 9 | headers: { | 9 | headers: { |
| 10 | 'Content-Type': 'application/json' | 10 | 'Content-Type': 'application/json' |
| 11 | }, | 11 | }, |
| 12 | body: JSON.stringify({ id_form: id_form, email: email }) | 12 | body: JSON.stringify({ id: id, email: email }) |
| 13 | }) | 13 | }) |
| 14 | .then(response => response.json()) | 14 | .then(response => response.json()) |
| 15 | .then(data => { | 15 | .then(data => { |
| 16 | if(data.success) | 16 | if(data.success){ |
| 17 | { | 17 | warning.classList.add('hidden'); |
| 18 | toastNotify('Adresse e-mail de destination modifiée'); | 18 | toastNotify('Adresse e-mail de destination modifiée'); |
| 19 | } | 19 | } |
| 20 | else { | 20 | else{ |
| 21 | |||
| 22 | console.error('Erreur: echec de la modification de l\'adresse e-mail de destination'); | 21 | console.error('Erreur: echec de la modification de l\'adresse e-mail de destination'); |
| 23 | } | 22 | } |
| 24 | }) | 23 | }) |
