Traduction RFM dans la langue de l'interface

This commit is contained in:
Fred Tempez 2022-10-23 17:27:57 +02:00
parent d752ed4784
commit ef984055f1
17 changed files with 206 additions and 190 deletions

View File

@ -310,7 +310,8 @@ class template
'maxlength' => '500', 'maxlength' => '500',
'name' => $nameId, 'name' => $nameId,
'type' => 2, 'type' => 2,
'value' => '' 'value' => '',
'language' => 'fr_FR'
], $attributes); ], $attributes);
// Traduction de l'aide et de l'étiquette // Traduction de l'aide et de l'étiquette
$attributes['value'] = helper::translate($attributes['value']); $attributes['value'] = helper::translate($attributes['value']);
@ -348,6 +349,7 @@ class template
href="' . href="' .
helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php' . helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php' .
'?relative_url=1' . '?relative_url=1' .
'&lang=' . $attributes['language'] .
'&field_id=' . $attributes['id'] . '&field_id=' . $attributes['id'] .
'&type=' . $attributes['type'] . '&type=' . $attributes['type'] .
'&akey=' . md5_file(core::DATA_DIR . 'core.json') . '&akey=' . md5_file(core::DATA_DIR . 'core.json') .

View File

@ -27,7 +27,7 @@
]); ?> ]); ?>
</div> </div>
<div class="col12"> <div class="col12">
<em>L'archive est générée dans <a href="<?php echo helper::baseUrl(false); ?>core/vendor/filemanager/dialog.php?fldr=backup&type=0&akey=<?php echo md5_file(self::DATA_DIR . 'core.json'); ?>" data-lity>le dossier Backup</a> du gestionnaire de fichiers.</em> <em>L'archive est générée dans <a href="<?php echo helper::baseUrl(false); ?>core/vendor/filemanager/dialog.php?fldr=backup&type=0&akey=<?php echo md5_file(self::DATA_DIR . 'core.json'); ?>&lang=<?php echo $this->getData(['user', $this->getUser('id'), 'language']);?>" data-lity>le dossier Backup</a> du gestionnaire de fichiers.</em>
</div> </div>
</div> </div>
</div> </div>

View File

@ -26,6 +26,7 @@
<div class="row"> <div class="row">
<?php echo template::file('configRestoreImportFile', [ <?php echo template::file('configRestoreImportFile', [
'label' => 'Sélectionnez une archive au format ZIP', 'label' => 'Sélectionnez une archive au format ZIP',
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'type' => 2, 'type' => 2,
'help' => 'L\'archive a été déposée dans le gestionnaire de fichiers. Les archives inférieures à la version 9 ne sont pas acceptées.' 'help' => 'L\'archive a été déposée dans le gestionnaire de fichiers. Les archives inférieures à la version 9 ne sont pas acceptées.'
]); ?> ]); ?>

View File

@ -13,6 +13,7 @@
<div class="col4"> <div class="col4">
<?php echo template::file('configFavicon', [ <?php echo template::file('configFavicon', [
'type' => 1, 'type' => 1,
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'help' => 'Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.', 'help' => 'Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.',
'label' => 'Favicon', 'label' => 'Favicon',
'value' => $this->getData(['config', 'favicon']) 'value' => $this->getData(['config', 'favicon'])
@ -21,6 +22,7 @@
<div class="col4"> <div class="col4">
<?php echo template::file('configFaviconDark', [ <?php echo template::file('configFaviconDark', [
'type' => 1, 'type' => 1,
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'help' => 'Sélectionnez une icône adaptée à un thème sombre.<br>Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.', 'help' => 'Sélectionnez une icône adaptée à un thème sombre.<br>Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.',
'label' => 'Favicon thème sombre', 'label' => 'Favicon thème sombre',
'value' => $this->getData(['config', 'faviconDark']) 'value' => $this->getData(['config', 'faviconDark'])

View File

@ -192,6 +192,7 @@
<div class="col9"> <div class="col9">
<?php echo template::file('pageIconUrl', [ <?php echo template::file('pageIconUrl', [
'help' => 'Sélectionnez une image ou une icône de petite dimension', 'help' => 'Sélectionnez une image ou une icône de petite dimension',
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'label' => 'Icône', 'label' => 'Icône',
'value' => $this->getData(['page', $this->getUrl(2), 'iconUrl']) 'value' => $this->getData(['page', $this->getUrl(2), 'iconUrl'])
]); ?> ]); ?>

View File

@ -21,6 +21,7 @@
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::file('pluginImportFile', [ <?php echo template::file('pluginImportFile', [
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'label' => 'Archive ZIP', 'label' => 'Archive ZIP',
'type' => 2 'type' => 2
]); ?> ]); ?>

View File

@ -1,50 +1,51 @@
<?php echo template::formOpen('configModulesUpload'); ?> <?php echo template::formOpen('configModulesUpload'); ?>
<div class="row"> <div class="row">
<div class="col1"> <div class="col1">
<?php echo template::button('configModulesBack', [ <?php echo template::button('configModulesBack', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'plugin', 'href' => helper::baseUrl() . 'plugin',
'value' => template::ico('left') 'value' => template::ico('left')
]); ?> ]); ?>
</div> </div>
<div class="col1"> <div class="col1">
<?php /**echo template::button('pluginIndexHelp', [ <?php /**echo template::button('pluginIndexHelp', [
'href' => 'https://doc.zwiicms.fr/installation-d-un-module', 'href' => 'https://doc.zwiicms.fr/installation-d-un-module',
'target' => '_blank', 'target' => '_blank',
'class' => 'buttonHelp', 'class' => 'buttonHelp',
'value' => template::ico('help'), 'value' => template::ico('help'),
'help' => 'Consulter l\'aide en ligne' 'help' => 'Consulter l\'aide en ligne'
]);*/ ?> ]);*/ ?>
</div> </div>
<div class="col2 offset8"> <div class="col2 offset8">
<?php echo template::submit('configModulesSubmit', [ <?php echo template::submit('configModulesSubmit', [
'value' => 'Valider', 'value' => 'Valider',
'ico' => 'check' 'ico' => 'check'
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo helper::translate('Installer ou mettre à jour un module téléchargé'); ?> <h4><?php echo helper::translate('Installer ou mettre à jour un module téléchargé'); ?>
</h4> </h4>
<div class="row"> <div class="row">
<div class="col6 offset3"> <div class="col6 offset3">
<?php echo template::file('configModulesInstallation', [ <?php echo template::file('configModulesInstallation', [
'label' => 'Archive ZIP :', 'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'type' => 2 'label' => 'Archive ZIP :',
]); ?> 'type' => 2
]); ?>
</div>
</div>
<div class="row">
<div class="col4 offset3">
<?php echo template::checkbox('configModulesCheck', true, 'Mise à jour forcée', [
'checked' => false,
'help' => 'Permet de forcer une mise à jour même si la version du module est inférieure ou égale à celle du module installé.',
]); ?>
</div>
</div>
</div> </div>
</div>
<div class="row">
<div class="col4 offset3">
<?php echo template::checkbox('configModulesCheck', true, 'Mise à jour forcée', [
'checked' => false,
'help' => 'Permet de forcer une mise à jour même si la version du module est inférieure ou égale à celle du module installé.',
]); ?>
</div>
</div>
</div> </div>
</div>
</div> </div>
<?php echo template::formClose(); ?> <?php echo template::formClose(); ?>

View File

@ -65,6 +65,7 @@
$imageFile = file_exists(self::FILE_DIR . 'source/' . $this->getData(['theme', 'body', 'image'])) ? $this->getData(['theme', 'body', 'image']) : ""; $imageFile = file_exists(self::FILE_DIR . 'source/' . $this->getData(['theme', 'body', 'image'])) ? $this->getData(['theme', 'body', 'image']) : "";
echo template::file('themeBodyImage', [ echo template::file('themeBodyImage', [
'help' => 'Sélectionner une image', 'help' => 'Sélectionner une image',
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'label' => 'Arrière plan', 'label' => 'Arrière plan',
'type' => 1, 'type' => 1,
'value' => $imageFile 'value' => $imageFile

View File

@ -66,6 +66,7 @@
<div class="row" id="containerFontAddFile"> <div class="row" id="containerFontAddFile">
<div class="col12"> <div class="col12">
<?php echo template::file('fontAddFile', [ <?php echo template::file('fontAddFile', [
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'label' => 'Fichier de fonte (Format WOFF)' 'label' => 'Fichier de fonte (Format WOFF)'
]); ?> ]); ?>
</div> </div>

View File

@ -68,6 +68,7 @@
<div class="col12"> <div class="col12">
<?php echo template::file('fontEditFile', [ <?php echo template::file('fontEditFile', [
'label' => 'Fichier de fonte (Format WOFF)', 'label' => 'Fichier de fonte (Format WOFF)',
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'value' => $this->getUrl(2) === 'files' ? $this->getData(['fonts', $this->getUrl(2), $this->getUrl(3), 'resource']) : '' 'value' => $this->getUrl(2) === 'files' ? $this->getData(['fonts', $this->getUrl(2), $this->getUrl(3), 'resource']) : ''
]); ?> ]); ?>
</div> </div>

View File

@ -154,14 +154,14 @@
</h4> </h4>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<?php <?php $imageFile = file_exists(self::FILE_DIR . 'source/' . $this->getData(['theme', 'header', 'image'])) ? $this->getData(['theme', 'header', 'image']) : ""; ?>
$imageFile = file_exists(self::FILE_DIR . 'source/' . $this->getData(['theme', 'header', 'image'])) ? <?php echo template::file('themeHeaderImage', [
$this->getData(['theme', 'header', 'image']) : "";
echo template::file('themeHeaderImage', [
'label' => 'Image', 'label' => 'Image',
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'type' => 1, 'type' => 1,
'value' => $imageFile 'value' => $imageFile
]); ?> ]);
?>
<span class="themeHeaderImageOptions displayNone" id="themeHeaderImageInfo"> <span class="themeHeaderImageOptions displayNone" id="themeHeaderImageInfo">
<?php echo helper::translate('Largeur de l\'image :'); ?> <span id="themeHeaderImageWidth"></span> ( <?php echo helper::translate('largeur de site :'); ?> <?php echo $this->getData(['theme', 'site', 'width']); ?>) <?php echo helper::translate('Largeur de l\'image :'); ?> <span id="themeHeaderImageWidth"></span> ( <?php echo helper::translate('largeur de site :'); ?> <?php echo $this->getData(['theme', 'site', 'width']); ?>)
- -

View File

@ -29,6 +29,7 @@
<div class="row"> <div class="row">
<div class="col6 offset3"> <div class="col6 offset3">
<?php echo template::file('themeManageImport', [ <?php echo template::file('themeManageImport', [
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'label' => 'Archive ZIP :', 'label' => 'Archive ZIP :',
'type' => 2 'type' => 2
]); ?> ]); ?>
@ -41,7 +42,7 @@
<div class="col6"> <div class="col6">
<div class="block"> <div class="block">
<h4><?php echo helper::translate('Sauvegarde du thème dans le'); ?> <h4><?php echo helper::translate('Sauvegarde du thème dans le'); ?>
<a href="<?php echo helper::baseUrl(false); ?>core/vendor/filemanager/dialog.php?fldr=theme&type=0&akey=<?php echo md5_file(self::DATA_DIR . 'core.json'); ?>" data-lity> <a href="<?php echo helper::baseUrl(false); ?>core/vendor/filemanager/dialog.php?fldr=theme&type=0&akey=<?php echo md5_file(self::DATA_DIR . 'core.json');?>&lang=<?php echo $this->getData(['user', $this->getUser('id'), 'language']);?>" data-lity>
<?php echo helper::translate('gestionnaire de fichiers'); ?> <?php echo helper::translate('gestionnaire de fichiers'); ?>
</a> </a>
</h4> </h4>

View File

@ -108,15 +108,15 @@
</div> </div>
<div class="row"> <div class="row">
<div id="themeMenuBurgerLogoId" class="col6 offset6 <?php if ($this->getData(['theme', 'menu', 'burgerContent']) !== 'logo') echo 'displayNone'; ?>"> <div id="themeMenuBurgerLogoId" class="col6 offset6 <?php if ($this->getData(['theme', 'menu', 'burgerContent']) !== 'logo') echo 'displayNone'; ?>">
<?php <?php $imageFile = file_exists(self::FILE_DIR . 'source/' . $this->getData(['theme', 'menu', 'burgerLogo'])) ? $this->getData(['theme', 'menu', 'burgerLogo']) : ""; ?>
$imageFile = file_exists(self::FILE_DIR . 'source/' . $this->getData(['theme', 'menu', 'burgerLogo'])) ? <?php echo template::file('themeMenuBurgerLogo', [
$this->getData(['theme', 'menu', 'burgerLogo']) : "";
echo template::file('themeMenuBurgerLogo', [
'help' => 'Sélectionner une image de dimensions adaptées', 'help' => 'Sélectionner une image de dimensions adaptées',
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'label' => 'Logo du menu burger', 'label' => 'Logo du menu burger',
'type' => 1, 'type' => 1,
'value' => $imageFile 'value' => $imageFile
]); ?> ]);
?>
</div> </div>
</div> </div>
</div> </div>

View File

@ -30,6 +30,7 @@
<div class="row"> <div class="row">
<div class="col10"> <div class="col10">
<?php echo template::file('userImportCSVFile', [ <?php echo template::file('userImportCSVFile', [
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'label' => 'Liste d\'utilisateurs :' 'label' => 'Liste d\'utilisateurs :'
]); ?> ]); ?>
</div> </div>

View File

@ -42,6 +42,7 @@
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
<?php echo template::file('blogAddPicture', [ <?php echo template::file('blogAddPicture', [
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'help' => 'Taille optimale de l\'image de couverture : ' . ((int) substr($this->getData(['theme', 'site', 'width']), 0, -2) - (20 * 2)) . ' x 350 pixels.', 'help' => 'Taille optimale de l\'image de couverture : ' . ((int) substr($this->getData(['theme', 'site', 'width']), 0, -2) - (20 * 2)) . ' x 350 pixels.',
'label' => 'Image de couverture', 'label' => 'Image de couverture',
'type' => 1 'type' => 1

View File

@ -44,6 +44,7 @@
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::file('blogEditPicture', [ <?php echo template::file('blogEditPicture', [
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'help' => $this->getData(['theme', 'site', 'width']) !== '100%' ? 'Taille optimale de l\'image de couverture : ' . ((int) substr($this->getData(['theme', 'site', 'width']), 0, -2) - (20 * 2)) . ' x 350 pixels.' : '', 'help' => $this->getData(['theme', 'site', 'width']) !== '100%' ? 'Taille optimale de l\'image de couverture : ' . ((int) substr($this->getData(['theme', 'site', 'width']), 0, -2) - (20 * 2)) . ' x 350 pixels.' : '',
'label' => 'Image de couverture', 'label' => 'Image de couverture',
'type' => 1, 'type' => 1,

View File

@ -1,157 +1,158 @@
<?php echo template::formOpen('formOptionForm'); ?> <?php echo template::formOpen('formOptionForm'); ?>
<div class="row"> <div class="row">
<div class="col1"> <div class="col1">
<?php echo template::button('formOptionBack', [ <?php echo template::button('formOptionBack', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->getUrl(0) . '/config', 'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
'value' => template::ico('left') 'value' => template::ico('left')
]); ?>
</div>
<div class="col2 offset9">
<?php echo template::submit('formOptionSubmit'); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Validation du formulaire</h4>
<div class="row">
<div class="col6">
<?php echo template::checkbox('formOptionCaptcha', true, 'Captcha', [
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'captcha'])
]); ?>
</div>
<div class="col6">
<?php echo template::text('formOptionButton', [
'help' => 'Laissez vide afin de conserver le texte par défaut.',
'label' => 'Etiquette du bouton de soumission',
'value' => $this->getData(['module', $this->getUrl(0), 'config', 'button'])
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::checkbox('formOptionPageIdToggle', true, 'Redirection après soumission du formulaire', [
'checked' => (bool) $this->getData(['module', $this->getUrl(0), 'config', 'pageId'])
]); ?>
</div>
<div class="col5">
<?php echo template::select('formOptionPageId', $module::$pages, [
'classWrapper' => 'displayNone',
'label' => 'Page du site :',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'pageId'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Gabarit</h4>
<div class="row">
<div class="col6">
<?php echo template::select('formOptionAlign', $module::$optionAlign, [
'label' => 'Alignement du formulaire',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'align'])
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::select('formOptionOffset', $module::$optionOffset, [
'label' => 'Décalage à gauche',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'offset'])
]); ?>
</div>
<div class="col6">
<?php echo template::select('formOptionWidth', $module::$optionWidth, [
'label' => 'Largeur',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'width'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Courriel</h4>
<?php echo template::checkbox('formOptionMailOptionsToggle', true, 'Envoyer par mail les données saisies :', [
'checked' => (bool) $this->getData(['module', $this->getUrl(0), 'config', 'group']) ||
!empty($this->getData(['module', $this->getUrl(0), 'config', 'user'])) ||
!empty($this->getData(['module', $this->getUrl(0), 'config', 'mail'])),
'help' => 'Sélectionnez au moins un groupe, un utilisateur ou saisissez un email. Votre serveur doit autoriser les envois de mail.'
]); ?> ]); ?>
</div> <div id="formOptionMailOptions" class="displayNone">
<div class="col2 offset9">
<?php echo template::submit('formOptionSubmit'); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Validation du formulaire</h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col12">
<?php echo template::checkbox('formOptionCaptcha', true, 'Captcha', [ <?php echo template::text('formOptionSubject', [
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'captcha'])
]); ?>
</div>
<div class="col6">
<?php echo template::text('formOptionButton', [
'help' => 'Laissez vide afin de conserver le texte par défaut.', 'help' => 'Laissez vide afin de conserver le texte par défaut.',
'label' => 'Etiquette du bouton de soumission', 'label' => 'Sujet du mail',
'value' => $this->getData(['module', $this->getUrl(0), 'config', 'button']) 'value' => $this->getData(['module', $this->getUrl(0), 'config', 'subject'])
]); ?>
</div>
</div>
<?php
// Element 0 quand aucun membre a été sélectionné
$groupMembers = [''] + $module::$groupNews;
?>
<div class="row">
<div class="col4">
<?php echo template::select('formOptionGroup', $groupMembers, [
'label' => 'Aux groupes à partir de',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'group']),
'help' => 'Éditeurs = éditeurs + administrateurs<br/> Membres = membres + éditeurs + administrateurs'
]); ?>
</div>
<div class="col4">
<?php echo template::select('formOptionUser', $module::$listUsers, [
'label' => 'A un membre',
'selected' => array_search($this->getData(['module', $this->getUrl(0), 'config', 'user']), $module::$listUsers)
]); ?>
</div>
<div class="col4">
<?php echo template::text('formOptionMail', [
'label' => 'A une adresse email',
'value' => $this->getData(['module', $this->getUrl(0), 'config', 'mail']),
'help' => 'Un email ou une liste de diffusion'
]); ?>
</div>
</div>
<div class="row">
<div class="col4">
<?php echo template::select('formOptionSignature', $module::$signature, [
'label' => 'Sélectionner le type de signature',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'signature'])
]); ?>
</div>
<div class="col4">
<?php echo template::file('formOptionLogo', [
'help' => 'Sélectionnez le logo du site',
'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'label' => 'Logo',
'value' => $this->getData(['module', $this->getUrl(0), 'config', 'logoUrl'])
]); ?>
</div>
<div class="col4">
<?php echo template::select('formOptionLogoWidth', $module::$logoWidth, [
'label' => 'Sélectionner la largeur du logo',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'logoWidth'])
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::checkbox('formOptionPageIdToggle', true, 'Redirection après soumission du formulaire', [ <?php echo template::checkbox('formOptionMailReplyTo', true, 'Répondre à l\'expéditeur depuis le mail de notification', [
'checked' => (bool) $this->getData(['module', $this->getUrl(0), 'config', 'pageId']) 'checked' => (bool) $this->getData(['module', $this->getUrl(0), 'config', 'replyto']),
'help' => 'Cette option permet de réponse directement à l\'expéditeur du message si celui-ci a indiqué un email valide.'
]); ?> ]); ?>
</div> </div>
<div class="col5">
<?php echo template::select('formOptionPageId', $module::$pages, [
'classWrapper' => 'displayNone',
'label' => 'Page du site :',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'pageId'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Gabarit</h4>
<div class="row">
<div class="col6">
<?php echo template::select('formOptionAlign', $module::$optionAlign, [
'label' => 'Alignement du formulaire',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'align'])
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::select('formOptionOffset', $module::$optionOffset, [
'label' => 'Décalage à gauche',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'offset'])
]); ?>
</div>
<div class="col6">
<?php echo template::select('formOptionWidth', $module::$optionWidth, [
'label' => 'Largeur',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'width'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Courriel</h4>
<?php echo template::checkbox('formOptionMailOptionsToggle', true, 'Envoyer par mail les données saisies :', [
'checked' => (bool) $this->getData(['module', $this->getUrl(0), 'config', 'group']) ||
!empty($this->getData(['module', $this->getUrl(0), 'config', 'user'])) ||
!empty($this->getData(['module', $this->getUrl(0), 'config', 'mail'])),
'help' => 'Sélectionnez au moins un groupe, un utilisateur ou saisissez un email. Votre serveur doit autoriser les envois de mail.'
]); ?>
<div id="formOptionMailOptions" class="displayNone">
<div class="row">
<div class="col12">
<?php echo template::text('formOptionSubject', [
'help' => 'Laissez vide afin de conserver le texte par défaut.',
'label' => 'Sujet du mail',
'value' => $this->getData(['module', $this->getUrl(0), 'config', 'subject'])
]); ?>
</div>
</div>
<?php
// Element 0 quand aucun membre a été sélectionné
$groupMembers = [''] + $module::$groupNews;
?>
<div class="row">
<div class="col4">
<?php echo template::select('formOptionGroup', $groupMembers, [
'label' => 'Aux groupes à partir de',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'group']),
'help' => 'Éditeurs = éditeurs + administrateurs<br/> Membres = membres + éditeurs + administrateurs'
]); ?>
</div>
<div class="col4">
<?php echo template::select('formOptionUser', $module::$listUsers, [
'label' => 'A un membre',
'selected' => array_search($this->getData(['module', $this->getUrl(0), 'config', 'user']),$module::$listUsers)
]); ?>
</div>
<div class="col4">
<?php echo template::text('formOptionMail', [
'label' => 'A une adresse email',
'value' => $this->getData(['module', $this->getUrl(0), 'config', 'mail']),
'help' => 'Un email ou une liste de diffusion'
]); ?>
</div>
</div>
<div class="row">
<div class="col4">
<?php echo template::select('formOptionSignature', $module::$signature, [
'label' => 'Sélectionner le type de signature',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'signature'])
]); ?>
</div>
<div class="col4">
<?php echo template::file('formOptionLogo', [
'help' => 'Sélectionnez le logo du site',
'label' => 'Logo',
'value' => $this->getData(['module', $this->getUrl(0), 'config', 'logoUrl'])
]); ?>
</div>
<div class="col4">
<?php echo template::select('formOptionLogoWidth', $module::$logoWidth, [
'label' => 'Sélectionner la largeur du logo',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'logoWidth'])
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::checkbox('formOptionMailReplyTo', true, 'Répondre à l\'expéditeur depuis le mail de notification', [
'checked' => (bool) $this->getData(['module', $this->getUrl(0), 'config', 'replyto']),
'help' => 'Cette option permet de réponse directement à l\'expéditeur du message si celui-ci a indiqué un email valide.'
]); ?>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>