Fix user import template

This commit is contained in:
Fred Tempez 2023-10-05 11:27:26 +02:00
parent c22c10114c
commit 7180f6ebd0
2 changed files with 19 additions and 15 deletions

View File

@ -1168,7 +1168,7 @@ class user extends common
*/
public function template()
{
if ($this->getUser('permission', __CLASS__, __FUNCTION__) !== true) {
if ($this->getUser('permission', __CLASS__, __FUNCTION__) === true) {
$file = 'template.csv';
$path = 'core/module/user/ressource/';
// Téléchargement du CSV

View File

@ -18,7 +18,8 @@
<div class="col1 offset8">
<?php echo template::button('userImporTemplate', [
'href' => helper::baseUrl() . 'user/template',
'value' => template::ico('table')
'value' => template::ico('table'),
'help' => 'Télécharger un modèle'
]); ?>
</div>
<div class="col2">
@ -30,7 +31,8 @@
<div class="row">
<div class="col12">
<div class="block">
<h4><?php echo helper::translate('Importation de fichier plat CSV'); ?>
<h4>
<?php echo helper::translate('Importation de fichier plat CSV'); ?>
</h4>
<div class="row">
<div class="col10">
@ -60,7 +62,9 @@
<div class="row">
<div class="col12 textAlignCenter">
<?php echo template::table([1, 3, 3, 1, 1, 2, 1], $module::$users, ['Id', 'Nom', 'Prénom', 'Groupe', 'Pseudo', 'eMail', '']); ?>
<?php echo template::ico('check'); ?> Compte créé | <?php echo template::ico('mail'); ?> Compte créé et notifié | <?php echo template::ico('cancel'); ?> Erreur dans le fichier, compte non créé.
<?php echo template::ico('check'); ?> Compte créé |
<?php echo template::ico('mail'); ?> Compte créé et notifié |
<?php echo template::ico('cancel'); ?> Erreur dans le fichier, compte non créé.
</div>
</div>
<?php endif; ?>