From 2bcfe657e92c394ca214ad3b6b65862a091dabea Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Mon, 20 Jun 2016 16:44:30 +0000 Subject: [PATCH] #4 --- framework/application/configs/application.ini | 2 +- .../application/forms/Contactdetails.php | 33 +++++++++++++++++ framework/application/forms/Settings.php | 14 ++++++-- .../views/scripts/common/content.phtml | 6 ++++ .../views/scripts/common/footer.phtml | 5 +++ .../views/scripts/common/header.phtml | 35 +++++++++++++++++++ 6 files changed, 92 insertions(+), 3 deletions(-) create mode 100644 framework/application/forms/Contactdetails.php create mode 100644 framework/application/views/scripts/common/content.phtml create mode 100644 framework/application/views/scripts/common/footer.phtml create mode 100644 framework/application/views/scripts/common/header.phtml diff --git a/framework/application/configs/application.ini b/framework/application/configs/application.ini index 7c1371e..a4e59af 100644 --- a/framework/application/configs/application.ini +++ b/framework/application/configs/application.ini @@ -65,7 +65,7 @@ seo.universalAnalytics = httpauth.username = fluidbook httpauth.password = fb2016 -httpauth.ip_whitelist[] = 81.57.231.18 +httpauth.ip_whitelist[] = 88.190.245.49 httpauth.ip_whitelist[] = 82.216.164.184 robots = false diff --git a/framework/application/forms/Contactdetails.php b/framework/application/forms/Contactdetails.php new file mode 100644 index 0000000..d489b49 --- /dev/null +++ b/framework/application/forms/Contactdetails.php @@ -0,0 +1,33 @@ +setLabel('Nom'); + $company->setOrder(5); + $this->addElement($company); + + $phone = new CubeIT_Form_Element_Phone('phone'); + $phone->setLabel('Téléphone'); + $phone->setOrder(50); + $this->addElement($phone); + + $email = new CubeIT_Form_Element_Email('email'); + $email->setLabel('Email'); + $email->setOrder(60); + $this->addElement($email); + + $website = new CubeIT_Form_Element_Url('website'); + $website->setLabel('Site internet'); + $website->setOrder(70); + $this->addElement($website); + } + +} \ No newline at end of file diff --git a/framework/application/forms/Settings.php b/framework/application/forms/Settings.php index 397b567..1718b54 100644 --- a/framework/application/forms/Settings.php +++ b/framework/application/forms/Settings.php @@ -15,10 +15,20 @@ class Fluidbook_Form_Settings extends CubeIT_Form_Settings { $description->setLabel('Description de la page par défaut'); $this->addElementLocalized($description); - $footer=new CubeIT_Form_Element_Markitup('footer'); + $adresse = new Fluidbook_Form_Contactdetails('address'); + $adresse->setLabel('Adresse'); + $this->addSubFormLocalized($adresse, 'address'); + + $footer = new CubeIT_Form_Element_Markitup('footer'); $footer->setLabel('Footer'); - $footer->setAttrib('rows',6); + $footer->setAttrib('rows', 6); $this->addElementLocalized($footer); + + $workshop = new CubeIT_Form_Element_Link('workshop'); + $workshop->setLabel('Lien Workshop'); + $workshop->fileEnabled(false); + $workshop->pageEnabled(false); + $this->addSubFormLocalized($workshop, 'workshop'); } } \ No newline at end of file diff --git a/framework/application/views/scripts/common/content.phtml b/framework/application/views/scripts/common/content.phtml new file mode 100644 index 0000000..d6b5ab2 --- /dev/null +++ b/framework/application/views/scripts/common/content.phtml @@ -0,0 +1,6 @@ +layout()->content . "\n"; +echo $this->render('common/header.phtml'); +echo $content; +echo $this->render('common/footer.phtml'); diff --git a/framework/application/views/scripts/common/footer.phtml b/framework/application/views/scripts/common/footer.phtml new file mode 100644 index 0000000..a85fdda --- /dev/null +++ b/framework/application/views/scripts/common/footer.phtml @@ -0,0 +1,5 @@ +'; + +$res .= ''; +echo $res; \ No newline at end of file diff --git a/framework/application/views/scripts/common/header.phtml b/framework/application/views/scripts/common/header.phtml new file mode 100644 index 0000000..f75068b --- /dev/null +++ b/framework/application/views/scripts/common/header.phtml @@ -0,0 +1,35 @@ +headScript() + ->addScriptAndStyle('header') + ->addGSAP(); + +$homepage = $this->navigation()->getContainer()->findOneById($this->localeDefault() . '/1'); +$home = '/'; +if (!is_null($homepage)) { + $home = $homepage->getHref(); +} +?> +
+ +
\ No newline at end of file -- 2.39.5