Supprime la propriété fonts du template select
This commit is contained in:
parent
4ec08675be
commit
e4b84b024f
@ -611,8 +611,7 @@ class template {
|
||||
'id' => $nameId,
|
||||
'label' => '',
|
||||
'name' => $nameId,
|
||||
'selected' => '',
|
||||
'fonts' => false
|
||||
'selected' => ''
|
||||
], $attributes);
|
||||
// Sauvegarde des données en cas d'erreur
|
||||
if($attributes['before'] AND array_key_exists($attributes['id'], common::$inputBefore)) {
|
||||
@ -638,13 +637,7 @@ class template {
|
||||
helper::sprintAttributes($attributes)
|
||||
);
|
||||
foreach($options as $value => $text) {
|
||||
$html .= $attributes['fonts'] === true ? sprintf(
|
||||
'<option value="%s"%s style="font-family: %s;">%s</option>',
|
||||
$value,
|
||||
$attributes['selected'] == $value ? ' selected' : '', // Double == pour ignorer le type de variable car $_POST change les types en string
|
||||
$text,
|
||||
$text
|
||||
) : sprintf(
|
||||
$html .= sprintf(
|
||||
'<option value="%s"%s>%s</option>',
|
||||
$value,
|
||||
$attributes['selected'] == $value ? ' selected' : '', // Double == pour ignorer le type de variable car $_POST change les types en string
|
||||
|
@ -571,7 +571,6 @@ class theme extends common {
|
||||
];
|
||||
|
||||
// Récupérer le détail des fontes installées
|
||||
//$f = $this->getFonts();
|
||||
$f ['files'] = $this->getData(['fonts', 'files']);
|
||||
$f ['imported'] = $this->getData(['fonts', 'imported']);
|
||||
$f ['websafe'] = self::$fontsWebSafe;
|
||||
@ -1125,7 +1124,8 @@ class theme extends common {
|
||||
|
||||
// Retourne un tableau simple des fonts installées idfont avec le nom
|
||||
// Cette fonction est utile aux sélecteurs de fonts dans les formulaires.
|
||||
public function enumFonts() {
|
||||
// Génère une feuille de style pour l'aperçu des sélecteurs
|
||||
private function enumFonts() {
|
||||
// Récupère la liste des fontes installées
|
||||
$f ['files'] = $this->getData(['fonts', 'files']);
|
||||
$f ['imported'] = $this->getData(['fonts', 'imported']);
|
||||
@ -1140,6 +1140,7 @@ class theme extends common {
|
||||
}
|
||||
ksort($fonts);
|
||||
self::$fontsList = $fonts;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -130,8 +130,7 @@
|
||||
<div class="col4">
|
||||
<?php echo template::select('adminFontText', $module::$fontsList, [
|
||||
'label' => 'Police du texte',
|
||||
'selected' => $this->getData(['admin', 'fontText']),
|
||||
'fonts' => true
|
||||
'selected' => $this->getData(['admin', 'fontText'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
@ -143,8 +142,7 @@
|
||||
<div class="col4">
|
||||
<?php echo template::select('adminFontTitle', $module::$fontsList, [
|
||||
'label' => 'Police des titres',
|
||||
'selected' => $this->getData(['admin', 'fontTitle']),
|
||||
'fonts' => true
|
||||
'selected' => $this->getData(['admin', 'fontTitle'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -173,8 +173,7 @@
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeFooterFont', $module::$fontsList, [
|
||||
'label' => 'Fonte',
|
||||
'selected' => $this->getData(['theme', 'footer', 'font']),
|
||||
'fonts' => true
|
||||
'selected' => $this->getData(['theme', 'footer', 'font'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
|
@ -108,8 +108,7 @@
|
||||
<div class="col4">
|
||||
<?php echo template::select('themeHeaderFont', $module::$fontsList, [
|
||||
'label' => 'Fonte',
|
||||
'selected' => $this->getData(['theme', 'header', 'font']),
|
||||
'fonts' => true
|
||||
'selected' => $this->getData(['theme', 'header', 'font'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
|
@ -185,8 +185,7 @@
|
||||
<div class="col6">
|
||||
<?php echo template::select('themeMenuFont', $module::$fontsList, [
|
||||
'label' => 'Fonte',
|
||||
'selected' => $this->getData(['theme', 'menu', 'font']),
|
||||
'fonts' => true
|
||||
'selected' => $this->getData(['theme', 'menu', 'font'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
|
@ -160,8 +160,7 @@
|
||||
<div class="col6">
|
||||
<?php echo template::select('themeTextFont', $module::$fontsList, [
|
||||
'label' => 'Fonte',
|
||||
'selected' => $this->getData(['theme', 'text', 'font']),
|
||||
'fonts' => true
|
||||
'selected' => $this->getData(['theme', 'text', 'font'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
@ -181,8 +180,7 @@
|
||||
<div class="col4">
|
||||
<?php echo template::select('themeTitleFont', $module::$fontsList, [
|
||||
'label' => 'Fonte',
|
||||
'selected' => $this->getData(['theme', 'title', 'font']),
|
||||
'fonts' => true
|
||||
'selected' => $this->getData(['theme', 'title', 'font'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
|
Loading…
Reference in New Issue
Block a user