send more warning to user

This commit is contained in:
Jean-Christian Paul Denis 2023-04-24 02:05:05 +02:00
parent 0568131cb3
commit 1d0caa58fe
Signed by: JcDenis
GPG Key ID: 1B5B8C5B90B6C951
4 changed files with 24 additions and 13 deletions

View File

@ -1,8 +1,13 @@
/*global $, dotclear */ /*global $, dotclear */
'use strict'; 'use strict';
$(function () { Object.assign(dotclear.msg, dotclear.getData('dcAdvancedCleaner'));
$(() => {
$('#parts_menu input[type=submit]').hide(); $('#parts_menu input[type=submit]').hide();
$('#parts_menu #select_part').on('change', function () {this.form.submit();}); $('#parts_menu #select_part').on('change', function () {this.form.submit();});
dotclear.condSubmit('#form-funcs td input[type=checkbox]', '#form-funcs #do-action'); dotclear.condSubmit('#form-funcs td input[type=checkbox]', '#form-funcs #do-action');
$('#form-funcs').on('submit', function () {
return window.confirm(dotclear.msg.confirm_delete);
});
}); });

View File

@ -17,6 +17,7 @@ L10n::$locales['There are %s entries']
L10n::$locales['Objects'] = 'Objets'; L10n::$locales['Objects'] = 'Objets';
L10n::$locales['Values from official distribution'] = 'Valeurs de la distribution officielle'; L10n::$locales['Values from official distribution'] = 'Valeurs de la distribution officielle';
L10n::$locales['Action on selected rows:'] = 'Action sur les lignes sélectionnées :'; L10n::$locales['Action on selected rows:'] = 'Action sur les lignes sélectionnées :';
L10n::$locales['I understand and I am want to delete this'] = 'J\'ai compris et je veux effacer ceci';
L10n::$locales['Beware: All actions done here are irreversible and are directly applied'] = 'Attention : toutes les actions menées ici sont irréversibles et sont directement appliquées'; L10n::$locales['Beware: All actions done here are irreversible and are directly applied'] = 'Attention : toutes les actions menées ici sont irréversibles et sont directement appliquées';
L10n::$locales['Show Dotclear default properties'] = 'Afficher les propriétés de Dotclear'; L10n::$locales['Show Dotclear default properties'] = 'Afficher les propriétés de Dotclear';
L10n::$locales['Hide Dotclear default properties'] = 'Cacher les propriétés de Dotclear'; L10n::$locales['Hide Dotclear default properties'] = 'Cacher les propriétés de Dotclear';

View File

@ -1,15 +1,15 @@
# Language: Français # Language: Français
# Module: dcAdvancedCleaner - 0.2 # Module: dcAdvancedCleaner - 0.2
# Date: 2023-04-20 14:01:57 # Date: 2023-04-24 00:01:59
# Author: , contact@jcdenis.fr # Author: , contact@jcdenis.fr
# Translated with translater 2023.03.19 # Translated with translater 2023.04.23
msgid "" msgid ""
msgstr "" msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: dcAdvancedCleaner 0.2\n" "Project-Id-Version: dcAdvancedCleaner 0.2\n"
"POT-Creation-Date: \n" "POT-Creation-Date: \n"
"PO-Revision-Date: 2023-04-20T14:01:57+00:00\n" "PO-Revision-Date: 2023-04-24T00:01:59+00:00\n"
"Last-Translator: Jean-Christian Denis\n" "Last-Translator: Jean-Christian Denis\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -20,35 +20,39 @@ msgstr ""
msgid "Action successfuly excecuted" msgid "Action successfuly excecuted"
msgstr "Action exécutée avec succès" msgstr "Action exécutée avec succès"
#: src/Manage.php:120 #: src/Manage.php:121
msgid "There is nothing to display" msgid "There is nothing to display"
msgstr "Il n'y a rien à afficher" msgstr "Il n'y a rien à afficher"
#: src/Manage.php:155 #: src/Manage.php:156
msgid "There are %s entries" msgid "There are %s entries"
msgstr "Il y a %s entrées" msgstr "Il y a %s entrées"
#: src/Manage.php:156 #: src/Manage.php:157
msgid "Objects" msgid "Objects"
msgstr "Objets" msgstr "Objets"
#: src/Manage.php:176 #: src/Manage.php:177
msgid "Values from official distribution" msgid "Values from official distribution"
msgstr "Valeurs de la distribution officielle" msgstr "Valeurs de la distribution officielle"
#: src/Manage.php:185 #: src/Manage.php:186
msgid "Action on selected rows:" msgid "Action on selected rows:"
msgstr "Action sur les lignes sélectionnées :" msgstr "Action sur les lignes sélectionnées :"
#: src/Manage.php:193 #: src/Manage.php:188
msgid "I understand and I am want to delete this"
msgstr "J'ai compris et je veux effacer ceci"
#: src/Manage.php:194
msgid "Beware: All actions done here are irreversible and are directly applied" msgid "Beware: All actions done here are irreversible and are directly applied"
msgstr "Attention : toutes les actions menées ici sont irréversibles et sont directement appliquées" msgstr "Attention : toutes les actions menées ici sont irréversibles et sont directement appliquées"
#: src/Manage.php:201 #: src/Manage.php:202
msgid "Show Dotclear default properties" msgid "Show Dotclear default properties"
msgstr "Afficher les propriétés de Dotclear" msgstr "Afficher les propriétés de Dotclear"
#: src/Manage.php:201 #: src/Manage.php:202
msgid "Hide Dotclear default properties" msgid "Hide Dotclear default properties"
msgstr "Cacher les propriétés de Dotclear" msgstr "Cacher les propriétés de Dotclear"

View File

@ -102,6 +102,7 @@ class Manage extends dcNsProcess
dcPage::openModule( dcPage::openModule(
My::name(), My::name(),
dcPage::jsJson('dcAdvancedCleaner', ['confirm_delete' => __('Are you sure you perform these ations?')]) .
dcPage::cssModuleLoad(My::id() . '/css/backend.css') . dcPage::cssModuleLoad(My::id() . '/css/backend.css') .
dcPage::jsModuleLoad(My::id() . '/js/backend.js') dcPage::jsModuleLoad(My::id() . '/js/backend.js')
); );
@ -184,7 +185,7 @@ class Manage extends dcNsProcess
(new Para())->items([ (new Para())->items([
(new Label(__('Action on selected rows:'), Label::OUTSIDE_LABEL_BEFORE))->for('select_action'), (new Label(__('Action on selected rows:'), Label::OUTSIDE_LABEL_BEFORE))->for('select_action'),
(new Select(['action', 'select_action']))->items($combo_actions), (new Select(['action', 'select_action']))->items($combo_actions),
(new Submit('do-action'))->value(__('ok')), (new Submit('do-action'))->class('delete')->value(__('I understand and I am want to delete this')),
(new Hidden(['p'], My::id())), (new Hidden(['p'], My::id())),
(new Hidden(['part'], $vars->cleaner->id)), (new Hidden(['part'], $vars->cleaner->id)),
dcCore::app()->formNonce(false), dcCore::app()->formNonce(false),