From a659521c2948ad5f3832be04d8d37f7228b7c01d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Wed, 27 Apr 2022 16:21:08 +0200 Subject: [PATCH] font edit restriction activation --- core/module/theme/view/fontEdit/fontEdit.js.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/core/module/theme/view/fontEdit/fontEdit.js.php b/core/module/theme/view/fontEdit/fontEdit.js.php index 7402f624..58bc405c 100644 --- a/core/module/theme/view/fontEdit/fontEdit.js.php +++ b/core/module/theme/view/fontEdit/fontEdit.js.php @@ -10,19 +10,24 @@ */ -/** +/** * Option par défaut du sélecteur de mode */ $(document).ready(function(){ if( $('input[name=fontEditFontImported]').is(':checked') ){ $('#containerfontEditFile').hide(); $('#containerfontEditUrl').show(); + $('#fontEditFontFileWrapper').hide(); + $('input[name=fontEditFontImported]').attr('disabled', 'disabled'); + } if( $('input[name=fontEditFontFile]').is(':checked') ){ $('#containerfontEditFile').show(); $('#containerfontEditUrl').hide(); + $('#fontEditFontImportedWrapper').hide(); + $('input[name=fontEditFontFile]').attr('disabled', 'disabled'); } }); @@ -30,7 +35,7 @@ /** * Mode téléchargement en ligne de la fonte ou installation locale - */ + $("input, select").on("change", function() { if( $('input[name=fontEditFontImported]').is(':checked') ){ @@ -38,7 +43,7 @@ $('#containerfontEditFile').hide(); $('#containerfontEditUrl').show(); } else { - $('input[name=fontEditFontFile]').prop('checked', true); + } @@ -51,3 +56,4 @@ } }); + */ \ No newline at end of file