From 9b847547f336e8e20c604cfdf5d07d0729dc67fb Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Sun, 16 Aug 2020 16:24:09 +0200 Subject: [PATCH] =?UTF-8?q?Textes=20par=20d=C3=A9faut=20dans=20la=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/search/search.php | 9 +++++++-- module/search/view/config/config.php | 13 ++++++++++--- module/search/view/index/index.php | 5 +++-- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/module/search/search.php b/module/search/search.php index 39b2f15c..ee06f007 100755 --- a/module/search/search.php +++ b/module/search/search.php @@ -33,6 +33,10 @@ class search extends common { public static $motentier = ''; + public static $defaultButtonText = 'Rechercher'; + + public static $defaultPlaceHolder = 'Un mot clé ou une phrase entière sans guillemets'; + const SEARCH_VERSION = '1.1'; // Configuration vide @@ -41,7 +45,8 @@ class search extends common { // Soumission du formulaire $this->setData(['module', $this->getUrl(0), [ 'submitText' => $this->getInput('searchSubmitText'), - 'placeHolder' => $this->getInput('searchPlaceHolder') + 'placeHolder' => $this->getInput('searchPlaceHolder'), + 'resultHideContent' => $this->getInput('searchResultHideContent',helper::FILTER_BOOLEAN) ]]); // Valeurs en sortie, affichage du formulaire $this->addOutput([ @@ -156,7 +161,7 @@ class search extends common { 'notification' => $notification, 'state' => $success, 'showBarEditButton' => true, - 'showPageContent' => true + 'showPageContent' => !$this->getData(['module', $this->getUrl(0),'resultHideContent']) ]); } else { // Valeurs en sortie, affichage du formulaire diff --git a/module/search/view/config/config.php b/module/search/view/config/config.php index ab7416fe..f3dc2d59 100755 --- a/module/search/view/config/config.php +++ b/module/search/view/config/config.php @@ -21,17 +21,24 @@ 'Texte du bouton de soumission', 'value' => $this->getData(['module', $this->getUrl(0), 'submitText']), - 'placeholder' => 'Rechercher' + 'placeholder' => $module::$defaultButtonText ]); ?>
'Texte dans la zone de recherche', + 'label' => 'Aide dans la zone de saisie', 'value' => $this->getData(['module', $this->getUrl(0), 'placeHolder']), - 'placeholder' => 'Saisissez vos mots clés ou une phrase' + 'placeholder' => $module::$defaultPlaceHolder ]); ?>
+
+
+ $this->getData(['module', $this->getUrl(0), 'resultHideContent']), + ]); ?> +
+
diff --git a/module/search/view/index/index.php b/module/search/view/index/index.php index d01ec1d6..336f6633 100755 --- a/module/search/view/index/index.php +++ b/module/search/view/index/index.php @@ -4,12 +4,13 @@
$this->getData(['module',$this->getUrl(0),'placeHolder']) ? $this->getData(['module',$this->getUrl(0),'placeHolder']) : 'Saisissez vos mots clés ou une phrase' + 'placeholder' => $this->getData(['module',$this->getUrl(0),'placeHolder']) ? $this->getData(['module',$this->getUrl(0),'placeHolder']) : $module::$defaultPlaceHolder, + 'value' => $module::$motclef ]); ?>
$this->getData(['module',$this->getUrl(0),'submitText']) ? $this->getData(['module',$this->getUrl(0),'submitText']) : 'Rechercher' + 'value' => $this->getData(['module',$this->getUrl(0),'submitText']) ? $this->getData(['module',$this->getUrl(0),'submitText']) : $module::$defaultButtonText ]); ?>