forked from ZwiiCMS-Team/ZwiiCMS
Revert "Supprime la propriété fonts du template select"
This reverts commit e4b84b024f
.
This commit is contained in:
parent
e4b84b024f
commit
3177faf3f7
@ -611,7 +611,8 @@ class template {
|
||||
'id' => $nameId,
|
||||
'label' => '',
|
||||
'name' => $nameId,
|
||||
'selected' => ''
|
||||
'selected' => '',
|
||||
'fonts' => false
|
||||
], $attributes);
|
||||
// Sauvegarde des données en cas d'erreur
|
||||
if($attributes['before'] AND array_key_exists($attributes['id'], common::$inputBefore)) {
|
||||
@ -637,7 +638,13 @@ class template {
|
||||
helper::sprintAttributes($attributes)
|
||||
);
|
||||
foreach($options as $value => $text) {
|
||||
$html .= sprintf(
|
||||
$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(
|
||||
'<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,6 +571,7 @@ 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;
|
||||
@ -1124,8 +1125,7 @@ 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.
|
||||
// Génère une feuille de style pour l'aperçu des sélecteurs
|
||||
private function enumFonts() {
|
||||
public function enumFonts() {
|
||||
// Récupère la liste des fontes installées
|
||||
$f ['files'] = $this->getData(['fonts', 'files']);
|
||||
$f ['imported'] = $this->getData(['fonts', 'imported']);
|
||||
@ -1140,7 +1140,6 @@ class theme extends common {
|
||||
}
|
||||
ksort($fonts);
|
||||
self::$fontsList = $fonts;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -130,7 +130,8 @@
|
||||
<div class="col4">
|
||||
<?php echo template::select('adminFontText', $module::$fontsList, [
|
||||
'label' => 'Police du texte',
|
||||
'selected' => $this->getData(['admin', 'fontText'])
|
||||
'selected' => $this->getData(['admin', 'fontText']),
|
||||
'fonts' => true
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
@ -142,7 +143,8 @@
|
||||
<div class="col4">
|
||||
<?php echo template::select('adminFontTitle', $module::$fontsList, [
|
||||
'label' => 'Police des titres',
|
||||
'selected' => $this->getData(['admin', 'fontTitle'])
|
||||
'selected' => $this->getData(['admin', 'fontTitle']),
|
||||
'fonts' => true
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -173,7 +173,8 @@
|
||||
<div class="col3">
|
||||
<?php echo template::select('themeFooterFont', $module::$fontsList, [
|
||||
'label' => 'Fonte',
|
||||
'selected' => $this->getData(['theme', 'footer', 'font'])
|
||||
'selected' => $this->getData(['theme', 'footer', 'font']),
|
||||
'fonts' => true
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
|
@ -108,7 +108,8 @@
|
||||
<div class="col4">
|
||||
<?php echo template::select('themeHeaderFont', $module::$fontsList, [
|
||||
'label' => 'Fonte',
|
||||
'selected' => $this->getData(['theme', 'header', 'font'])
|
||||
'selected' => $this->getData(['theme', 'header', 'font']),
|
||||
'fonts' => true
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
|
@ -185,7 +185,8 @@
|
||||
<div class="col6">
|
||||
<?php echo template::select('themeMenuFont', $module::$fontsList, [
|
||||
'label' => 'Fonte',
|
||||
'selected' => $this->getData(['theme', 'menu', 'font'])
|
||||
'selected' => $this->getData(['theme', 'menu', 'font']),
|
||||
'fonts' => true
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
|
@ -160,7 +160,8 @@
|
||||
<div class="col6">
|
||||
<?php echo template::select('themeTextFont', $module::$fontsList, [
|
||||
'label' => 'Fonte',
|
||||
'selected' => $this->getData(['theme', 'text', 'font'])
|
||||
'selected' => $this->getData(['theme', 'text', 'font']),
|
||||
'fonts' => true
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
@ -180,7 +181,8 @@
|
||||
<div class="col4">
|
||||
<?php echo template::select('themeTitleFont', $module::$fontsList, [
|
||||
'label' => 'Fonte',
|
||||
'selected' => $this->getData(['theme', 'title', 'font'])
|
||||
'selected' => $this->getData(['theme', 'title', 'font']),
|
||||
'fonts' => true
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
|
Loading…
Reference in New Issue
Block a user