Avertissement sur suppression de profil

This commit is contained in:
Fred Tempez 2023-08-20 15:23:35 +02:00
parent fc5630f3aa
commit d226331f19
2 changed files with 27 additions and 5 deletions

View File

@ -492,14 +492,11 @@ class user extends common
helper::translate($groupData['name']),
nl2br(helper::translate($groupData['comment'])),
template::button('profilEdit' . $groupId, [
'href' => helper::baseUrl() . 'user/profilEdit/' . $groupId,
'value' => template::ico('pencil'),
'help' => 'Éditer',
'disabled' => $groupData['readonly'],
]),
template::button('permissionDelete' . $groupId, [
'class' => 'userDelete buttonRed',
'href' => helper::baseUrl() . 'user/permissionDelete/' . $groupId,
template::button('profilDelete' . $groupId, [
'value' => template::ico('trash'),
'help' => 'Supprimer',
'disabled' => $groupData['readonly'],
@ -522,7 +519,7 @@ class user extends common
'disabled' => $profilData['readonly'],
]),
template::button('profilDelete' . $groupId . $profilId, [
'class' => 'userDelete buttonRed',
'class' => 'profilDelete buttonRed',
'href' => helper::baseUrl() . 'user/profilDelete/' . $groupId . '/' . $profilId,
'value' => template::ico('trash'),
'help' => 'Supprimer',

View File

@ -0,0 +1,25 @@
/**
* This file is part of Zwii.
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2023, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.fr/
*/
$(document).ready(function () {
/**
* Confirmation de suppression
*/
$(".profilDelete").on("click", function () {
var _this = $(this);
var message = "<?php echo helper::translate('Supprimer ce profil ?'); ?>";
return core.confirm(message, function () {
$(location).attr("href", _this.attr("href"));
});
});
});