* @return array
*/
public function getCMSTemplates() {
-
-
$templates['texte'] = 'Texte';
$templates['fonctionnalites'] = 'Fonctionnalites';
$templates['exemples'] = 'Exemples';
$templates['exemplessub'] = 'Exemples (niveau 2)';
$templates['contact'] = 'Contact';
+ $templates['landingcampaign'] = 'Landing Campagne (Intro + formulaire)';
$templates['agences'] = 'Agences';
$templates['faq'] = 'FAQ';
$templates = array_merge($templates, parent::getCMSTemplates());
\r
class Fluidbook_Form_CMS_Contact extends Fluidbook_Form_CMS_Base {\r
\r
- public function init() {\r
- parent::init();\r
+ public function init() {\r
+ parent::init();\r
\r
- $resellers_title = new CubeIT_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
+ $form_first = new Zend_Form_Element_Checkbox('form_first');\r
+ $form_first->setLabel('Le formulaire de demande de devis apparaît en haut');\r
+ $this->addElement($form_first);\r
\r
- $resellers = new Fluidbook_Form_CMS_Sub_Resellers_Resellers();\r
- $resellers->setLegend('Revendeurs');\r
- $this->addSubForm($resellers, 'resellers');\r
+ $resellers_title = new CubeIT_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
- }\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
--- /dev/null
+<?php\r
+\r
+class Fluidbook_Form_CMS_Landingcampaign extends Fluidbook_Form_CMS_Base {\r
+\r
+ public function init() {\r
+ parent::init();\r
+\r
+ }\r
+\r
+}
\ No newline at end of file
$button->setLabel('Bouton');\r
$this->addSubForm($button, 'button');\r
\r
+ $headerTheme = new Zend_Form_Element_Checkbox('header_theme');\r
+ $headerTheme->setLabel('Thème du header clair');\r
+ $this->addElement($headerTheme);\r
+\r
+ $textcolor = new CubeIT_Form_Element_Color('text_color');\r
+ $textcolor->setLabel('Couleur du texte (laisser vide pour utiliser les couleurs par défaut)');\r
+ $this->addElement($textcolor);\r
+\r
$color = new CubeIT_Form_Element_Color('bg_color');\r
$color->setLabel('Couleur de fond');\r
$color->setValue('#ffffff');\r
public function introBlock($intro, $additionnalContent = '', $outsideContent = '', $paddingTop = true) {
$this->addScriptAndStyle('102-intro');
+
$res = '<div class="grid">';
$res .= '<div class="col-2">';
-
$res .= $this->title($intro['title']);
- $res .= $this->markupDotclear($intro['content']);
+ $res .= $this->_content($intro['content']);
if ($additionnalContent) {
$res .= $additionnalContent;
}
$attrs['class'][] = 'nopad';
}
- return $this->htmlElement($res, 'section', $attrs);
+ if ($intro['header_theme']) {
+ $attrs['data-header-theme'] = 'light';
+ }
+
+ $style = '';
+ if ($intro['text_color']) {
+ $s = '@color:' . $intro['text_color'] . ' ;';
+ $s .= '.intro{' . "\n";
+ $s .= 'h1,h2,h3,h4,h5,h6,b,strong,i,em,p,a,address{color:@color !important;}' . "\n";
+ $s .= 'h1.title,h2.title,hr{&:after{background-color:@color !important;}}' . "\n";
+ $s .= '}';
+ $style = $this->styleLess($s);
+ }
+
+ return $style . $this->htmlElement($res, 'section', $attrs);
+ }
+
+ protected function _content($c) {
+
+ $res = $this->markupDotclear($c);
+ if (stristr($res, '$adresse')) {
+ $address = $this->option('address');
+ $locale = new Zend_Locale();
+ $country = strtoupper($locale->getTranslation($address['pays'], 'Territory'));
+ $content = '<address>';
+ $content .= '<h4>' . $address['company'] . '</h4>';
+ $content .= $address['adresse'];
+ $content .= '<br>';
+ $content .= "{$address['code_postal']} {$address['ville']} - $country";
+ $content .= '<br>';
+ $content .= __('Tél :') . ' ' . $this->linkPhone($address['phone']);
+ $content .= '<br>';
+ $content .= __('email :') . ' ' . $this->linkEmail($address['email']);
+ $content .= '</address>';
+
+ $res = str_replace('$adresse', $content, $res);
+ }
+ return $res;
}
}
\ No newline at end of file
$content .= __('email :') . ' ' . $this->linkEmail($address['email']);\r
$content .= '</address>';\r
\r
-$res = '';\r
-\r
// Request Quote form\r
-$res .= $this->quoteForm(null, true);\r
+$form = $this->quoteForm(null, $this->form_first);\r
+\r
+$intro = '<div class="contact-intro">';\r
+$intro .= $this->introBlock($this->intro, $content, '', !$this->form_first);\r
+$intro .= '</div>'; // .contact-intro\r
\r
-$res .= '<div class="contact-intro">';\r
-$res .= $this->introBlock($this->intro, $content, '', false);\r
-$res .= '</div>'; // .contact-intro\r
+if ($this->form_first) {\r
+ $res = $form . $intro;\r
+} else {\r
+ $res = $intro . $form;\r
+}\r
\r
\r
// Resellers\r
--- /dev/null
+<?php\r
+\r
+//$this->headScript()->addScriptAndStyle('310-contact');\r
+\r
+// Request Quote form\r
+$form = $this->quoteForm(null, $this->form_first);\r
+\r
+$intro = '<div class="contact-intro">';\r
+$intro .= $this->introBlock($this->intro, '', '', !$this->form_first);\r
+$intro .= '</div>'; // .contact-intro\r
+\r
+$res = $intro . $form;\r
+\r
+echo $res;
\ No newline at end of file
registerLoader(load_intro);\r
\r
function load_intro(){\r
- \r
+ if($("section.intro:eq(0)").data('header-theme')!==null){\r
+ $("header").addClass($("section.intro:eq(0)").data('header-theme'));\r
+ }\r
}\r
color: #fff;\r
}\r
\r
-\r
html {\r
box-sizing: border-box;\r
}\r
width: 100%;\r
overflow: hidden;\r
}\r
+\r
.popupWindow {\r
-webkit-overflow-scrolling: touch;\r
background-color: #fff; // For some reason this is needed when using -webkit-overflow-scrolling or background is missing at bottom\r
opacity: 1;\r
}\r
}\r
+}\r
+\r
+address {\r
+ font-style: normal;\r
+\r
+ a {\r
+ text-decoration: none;\r
+ }\r
}
\ No newline at end of file
text-align: left;\r
}\r
}\r
+\r
+ hr {\r
+ border: 0;\r
+ height: 1px;\r
+ font-size: 50px;\r
+ .divider(1.4em);\r
+\r
+ @media @m900 {\r
+ font-size: 30px;\r
+ }\r
+ }\r
}\r
\r
blockquote {\r
}
}
}
-
- address {
- font-style: normal;
-
- a {
- text-decoration: none;
- }
- }
-
}
.resellers {