]> _ Git - fluidbook-v3.git/commitdiff
Done #486 @2
authorstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 30 Jun 2016 14:51:52 +0000 (14:51 +0000)
committerstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 30 Jun 2016 14:51:52 +0000 (14:51 +0000)
framework/application/forms/CMS/Contact.php
framework/application/forms/CMS/Sub/Resellers/Reseller.php [new file with mode: 0644]
framework/application/forms/CMS/Sub/Resellers/Resellers.php [new file with mode: 0644]
framework/application/views/scripts/templates/contact.phtml
less/001-variables.less
less/220-exemples.less
less/310-contact.less
less/315-quote.less

index 48ec9354a7c350a601358c24bced6a5afdf0a82b..18552603ec12f2290c91f78fc24f748f7d7d8a33 100644 (file)
@@ -4,6 +4,16 @@ class Fluidbook_Form_CMS_Contact extends Fluidbook_Form_CMS_Base {
 \r
     public function init() {\r
         parent::init();\r
+\r
+        $resellers_title = new Zend_Form_Element_Textarea('resellers_title');\r
+        $resellers_title->setLabel('Titre pour bloc "Revendeurs internationaux"');\r
+        $resellers_title->setAttrib('rows', 3);\r
+        $this->addElement($resellers_title);\r
+\r
+        $resellers = new Fluidbook_Form_CMS_Sub_Resellers_Resellers();\r
+        $resellers->setLegend('Revendeurs');\r
+        $this->addSubForm($resellers, 'resellers');\r
+\r
     }\r
 \r
 }
\ 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 (file)
index 0000000..66ef0cf
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+
+class Fluidbook_Form_CMS_Sub_Resellers_Reseller extends CubeIT_Form_SubForm {
+
+    public function init() {
+        parent::init();
+        
+        $company = new Zend_Form_Element_Text('company');
+        $company->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 (file)
index 0000000..17826a1
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+
+class Fluidbook_Form_CMS_Sub_Resellers_Resellers extends CubeIT_Form_Multi_SubForm {
+    
+    public function init() {
+        parent::init();
+        
+        $reseller = new Fluidbook_Form_CMS_Sub_Resellers_Reseller();
+        $this->setBaseSubForm($reseller);
+        $this->setBaseLegend('Edition du revendeur « $company »');
+        $this->setNewLegend('Nouveau revendeur');
+        
+    }
+}
\ No newline at end of file
index 28daf2c05043884aac0fd631892cb018fd646713..297dc50fdff48a2db27165eb00912361cd4e8687 100644 (file)
@@ -25,5 +25,15 @@ $res .= '</div>'; // .contact-intro
 $res .= $this->quoteForm();\r
 \r
 // Resellers\r
+$res .= '<div class="resellers content-wrapper grid">';\r
+$res .= '<h1 class="title col-6">'. nl2br($this->resellers_title) .'</h1>';\r
+foreach ($this->resellers as $reseller) {\r
+    $res .= '<div class="reseller col-1">';\r
+    $res .= '<h4>'. $locale->getTranslation($reseller['country'], 'Territory') .'</h4>';\r
+    $res .= $reseller['company'];\r
+    $res .= $this->markupDotclear($reseller['details']);\r
+    $res .= '</div>'; // .reseller\r
+}\r
+$res .= '</div>'; // .resellers\r
 \r
 echo $res;
\ No newline at end of file
index 83b592a5549fc8ea2c2a34721fe2abbecb0b93c7..3800b5b848eebee1a3d1e5ecb916070566055b38 100644 (file)
@@ -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
index 26cf80a3d4650ce714d0ff311df87239ef71d4e2..9faff23b364eb43f69a3de74a014e8e871d59573 100644 (file)
@@ -41,7 +41,7 @@
                                background-color: #fff;\r
                        }\r
                        &:nth-of-type(odd) {\r
-                               background-color: #f3f3f3;\r
+                               background-color: @color-light-grey;\r
                        }\r
 \r
                        button {\r
index 6551b487af6e29308e8d6063d11bd02cb166322c..4a677460ecd2dec1f577ce6de1a7d9db100db5d7 100644 (file)
@@ -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;
     .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;
 
     }
   }
 
+}
+
+.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
index 720ddd1b263f8dbee85535b64a309d391fb0222a..5b1ee852ba13b5109009541789acf3a7589c29e0 100644 (file)
@@ -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;
     }