Template button, propriété help

This commit is contained in:
fredtempez 2022-01-20 13:39:42 +01:00
parent fc89f26d19
commit 51e6fd6b98
2 changed files with 6 additions and 3 deletions

View File

@ -19,15 +19,17 @@ class template {
'name' => $nameId,
'target' => '',
'uniqueSubmission' => false,
'value' => 'Bouton'
'value' => 'Bouton',
'help' => ''
], $attributes);
// Retourne le html
return sprintf(
'<a %s class="button %s %s %s">%s</a>',
'<a %s class="button %s %s %s" %s>%s</a>',
helper::sprintAttributes($attributes, ['class', 'disabled', 'ico', 'value']),
$attributes['disabled'] ? 'disabled' : '',
$attributes['class'],
$attributes['uniqueSubmission'] ? 'uniqueSubmission' : '',
$attributes['help'] ? ' title="' . $attributes['help'] . '" ': '',
($attributes['ico'] ? template::ico($attributes['ico'], 'right') : '') . $attributes['value']
);
}

View File

@ -21,7 +21,8 @@
<?php echo template::button('pageEditDelete', [
'class' => 'buttonRed',
'href' => helper::baseUrl() . 'page/delete/' . $this->getUrl(2) . '&csrf=' . $_SESSION['csrf'],
'value' => template::ico('cancel')
'value' => template::ico('cancel'),
'help' => 'Effacer la page'
]); ?>
</div>
<div class="col1">