confirmation au changement de thème

This commit is contained in:
Deltacms 2023-01-21 16:57:10 +01:00
parent 66bf783331
commit 70febe3268
5 changed files with 13 additions and 1 deletions

View File

@ -611,7 +611,7 @@ class template {
'ico' => 'check',
'id' => $nameId,
'name' => $nameId,
'uniqueSubmission' => false, //true avant 9.1.08
'uniqueSubmission' => false,
'value' => 'Enregistrer'
], $attributes);
// Retourne le html

View File

@ -199,6 +199,7 @@ $text['core_theme_view']['manage'][11] = 'Download theme';
$text['core_theme_view']['manage'][12] = 'Site theme';
$text['core_theme_view']['manage'][13] = 'Administration theme';
$text['core_theme_view']['manage'][14] = "Are you sure you want to reset the site theme to its original state ?";
$text['core_theme_view']['manage'][15] = "Your custom.css file will be overwritten, you will be able to find it in the automatic backup that will be created, continue?";
$text['core_theme_view']['menu'][0] = 'Back';
$text['core_theme_view']['menu'][1] = 'Help';
$text['core_theme_view']['menu'][2] = 'Save';

View File

@ -199,6 +199,7 @@ $text['core_theme_view']['manage'][11] = 'Télécharger le thème';
$text['core_theme_view']['manage'][12] = 'Thème du site';
$text['core_theme_view']['manage'][13] = 'Thème de l\'administration';
$text['core_theme_view']['manage'][14] = "Êtes-vous sûr de vouloir réinitialiser à son état d\'origine le thème du site ?";
$text['core_theme_view']['manage'][15] = "Votre fichier custom.css va être écrasé, vous pourrez le retrouver dans la sauvegarde automatique qui va être créée, continuez ?";
$text['core_theme_view']['menu'][0] = 'Retour';
$text['core_theme_view']['menu'][1] = 'Aide';
$text['core_theme_view']['menu'][2] = 'Enregistrer';

View File

@ -22,4 +22,13 @@ $("#configManageReset").on("click", function() {
return core.confirm(textConfirm, function() {
$(location).attr("href", _this.attr("href"));
});
});
/**
* Confirmation de changement de thème
*/
$("#themeImportSubmit").on("click", function() {
return core.confirm(textConfirm2, function() {
$('#themeManageForm').submit();
});
});

View File

@ -98,4 +98,5 @@ echo template::formOpen('themeManageForm'); ?>
<?php echo template::formClose(); ?>
<script>
var textConfirm = <?php echo '"'.$text['core_theme_view']['manage'][14].'"'; ?>;
var textConfirm2 = <?php echo '"'.$text['core_theme_view']['manage'][15].'"'; ?>;
</script>