ZwiiCampus/module/suscribe/view/config/config.php

103 lines
5.1 KiB
PHP
Raw Normal View History

2023-11-03 18:31:35 +01:00
<?php echo template::formOpen('registrationConfig'); ?>
<div class="row">
2024-07-17 20:13:53 +02:00
<div class="col1">
2023-11-03 18:31:35 +01:00
<?php echo template::button('registrationConfigBack', [
2024-07-17 20:13:53 +02:00
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(0) . '/' . self::$siteContent,
'value' => template::ico('left')
2023-11-03 18:31:35 +01:00
]); ?>
</div>
2024-07-17 20:13:53 +02:00
<div class="col2 offset7">
2023-11-03 18:31:35 +01:00
<?php echo template::button('registrationConfigBack', [
2024-07-17 20:13:53 +02:00
'href' => helper::baseUrl() . $this->getUrl(0) . '/users',
2023-11-03 18:31:35 +01:00
'value' => 'Inscriptions'
]); ?>
</div>
<div class="col2">
2024-07-17 20:13:53 +02:00
<?php echo template::submit('registrationConfigSubmit', [
'class' => 'green'
]); ?>
2023-11-03 18:31:35 +01:00
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Paramètres</h4>
<div class="row">
2024-07-17 20:13:53 +02:00
<div class="col4">
<?php echo template::select('registrationConfigLayout', $module::$layout, [
'label' => 'Disposition',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'layout'])
2023-11-03 18:31:35 +01:00
]); ?>
</div>
2024-07-17 20:13:53 +02:00
<div class="col4">
2023-11-03 18:31:35 +01:00
<?php echo template::select('registrationConfigSuccess', helper::arraycollumn($this->getData(['page']), 'title', 'SORT_ASC'), [
'label' => 'Redirection après confirmation',
2024-07-17 20:13:53 +02:00
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'pageSuccess'])
2023-11-03 18:31:35 +01:00
]); ?>
</div>
2024-07-17 20:13:53 +02:00
<div class="col4">
2023-11-03 18:31:35 +01:00
<?php echo template::select('registrationConfigError', helper::arraycollumn($this->getData(['page']), 'title', 'SORT_ASC'), [
'label' => 'Redirection après erreur',
2024-07-17 20:13:53 +02:00
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'pageError'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Communication</h4>
<div class="row">
<div class="col6">
<?php echo template::select('registrationConfigTimeOut', $module::$timeLimit, [
'label' => 'Validité du lien',
'selected' => $this->getData(['module', $this->getUrl(0), 'config', 'timeOut']) / 60
2023-11-03 18:31:35 +01:00
]); ?>
</div>
2024-07-17 20:13:53 +02:00
<div class="col6">
<?php echo template::text('registrationConfigFilter', [
'label' => 'Domaines acceptés',
'value' => $this->getData(['module', $this->getUrl(0), 'config', 'filter']),
'help' => 'Champ vide sinon limitation à des domaines spécifiques, le séparateur est ;'
]); ?>
</div>
2023-11-03 18:31:35 +01:00
</div>
<div class="row">
<div class="col12">
<?php $messageDefault = '<p>Confirmez votre inscription en cliquant sur ce lien dans les ... minutes.</p>'; ?>
<?php echo template::textarea('registrationconfigMailRegisterContent', [
2024-07-17 20:13:53 +02:00
'label' => 'Corps du mail de confirmation',
'value' => !empty($this->getData(['module', $this->getUrl(0), 'config', 'mailRegisterContent'])) ? $this->getData(['module', $this->getUrl(0), 'config', 'mailRegisterContent']) : $messageDefault,
'class' => 'editorWysiwyg',
'help' => 'Précisez la durée de validité. Le lien sera inséré après ces explications.'
]); ?>
2023-11-03 18:31:35 +01:00
</div>
</div>
<div class="row">
<div class="col6 verticalAlignMiddle">
<?php echo template::checkbox('registrationConfigState', true, 'Approbation préalable', [
2024-07-17 20:13:53 +02:00
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'approval']),
2023-11-03 18:31:35 +01:00
'help' => 'Les comptes sont inactifs tant que les inscriptions ne sont pas approuvées par un administrateur.',
'check' => true
2024-07-17 20:13:53 +02:00
]); ?>
2023-11-03 18:31:35 +01:00
</div>
</div>
<div class="row">
<div class="col12">
2024-07-17 20:13:53 +02:00
<?php $messageDefault = '<p>Votre inscription a été approuvée par un administrateur.</p>'; ?>
2023-11-03 18:31:35 +01:00
<?php echo template::textarea('registrationconfigMailValidateContent', [
'label' => 'Corps du mail d\'approbation',
2024-07-17 20:13:53 +02:00
'value' => !empty($this->getData(['module', $this->getUrl(0), 'config', 'mailValidateContent'])) ? $this->getData(['module', $this->getUrl(0), 'config', 'mailValidateContent']) : $messageDefault,
2023-11-03 18:31:35 +01:00
'class' => 'editorWysiwyg'
2024-07-17 20:13:53 +02:00
]); ?>
2023-11-03 18:31:35 +01:00
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>
<div class="moduleVersion">Version <?php echo $module::VERSION; ?>
2024-07-17 20:13:53 +02:00
</div>