font edit restriction activation

This commit is contained in:
Fred Tempez 2022-04-27 16:21:08 +02:00
parent cad736d74b
commit a659521c29
1 changed files with 9 additions and 3 deletions

View File

@ -10,19 +10,24 @@
*/ */
/** /**
* Option par défaut du sélecteur de mode * Option par défaut du sélecteur de mode
*/ */
$(document).ready(function(){ $(document).ready(function(){
if( $('input[name=fontEditFontImported]').is(':checked') ){ if( $('input[name=fontEditFontImported]').is(':checked') ){
$('#containerfontEditFile').hide(); $('#containerfontEditFile').hide();
$('#containerfontEditUrl').show(); $('#containerfontEditUrl').show();
$('#fontEditFontFileWrapper').hide();
$('input[name=fontEditFontImported]').attr('disabled', 'disabled');
} }
if( $('input[name=fontEditFontFile]').is(':checked') ){ if( $('input[name=fontEditFontFile]').is(':checked') ){
$('#containerfontEditFile').show(); $('#containerfontEditFile').show();
$('#containerfontEditUrl').hide(); $('#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 * Mode téléchargement en ligne de la fonte ou installation locale
*/
$("input, select").on("change", function() { $("input, select").on("change", function() {
if( $('input[name=fontEditFontImported]').is(':checked') ){ if( $('input[name=fontEditFontImported]').is(':checked') ){
@ -38,7 +43,7 @@
$('#containerfontEditFile').hide(); $('#containerfontEditFile').hide();
$('#containerfontEditUrl').show(); $('#containerfontEditUrl').show();
} else { } else {
$('input[name=fontEditFontFile]').prop('checked', true);
} }
@ -51,3 +56,4 @@
} }
}); });
*/