[9.1.08] validation du code html

This commit is contained in:
fredtempez 2019-06-01 13:07:38 +02:00
parent 1b3f54e49b
commit 10ba4df582
4 changed files with 11 additions and 8 deletions

View File

@ -2139,7 +2139,7 @@ class layout extends common {
$items .= '<a href="' . helper::baseUrl() . $parentPageId . '"' . $active . $targetBlank . '>'; $items .= '<a href="' . helper::baseUrl() . $parentPageId . '"' . $active . $targetBlank . '>';
} }
$items .= $this->getData(['page', $parentPageId, 'title']); $items .= $this->getData(['page', $parentPageId, 'title']);
$items .= '</a></li>'; $items .= '</a>';
} }
$itemsChildren = ''; $itemsChildren = '';
foreach($childrenPageIds as $childKey) { foreach($childrenPageIds as $childKey) {
@ -2169,7 +2169,10 @@ class layout extends common {
$items .= '<ul class="menuSideChild">'; $items .= '<ul class="menuSideChild">';
$items .= $itemsChildren; $items .= $itemsChildren;
$items .= '</ul>'; $items .= '</ul>';
} else {
$items .= '</li>';
} }
} }
if ($onlyChildren === false) { if ($onlyChildren === false) {
$items .= '</ul>'; $items .= '</ul>';
@ -2456,13 +2459,13 @@ class template {
'href' => 'javascript:void(0);', 'href' => 'javascript:void(0);',
'ico' => '', 'ico' => '',
'id' => $nameId, 'id' => $nameId,
'name' => $nameId, //'name' => $nameId,
'target' => '', 'target' => '',
'uniqueSubmission' => false, 'uniqueSubmission' => false,
'value' => 'Bouton' 'value' => 'Bouton'
], $attributes); ], $attributes);
// Retourne le html // Retourne le html
return sprintf( return sprintf(
'<a %s class="button %s %s %s">%s</a>', '<a %s class="button %s %s %s">%s</a>',
helper::sprintAttributes($attributes, ['class', 'disabled', 'ico', 'value']), helper::sprintAttributes($attributes, ['class', 'disabled', 'ico', 'value']),
$attributes['disabled'] ? 'disabled' : '', $attributes['disabled'] ? 'disabled' : '',
@ -3015,7 +3018,7 @@ class template {
'value' => 'Enregistrer' 'value' => 'Enregistrer'
], $attributes); ], $attributes);
// Retourne le html // Retourne le html
return sprintf( return sprintf(
'<button type="submit" class="%s%s" %s>%s</button>', '<button type="submit" class="%s%s" %s>%s</button>',
$attributes['class'], $attributes['class'],
$attributes['uniqueSubmission'] ? 'uniqueSubmission' : '', $attributes['uniqueSubmission'] ? 'uniqueSubmission' : '',

View File

@ -160,7 +160,7 @@ echo template::formOpen('pageEditForm'); ?>
</div> </div>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::checkbox('pageEditHideTitle', true, 'Titre masquée', [ <?php echo template::checkbox('pageEditHideTitle', true, 'Titre masqué', [
'checked' => $this->getData(['page', $this->getUrl(2), 'hideTitle']) 'checked' => $this->getData(['page', $this->getUrl(2), 'hideTitle'])
]); ?> ]); ?>
</div> </div>

View File

@ -157,7 +157,7 @@ class theme extends common {
'hide' => 'Caché' 'hide' => 'Caché'
]; ];
public static $radius = [ public static $radius = [
'0' => 'Aucun', '0px' => 'Aucun',
'5px' => 'Très léger', '5px' => 'Très léger',
'10px' => 'Léger', '10px' => 'Léger',
'15px' => 'Moyen', '15px' => 'Moyen',
@ -171,7 +171,7 @@ class theme extends common {
'repeat' => 'Sur les deux axes' 'repeat' => 'Sur les deux axes'
]; ];
public static $shadows = [ public static $shadows = [
'0' => 'Aucune', '0px' => 'Aucune',
'1px 1px 5px' => 'Très légère', '1px 1px 5px' => 'Très légère',
'1px 1px 10px' => 'Légère', '1px 1px 10px' => 'Légère',
'1px 1px 15px' => 'Moyenne', '1px 1px 15px' => 'Moyenne',

View File

@ -5,7 +5,7 @@
</div> </div>
<?php if ($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'hidePicture']) == false) { <?php if ($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'hidePicture']) == false) {
echo '<div class="blogArticlePicture"><img class="blogArticlePicture" src="' . helper::baseUrl(false) . self::FILE_DIR.'source/' . $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'picture']) . '"></div>'; echo '<div class="blogArticlePicture"><img class="blogArticlePicture" src="' . helper::baseUrl(false) . self::FILE_DIR.'source/' . $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'picture']) . '" alt="' . $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'picture']) . '"></div>';
} ?> } ?>
<?php echo $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'content']); ?> <?php echo $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'content']); ?>