ZwiiCMS/module/form/view/config/config.php

161 lines
5.9 KiB
PHP
Raw Normal View History

2018-04-02 08:29:19 +02:00
<div id="formConfigCopy" class="displayNone">
<div class="formConfigInput">
<?php echo template::hidden('formConfigPosition[]', [
'class' => 'formConfigPosition'
]); ?>
<div class="row">
<div class="col1">
<?php echo template::button('formConfigMove[]', [
'value' => template::ico('sort'),
'class' => 'formConfigMove'
]); ?>
</div>
<div class="col5">
<?php echo template::text('formConfigName[]', [
'placeholder' => 'Intitulé'
]); ?>
</div>
<div class="col4">
<?php echo template::select('formConfigType[]', $module::$types, [
'class' => 'formConfigType'
]); ?>
</div>
<div class="col1">
<?php echo template::button('formConfigMoreToggle[]', [
'value' => template::ico('gear'),
'class' => 'formConfigMoreToggle'
]); ?>
</div>
<div class="col1">
<?php echo template::button('formConfigDelete[]', [
'value' => template::ico('minus'),
'class' => 'formConfigDelete'
]); ?>
</div>
</div>
2019-11-26 19:22:30 +01:00
<div class="formConfigMoreLabel displayNone">
<?php echo template::label('formConfigLabel', 'Aucune option pour une étiquette', [
'class' => 'displayNone formConfigLabelWrapper'
]); ?>
</div>
2018-04-02 08:29:19 +02:00
<div class="formConfigMore displayNone">
<?php echo template::text('formConfigValues[]', [
'placeholder' => 'Liste des valeurs séparées par des virgules (valeur1,valeur2,...)',
'class' => 'formConfigValues',
'classWrapper' => 'displayNone formConfigValuesWrapper'
2019-11-26 19:22:30 +01:00
]); ?>
2018-04-02 08:29:19 +02:00
<?php echo template::checkbox('formConfigRequired[]', true, 'Champ obligatoire'); ?>
</div>
</div>
</div>
<?php echo template::formOpen('formConfigForm'); ?>
<div class="row">
<div class="col2">
<?php echo template::button('formConfigBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(0),
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
<div class="col3 offset5">
<?php echo template::button('formConfigData', [
'href' => helper::baseUrl() . $this->getUrl(0) . '/data',
'value' => 'Gérer les données'
]); ?>
</div>
<div class="col2">
<?php echo template::submit('formConfigSubmit'); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Configuration</h4>
<?php echo template::text('formConfigButton', [
'help' => 'Laissez vide afin de conserver le texte par défaut.',
'label' => 'Texte du bouton de soumission',
'value' => $this->getData(['module', $this->getUrl(0), 'config', 'button'])
]); ?>
2019-02-12 14:39:36 +01:00
<?php echo template::checkbox('formConfigMailOptionsToggle', 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 saississez un email. Votre serveur doit autoriser les envois de mail.'
2019-02-12 14:39:36 +01:00
]); ?>
2018-04-02 08:29:19 +02:00
<div id="formConfigMailOptions" class="displayNone">
<div class="row">
2019-02-12 14:39:36 +01:00
<div class="col11 offset1">
2018-04-02 08:29:19 +02:00
<?php echo template::text('formConfigSubject', [
'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>
2019-02-12 14:39:36 +01:00
</div>
<?php
// Element 0 quand aucun membre a été sélectionné
$groupMembers = [''] + $module::$groupNews;
?>
<div class="row">
<div class="col3 offset1">
2019-02-12 14:39:36 +01:00
<?php echo template::select('formConfigGroup', $groupMembers, [
'label' => 'Aux groupes à partir de',
2019-05-02 13:21:48 +02:00
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'group']),
'help' => 'Editeurs = éditeurs + administrateurs<br/> Membres = membres + éditeurs + administrateurs'
2019-02-12 14:39:36 +01:00
]); ?>
</div>="row">
<div class="col3">
2019-02-12 14:39:36 +01:00
<?php echo template::select('formConfigUser', $module::$listUsers, [
'label' => 'A un membre',
2019-02-12 14:39:36 +01:00
'selected' => array_search($this->getData(['module', $this->getUrl(0), 'config', 'user']),$module::$listUsers)
]); ?>
</div>
<div class="col4">
2019-02-12 14:39:36 +01:00
<?php echo template::text('formConfigMail', [
'label' => 'A une adresse email',
'value' => $this->getData(['module', $this->getUrl(0), 'config', 'mail']),
'help' => 'Un email ou une liste de diffusion'
2019-02-12 14:39:36 +01:00
]); ?>
</div>
2018-04-02 08:29:19 +02:00
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::checkbox('formConfigPageIdToggle', 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('formConfigPageId', $module::$pages, [
'classWrapper' => 'displayNone',
'label' => 'Sélectionner une page du site :',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'pageId'])
]); ?>
</div>
2019-02-12 14:39:36 +01:00
</div>
<?php echo template::checkbox('formConfigCapcha', true, 'Valider un capcha afin de soumettre le formulaire.', [
2018-04-02 08:29:19 +02:00
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'capcha'])
]); ?>
</div>
<div class="block">
<h4>Liste des champs</h4>
<div id="formConfigNoInput">
<?php echo template::speech('Le formulaire ne contient aucun champ.'); ?>
</div>
<div id="formConfigInputs"></div>
<div class="row">
<div class="col1 offset11">
<?php echo template::button('formConfigAdd', [
'value' => template::ico('plus')
]); ?>
</div>
</div>
</div>
</div>
</div>
2019-02-14 15:17:03 +01:00
<?php echo template::formClose(); ?>
2019-11-26 19:22:30 +01:00
<div class="moduleVersion">Version
2019-02-14 15:17:03 +01:00
<?php echo $module::FORM_VERSION; ?>
2019-02-14 17:54:02 +01:00
</div>