From 318458b9489ac35894060af49df09dc22d24bf0c Mon Sep 17 00:00:00 2001 From: fredtempez Date: Thu, 20 Jan 2022 13:39:42 +0100 Subject: [PATCH] =?UTF-8?q?Template=20button,=20propri=C3=A9t=C3=A9=20help?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/class/template.class.php | 6 ++++-- core/module/page/view/edit/edit.php | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/core/class/template.class.php b/core/class/template.class.php index 16cbef01..47c24f93 100644 --- a/core/class/template.class.php +++ b/core/class/template.class.php @@ -19,15 +19,17 @@ class template { 'name' => $nameId, 'target' => '', 'uniqueSubmission' => false, - 'value' => 'Bouton' + 'value' => 'Bouton', + 'help' => '' ], $attributes); // Retourne le html return sprintf( - '%s', + '%s', 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'] ); } diff --git a/core/module/page/view/edit/edit.php b/core/module/page/view/edit/edit.php index 6cf6be20..72ccf753 100644 --- a/core/module/page/view/edit/edit.php +++ b/core/module/page/view/edit/edit.php @@ -21,7 +21,8 @@ 'buttonRed', 'href' => helper::baseUrl() . 'page/delete/' . $this->getUrl(2) . '&csrf=' . $_SESSION['csrf'], - 'value' => template::ico('cancel') + 'value' => template::ico('cancel'), + 'help' => 'Effacer la page' ]); ?>