ZwiiCMS/core/module/user/view/profilEdit/profilEdit.php

286 lines
15 KiB
PHP
Raw Normal View History

2023-03-31 17:02:56 +02:00
<?php echo template::formOpen('profilEditForm'); ?>
<div class="row">
<div class="col1">
2023-03-31 17:02:56 +02:00
<?php echo template::button('profilEditBack', [
'class' => 'buttonGrey',
2023-03-31 17:02:56 +02:00
'href' => helper::baseUrl() . 'user/profil',
'value' => template::ico('left')
]); ?>
</div>
<div class="col2 offset9">
2023-03-31 17:02:56 +02:00
<?php echo template::submit('profilEditSubmit'); ?>
</div>
</div>
2023-03-31 14:36:19 +02:00
<div class="row">
<div class="col12">
<div class="block">
<h4>
2023-07-19 09:28:26 +02:00
<?php echo helper::translate('Paramètres du profil'); ?>
2023-03-31 14:36:19 +02:00
</h4>
<div class="row">
<div class="col6">
2023-03-31 17:02:56 +02:00
<div class="row">
<div class="col12">
2023-08-05 14:50:05 +02:00
<div class="row">
<div class="col6">
<?php echo template::text('profilEditName', [
'label' => 'Nom du profil',
'value' => helper::translate($this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'name']))
2023-08-05 14:50:05 +02:00
]); ?>
</div>
<div class="col6">
<?php echo template::select('profilEditProfil', $module::$profils, [
2023-08-05 17:16:18 +02:00
'label' => 'Hiérarchie',
2023-08-08 17:44:44 +02:00
'help' => 'Rang 9 > rang 1. Le profil de rang 1 n\'est pas modifiable.',
'selected' => $this->getUrl(3),
'disabled' => $this->getUrl(3) === '1',
2023-08-05 14:50:05 +02:00
]); ?>
</div>
</div>
2023-03-31 17:02:56 +02:00
</div>
<div class="col12">
<?php echo template::text('profilEditDisplayGroup', [
2023-07-19 09:28:26 +02:00
'label' => 'Groupe associé',
'value' => helper::translate(self::$groups[$this->getUrl(2)]),
'disabled' => true
2023-03-31 17:02:56 +02:00
]); ?>
<?php echo template::hidden('profilEditGroup', [
'value' => $this->getUrl(2),
]); ?>
2023-08-05 14:50:05 +02:00
<?php echo template::hidden('profilEditOldProfil', [
'value' => $this->getUrl(3),
]); ?>
2023-03-31 17:02:56 +02:00
</div>
</div>
2023-03-31 14:36:19 +02:00
</div>
<div class="col6">
2023-03-31 17:02:56 +02:00
<?php echo template::textarea('profilEditComment', [
2023-03-31 14:36:19 +02:00
'label' => 'Commentaire',
'value' => helper::translate($this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'comment']))
2023-03-31 14:36:19 +02:00
]); ?>
</div>
</div>
</div>
</div>
</div>
2023-07-05 18:04:42 +02:00
<?php if ($this->getUrl(2) >= self::GROUP_EDITOR): ?>
<div class="row">
<div class="col12">
<div class="block">
<h4>
2023-07-19 09:28:26 +02:00
<?php echo helper::translate('Permissions sur les pages'); ?>
</h4>
<div class="row">
<div class="col3">
2023-06-10 17:06:08 +02:00
<?php echo template::checkbox('profilEditPageAdd', true, 'Ajouter', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'add'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilEditPageEdit', true, 'Éditer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'edit'])
]); ?>
</div>
<div class="col3">
2023-07-19 09:28:26 +02:00
<?php echo template::checkbox('profilEditPageDelete', true, 'Effacer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'delete'])
]); ?>
</div>
<div class="col3">
2023-06-10 17:06:08 +02:00
<?php echo template::checkbox('profilEditPageDuplicate', true, 'Dupliquer', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'duplicate'])
]); ?>
</div>
2023-05-14 22:59:24 +02:00
</div>
<div class="row">
<div class="col3">
<?php echo template::checkbox('profilEditPageModule', true, 'Module', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'module'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilEditPagecssEditor', true, 'Éditeur CSS', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'cssEditor'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('profilEditPagejsEditor', true, 'Éditeur JS', [
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'page', 'jsEditor'])
]); ?>
</div>
2023-05-14 22:59:24 +02:00
</div>
</div>
</div>
</div>
<div class="containerModule">
<?php foreach (user::$listModules as $moduleId): ?>
<?php if (file_exists('module/' . $moduleId . '/profil/view/edit.inc.php')) {
include('module/' . $moduleId . '/profil/view/edit.inc.php');
} ?>
<?php endforeach; ?>
2023-06-10 16:58:05 +02:00
</div>
<?php endif; ?>
2023-06-30 09:26:41 +02:00
<div class="row">
2023-07-19 09:28:26 +02:00
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Compte de l\'utilisateur'); ?>
</h4>
<div class="row">
<div class="col3">
2023-06-30 09:26:41 +02:00
<?php echo template::checkbox('profilEditUserEdit', true, 'Éditer', [
2023-07-19 09:28:26 +02:00
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'user', 'edit'])
]); ?>
2023-06-30 09:26:41 +02:00
</div>
</div>
</div>
</div>
2023-07-19 09:28:26 +02:00
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>
2023-03-29 19:28:03 +02:00
<?php echo helper::translate('Gestionnaire de fichiers'); ?>
</h4>
<div class="row">
2023-03-29 19:28:03 +02:00
<div class="col3">
2023-06-10 17:06:08 +02:00
<?php echo template::checkbox('profilEditFileManager', true, 'Autorisé', [
2023-05-10 16:50:02 +02:00
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'filemanager'])
]); ?>
</div>
2023-03-29 19:28:03 +02:00
<div class="col6">
2023-03-31 17:02:56 +02:00
<?php echo template::select('profilEditPath', $module::$sharePath, [
2023-05-11 19:07:34 +02:00
'label' => 'Dossier',
'class' => 'filemanager',
2024-01-08 14:42:19 +01:00
'selected' => '.' . $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'folder', 'path'])
]); ?>
</div>
</div>
<div class="row">
2023-03-29 19:28:03 +02:00
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Permissions sur les dossiers'); ?>
</h4>
<div class="row">
<div class="col2">
2023-07-19 09:28:26 +02:00
<?php echo template::checkbox('profilEditFolderCreate', true, 'Ajouter', [
'class' => 'filemanager',
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'folder', 'create']),
2023-03-29 19:28:03 +02:00
]); ?>
</div>
<div class="col2">
2023-07-19 09:28:26 +02:00
<?php echo template::checkbox('profilEditFolderDelete', true, 'Effacer', [
'class' => 'filemanager',
2023-03-31 17:02:56 +02:00
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'folder', 'delete'])
2023-03-29 19:28:03 +02:00
]); ?>
</div>
<div class="col2">
2023-07-19 09:28:26 +02:00
<?php echo template::checkbox('profilEditFolderRename', true, 'Renommer', [
'class' => 'filemanager',
2023-03-31 17:02:56 +02:00
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'folder', 'rename'])
2023-03-29 19:28:03 +02:00
]); ?>
</div>
<div class="col2">
2023-07-19 10:30:41 +02:00
<?php echo template::checkbox('profilEditFolderCopycut', true, 'Presse papier', [
'class' => 'filemanager',
2023-03-31 17:02:56 +02:00
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'folder', 'copycut'])
2023-03-29 19:28:03 +02:00
]); ?>
</div>
2023-05-11 19:13:36 +02:00
<div class="col3">
2023-06-10 17:06:08 +02:00
<?php echo template::checkbox('profilEditFolderChmod', true, 'Droits sur les dossiers', [
'class' => 'filemanager',
2023-03-31 17:02:56 +02:00
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'folder', 'chmod'])
2023-03-29 19:28:03 +02:00
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
2023-03-29 19:28:03 +02:00
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Permissions sur les fichiers'); ?>
</h4>
<div class="row">
2023-05-11 19:13:36 +02:00
<div class="col3">
2023-07-19 09:28:26 +02:00
<?php echo template::checkbox('profilEditDownload', true, 'Télécharger', [
'class' => 'filemanager',
2023-03-31 17:02:56 +02:00
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'file', 'download'])
2023-03-29 19:28:03 +02:00
]); ?>
</div>
2023-05-11 19:13:36 +02:00
<div class="col3">
2023-07-19 09:28:26 +02:00
<?php echo template::checkbox('profilEditEdit', true, 'Éditer', [
'class' => 'filemanager',
2023-03-31 17:02:56 +02:00
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'file', 'edit'])
2023-03-29 19:28:03 +02:00
]); ?>
</div>
2023-05-11 19:13:36 +02:00
<div class="col3">
2023-07-19 09:28:26 +02:00
<?php echo template::checkbox('profilEditCreate', true, 'Ajouter', [
'class' => 'filemanager',
2023-03-31 17:02:56 +02:00
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'file', 'create'])
2023-03-29 19:28:03 +02:00
]); ?>
</div>
2023-05-11 19:13:36 +02:00
<div class="col3">
2023-07-19 09:28:26 +02:00
<?php echo template::checkbox('profilEditRename', true, 'Renommer', [
'class' => 'filemanager',
2023-03-31 17:02:56 +02:00
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'file', 'rename'])
2023-03-29 19:28:03 +02:00
]); ?>
</div>
2023-05-11 19:13:36 +02:00
</div>
<div class="row">
<div class="col3">
2023-07-19 09:28:26 +02:00
<?php echo template::checkbox('profilEditUpload', true, 'Téléverser', [
'class' => 'filemanager',
2023-03-31 17:02:56 +02:00
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'file', 'upload'])
2023-03-29 19:28:03 +02:00
]); ?>
</div>
2023-05-11 19:13:36 +02:00
<div class="col3">
2023-07-19 09:28:26 +02:00
<?php echo template::checkbox('profilEditDelete', true, 'Effacer', [
'class' => 'filemanager',
2023-03-31 17:02:56 +02:00
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'file', 'delete'])
2023-03-29 19:28:03 +02:00
]); ?>
</div>
2023-05-11 19:13:36 +02:00
<div class="col3">
2023-07-25 11:20:38 +02:00
<?php echo template::checkbox('profilEditPreview', true, 'Prévisualiser', [
'class' => 'filemanager',
2023-03-31 17:02:56 +02:00
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'file', 'preview'])
2023-03-29 19:28:03 +02:00
]); ?>
</div>
2023-05-11 19:13:36 +02:00
<div class="col3">
2023-07-19 09:28:26 +02:00
<?php echo template::checkbox('profilEditDuplicate', true, 'Dupliquer', [
'class' => 'filemanager',
2023-03-31 17:02:56 +02:00
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'file', 'duplicate'])
2023-03-29 19:28:03 +02:00
]); ?>
</div>
2023-05-14 22:59:24 +02:00
</div>
2023-05-11 19:13:36 +02:00
<div class="row">
<div class="col3">
2023-07-19 09:28:26 +02:00
<?php echo template::checkbox('profilEditExtract', true, 'Extraire', [
'class' => 'filemanager',
2023-03-31 17:02:56 +02:00
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'file', 'extract'])
2023-03-29 19:28:03 +02:00
]); ?>
</div>
2023-05-11 19:13:36 +02:00
<div class="col3">
2023-07-19 09:28:26 +02:00
<?php echo template::checkbox('profilEditCopycut', true, 'Presse papier', [
'class' => 'filemanager',
2023-03-31 17:02:56 +02:00
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'file', 'copycut'])
2023-03-29 19:28:03 +02:00
]); ?>
</div>
2023-05-11 19:13:36 +02:00
<div class="col3">
2023-06-10 17:06:08 +02:00
<?php echo template::checkbox('profilEditChmod', true, 'Droits sur les fichiers', [
'class' => 'filemanager',
2023-03-31 17:02:56 +02:00
'checked' => $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'file', 'chmod'])
2023-03-29 19:28:03 +02:00
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>