From f7012b02bc314c5ff8817f00de77b51e3072bdc7 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Fri, 19 Aug 2016 14:19:44 +0000 Subject: [PATCH] done #603 0:20 --- framework/application/forms/CMS.php | 2 -- framework/application/forms/CMS/Base.php | 4 ++++ framework/application/views/helpers/ContactFooter.php | 10 +++++++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/framework/application/forms/CMS.php b/framework/application/forms/CMS.php index 1d899e7..1a2e0c0 100644 --- a/framework/application/forms/CMS.php +++ b/framework/application/forms/CMS.php @@ -5,5 +5,3 @@ class Fluidbook_Form_CMS extends CubeIT_Form_CMS { parent::init(); } } - -?> diff --git a/framework/application/forms/CMS/Base.php b/framework/application/forms/CMS/Base.php index 6b6d8f7..a76dffe 100644 --- a/framework/application/forms/CMS/Base.php +++ b/framework/application/forms/CMS/Base.php @@ -13,5 +13,9 @@ class Fluidbook_Form_CMS_Base extends Fluidbook_Form_CMS { $intro = new Fluidbook_Form_CMS_Sub_Intro(); $intro->setLegend('Introduction'); $this->addSubForm($intro, 'intro'); + + $contact=new CubeIT_Form_Element_Markitup('contact_footer'); + $contact->setLabel('Texte du bloc « Contactez-nous ». Laisser vide pour utiliser le texte par défaut'); + $this->addElement($contact); } } \ No newline at end of file diff --git a/framework/application/views/helpers/ContactFooter.php b/framework/application/views/helpers/ContactFooter.php index 37e6a60..44ec2ce 100644 --- a/framework/application/views/helpers/ContactFooter.php +++ b/framework/application/views/helpers/ContactFooter.php @@ -7,8 +7,12 @@ class Fluidbook_View_Helper_ContactFooter extends CubeIT_View_Helper_Abstract { public function contactFooter($cf = null) { if (null === $cf) { $cf = CubeIT_Util_Cms::unserialize($this->option('contact_footer')); + } + if ($this->contact_footer != '') { + $cf['content'] = $this->contact_footer; } + $this->addScriptAndStyle('103-contact-footer'); $res = $this->title($cf['title'], 'h2'); @@ -22,8 +26,8 @@ class Fluidbook_View_Helper_ContactFooter extends CubeIT_View_Helper_Abstract { $res = $this->backgroundBlock($res, $cf, array('content-wrapper')); return $this->htmlElement($res, 'section', array( - 'class' => 'contactFooter section', - 'data-themecolor' => '#8aab41', // Todo: possibly set this via the admin? - 'data-section-name' => 'contact')); + 'class' => 'contactFooter section', + 'data-themecolor' => '#8aab41', // Todo: possibly set this via the admin? + 'data-section-name' => 'contact')); } } \ No newline at end of file -- 2.39.5