aboutsummaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2025-12-23 15:20:48 +0100
committerpolo <ordipolo@gmx.fr>2025-12-23 15:20:48 +0100
commit774437d3196878388e294a3833a73e900000b5e4 (patch)
tree5d8449beee8b492fe553460f3c4f1027e8cd123a /public
parent8393acd0366ee3408db103ba29e8686bab127f42 (diff)
downloadcms-774437d3196878388e294a3833a73e900000b5e4.tar.gz
cms-774437d3196878388e294a3833a73e900000b5e4.tar.bz2
cms-774437d3196878388e294a3833a73e900000b5e4.zip
choix durée stockage e-mails, relation entités Email <=> NodeData
Diffstat (limited to 'public')
-rw-r--r--public/js/form.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/public/js/form.js b/public/js/form.js
index 7cee970..d8849c8 100644
--- a/public/js/form.js
+++ b/public/js/form.js
@@ -58,6 +58,36 @@ function keepEmails(block_id){
58 console.error('Erreur:', error); 58 console.error('Erreur:', error);
59 }); 59 });
60} 60}
61function setEmailsRetentionPeriod(block_id){
62 const form = document.getElementById('retention_period_' + block_id);
63 if(!form){
64 return;
65 }
66
67 fetch('index.php?action=set_retention_period', {
68 method: 'POST',
69 headers: {
70 'Content-Type': 'application/json'
71 },
72 body: JSON.stringify({
73 id: block_id,
74 months: form.value
75 })
76 })
77 .then(response => response.json())
78 .then(data => {
79 if(data.success){
80 form.value = data.months;
81 console.log(data.months + " mois");
82 }
83 else{
84 toastNotify("Erreur, le réglage n'a pas été enregistré par le serveur.");
85 }
86 })
87 .catch(error => {
88 console.error('Erreur:', error);
89 });
90}
61 91
62function checkCase(id){ 92function checkCase(id){
63 if(document.getElementById('email_address_' + id).value.match('[A-Z]')){ 93 if(document.getElementById('email_address_' + id).value.match('[A-Z]')){