Deltacms/core/module/theme/view/addFonts/addFonts.php

105 lines
2.8 KiB
PHP

<?php
// Lexique
$text = [];
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Aide';
$text[2] = 'Enregistrer';
$text[3] = 'Paramètres de la nouvelle police';
$text[4] = 'Nom';
$text[5] = 'Nom de la police, majuscules et espaces autorisés';
$text[6] = 'Liaison avec un fichier de police';
$text[7] = 'Le fichier de police est envoyé, ou pas, depuis un dépôt local';
$text[8] = 'Vous devez au préalable téléverser le fichier de police, ttf, woff, otf, eot ou woff2 dans le dossier fonts avec le gestionnaire de fichiers.';
$text[9] = 'Sélection d\'une police';
$text[10] = 'License';
$text[11] = 'Type de license de la police';
$typeAddFont = $module::$typeAddFont;
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Help';
$text[2] = 'Save';
$text[3] = 'New font settings';
$text[4] = 'Name';
$text[5] = 'Font name, upper case and spaces allowed';
$text[6] = 'Link to a font file';
$text[7] = 'The font file is sent, or not, from a local repository';
$text[8] = 'You must first upload the font file, ttf, woff, otf, eot or woff2 to the fonts folder with the file manager';
$text[9] = 'Select a font';
$text[10] = 'License';
$text[11] = 'License type of the font';
$typeAddFont = $module::$typeAddFont_en;
break;
}
?>
<?php echo template::formOpen('themeAddFonts'); ?>
<div class="row">
<div class="col2">
<?php echo template::button('themeFontsBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'theme/fonts',
'ico' => 'left',
'value' => $text[0]
]); ?>
</div>
<div class="col2">
<?php echo template::button('themeSiteHelp', [
'href' => 'https://doc.deltacms.fr/polices',
'target' => '_blank',
'ico' => 'help',
'value' => $text[1],
'class' => 'buttonHelp'
]); ?>
</div>
<div class="col2 offset6">
<?php echo template::submit('addFontSubmit',[
'value' => $text[2]
]); ?>
</div>
</div>
<div class="block">
<h4><?php echo $text[3]; ?></h4>
<div class="row">
<div class="col4">
<?php echo template::text('nameAddFont', [
'autocomplete' => 'off',
'label' => $text[4],
'help' => $text[5]
]); ?>
</div>
<div class="col4">
<?php echo template::select('typeAddFont', $typeAddFont, [
'label' => $text[6],
'selected' => 'file',
'help' => $text[7]
]); ?>
</div>
<div class="col4">
<!-- Sélection d'un fichier font -->
<?php echo template::select('fileAddFont', $module::$fontFiles, [
'help' => $text[8],
'label' => $text[9]
]); ?>
</div>
</div>
<div class="row">
<div class="col4">
<?php echo template::text('licenseAddFont', [
'autocomplete' => 'off',
'label' => $text[10],
'help' => $text[11]
]); ?>
</div>
</div>
</div>
<?php echo template::formClose(); ?>