From: stephen@cubedesigners.com Date: Thu, 30 Jun 2016 14:51:52 +0000 (+0000) Subject: Done #486 @2 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=476bc8c0e31ffb3fa943e7f38ab50e64485d5c3c;p=fluidbook-v3.git Done #486 @2 --- diff --git a/framework/application/forms/CMS/Contact.php b/framework/application/forms/CMS/Contact.php index 48ec935..1855260 100644 --- a/framework/application/forms/CMS/Contact.php +++ b/framework/application/forms/CMS/Contact.php @@ -4,6 +4,16 @@ class Fluidbook_Form_CMS_Contact extends Fluidbook_Form_CMS_Base { public function init() { parent::init(); + + $resellers_title = new Zend_Form_Element_Textarea('resellers_title'); + $resellers_title->setLabel('Titre pour bloc "Revendeurs internationaux"'); + $resellers_title->setAttrib('rows', 3); + $this->addElement($resellers_title); + + $resellers = new Fluidbook_Form_CMS_Sub_Resellers_Resellers(); + $resellers->setLegend('Revendeurs'); + $this->addSubForm($resellers, 'resellers'); + } } \ No newline at end of file diff --git a/framework/application/forms/CMS/Sub/Resellers/Reseller.php b/framework/application/forms/CMS/Sub/Resellers/Reseller.php new file mode 100644 index 0000000..66ef0cf --- /dev/null +++ b/framework/application/forms/CMS/Sub/Resellers/Reseller.php @@ -0,0 +1,20 @@ +setLabel('Nom de la société'); + $this->addElement($company); + + $country = new CubeIT_Form_Element_Country('country'); + $country->setLabel('Pays'); + $this->addElement($country); + + $details = new CubeIT_Form_Element_Markitup('details'); + $details->setLabel('Details'); + $this->addElement($details); + } +} \ No newline at end of file diff --git a/framework/application/forms/CMS/Sub/Resellers/Resellers.php b/framework/application/forms/CMS/Sub/Resellers/Resellers.php new file mode 100644 index 0000000..17826a1 --- /dev/null +++ b/framework/application/forms/CMS/Sub/Resellers/Resellers.php @@ -0,0 +1,14 @@ +setBaseSubForm($reseller); + $this->setBaseLegend('Edition du revendeur « $company »'); + $this->setNewLegend('Nouveau revendeur'); + + } +} \ No newline at end of file diff --git a/framework/application/views/scripts/templates/contact.phtml b/framework/application/views/scripts/templates/contact.phtml index 28daf2c..297dc50 100644 --- a/framework/application/views/scripts/templates/contact.phtml +++ b/framework/application/views/scripts/templates/contact.phtml @@ -25,5 +25,15 @@ $res .= ''; // .contact-intro $res .= $this->quoteForm(); // Resellers +$res .= '
'; +$res .= '

'. nl2br($this->resellers_title) .'

'; +foreach ($this->resellers as $reseller) { + $res .= '
'; + $res .= '

'. $locale->getTranslation($reseller['country'], 'Territory') .'

'; + $res .= $reseller['company']; + $res .= $this->markupDotclear($reseller['details']); + $res .= '
'; // .reseller +} +$res .= '
'; // .resellers echo $res; \ No newline at end of file diff --git a/less/001-variables.less b/less/001-variables.less index 83b592a..3800b5b 100644 --- a/less/001-variables.less +++ b/less/001-variables.less @@ -15,6 +15,7 @@ @color-footer-bg-secondary: #161e26; @color-green: #8aab41; @color-header-grey: #2a3743; +@color-light-grey: #f3f3f3; @color-error: #c91818; //-- Content and breakpoints diff --git a/less/220-exemples.less b/less/220-exemples.less index 26cf80a..9faff23 100644 --- a/less/220-exemples.less +++ b/less/220-exemples.less @@ -41,7 +41,7 @@ background-color: #fff; } &:nth-of-type(odd) { - background-color: #f3f3f3; + background-color: @color-light-grey; } button { diff --git a/less/310-contact.less b/less/310-contact.less index 6551b48..4a67746 100644 --- a/less/310-contact.less +++ b/less/310-contact.less @@ -1,5 +1,17 @@ @import "000-imports"; +.contact { + h4 { + .font-thinning(); + color: @color-text; + font-family: @montserrat; + font-weight: 600; + font-size: 15px; + text-transform: uppercase; + margin-bottom: 10px; + } +} + .contact-intro { background-repeat: no-repeat; background-position: bottom right; @@ -15,16 +27,6 @@ .divider(); } - h4 { - .font-thinning(); - color: @color-text; - font-family: @montserrat; - font-weight: 600; - font-size: 15px; - text-transform: uppercase; - margin-bottom: 10px; - } - address { font-style: normal; @@ -33,4 +35,16 @@ } } +} + +.resellers { + background-color: @color-light-grey; + flex-wrap: wrap; + margin-bottom: -30px; // Global offset for the bottom margin on .reseller items +} + +.reseller { + padding-right: 30px; + min-width: 240px; + margin-bottom: 30px; // Needed when items wrap } \ No newline at end of file diff --git a/less/315-quote.less b/less/315-quote.less index 720ddd1..5b1ee85 100644 --- a/less/315-quote.less +++ b/less/315-quote.less @@ -46,6 +46,7 @@ background-position: center right; background-repeat: no-repeat; padding-right: 40px; + height: 53px; } textarea { @@ -63,7 +64,7 @@ .tips { margin-top: 42px; padding: 20px 30px; - background-color: #f3f3f3; + background-color: @color-light-grey; min-height: 170px; // Same as textarea height position: relative; @@ -77,7 +78,7 @@ position: absolute; pointer-events: none; border: 16px solid transparent; - border-right-color: #f3f3f3; + border-right-color: @color-light-grey; margin-top: -16px; }