--- /dev/null
+<?php
+
+class Fluidbook_Form_RequestQuote extends CubeIT_Form {
+
+ public function init() {
+ parent::init();
+
+ $last_name = new Zend_Form_Element_Text('last_name');
+ $last_name->setLabel(__('Votre nom'));
+ $last_name->setRequired(true);
+ $last_name->addErrorMessage(__('Votre nom est obligatoire'));
+ $this->addElement($last_name);
+
+ $first_name = new Zend_Form_Element_Text('first_name');
+ $first_name->setLabel(__('Prénom'));
+ $first_name->setRequired(true);
+ $first_name->addErrorMessage(__('Votre prénom est obligatoire'));
+ $this->addElement($first_name);
+
+ $company = new Zend_Form_Element_Text('company');
+ $company->setLabel(__('Nom de la société'));
+ $company->setRequired(true);
+ $company->addErrorMessage(__('Champ obligatoire'));
+ $this->addElement($company);
+
+ $contact_type = new Zend_Form_Element_Select('contact_type');
+ $contact_type->setLabel(__('Vous êtes'));
+ $contact_type->setMultiOptions(array(
+ '' => __("???"), // Todo: set options
+ ));
+ $contact_type->setAttrib('required', 'required'); // Needed so we can style the first element when nothing selected
+ $contact_type->setRequired(true);
+ $contact_type->addErrorMessage(__('Champ obligatoire'));
+ $this->addElement($contact_type);
+
+ $email = new CubeIT_Form_Element_Email('email');
+ $email->setLabel(__('Email professionnel'));
+ $email->setRequired(true);
+ $email->addErrorMessage(__('E-mail invalide'));
+ $this->addElement($email);
+
+ $phone = new Zend_Form_Element_Text('phone');
+ $phone->setLabel(__('Téléphone'));
+ $phone->setRequired(false);
+ $phone->addErrorMessage(__('Champ obligatoire'));
+ $this->addElement($phone);
+
+ $comments = new Zend_Form_Element_Textarea('comments');
+ $comments->setLabel(__('Commentaires sur votre projet'));
+ $this->addElement($comments);
+
+ $submit = new Zend_Form_Element_Button('submit');
+ $submit->setLabel(__('Envoyer la demande'));
+ $submit->setAttrib('class', 'submit-button');
+ $submit->setAttrib('type', 'submit');
+ $this->addElement($submit);
+
+ }
+
+}
\ No newline at end of file
$adresse->setLabel('Adresse');
$this->addSubFormLocalized($adresse, 'address');
+ $quote_heading = new CubeIT_Form_Element_Textarea('quote_heading');
+ $quote_heading->setAttrib('rows', 3);
+ $quote_heading->setLabel('"Demander un Devis" titre');
+ $this->addElementLocalized($quote_heading);
+
+ $quote_description = new CubeIT_Form_Element_Markitup('quote_description');
+ $quote_description->setLabel('"Demander un Devis" texte');
+ $this->addElementLocalized($quote_description);
+
+ $quote_form_tips = new CubeIT_Form_Element_Markitup('quote_form_tips');
+ $quote_form_tips->setLabel('Conseils de forme "Demander un Devis"');
+ $this->addElementLocalized($quote_form_tips);
+
$footer_menu_main = new Fluidbook_Form_CMS_Element_PagesTagList('footer_menu_main');
$footer_menu_main->setLabel('Pages for menu "Plan du site"');
$footer_menu_main->setAttrib('placeholder', 'Tapez un titre de la page');
CubeIT_Image::getDimensions($intro_image_path, $intro_image_width, $intro_image_height);\r
$intro_ratio = $intro_image_height / $intro_image_width;\r
\r
-$res .= '<div class="contact-intro content-wrapper" \r
+$res .= '<div class="contact-intro content-wrapper no-shrink" \r
style="background-image: url('. $intro_image_path .');"\r
data-bg-ratio="'. $intro_ratio .'">';\r
\r
+$res .= '<div class="grid">';\r
+$res .= '<div class="col-2">';\r
+\r
$res .= '<h1 class="title">'. nl2br($this->intro_title) .'</h1>';\r
$res .= $this->markupDotclear($this->intro_content);\r
\r
$res .= __('email :') . ' ' . $this->linkEmail($address['email']);\r
$res .= '</address>';\r
\r
+$res .= '</div>'; // .col-2\r
+$res .= '</div>'; // .grid\r
$res .= '</div>'; // .contact-intro\r
\r
+// Request Quote form\r
+$res .= '<div class="request-quote content-wrapper grid">';\r
+$res .= '<div class="text col-2">';\r
+$res .= '<h1 class="title">'. nl2br($this->option('quote_heading')) .'</h1>';\r
+$res .= $this->markupDotclear($this->option('quote_description'));\r
+$res .= '</div>'; // .col-2\r
+$res .= '<div class="form col-4">';\r
+$form = new Fluidbook_Form_RequestQuote();\r
+$res .= $form;\r
+$res .= $this->markupDotclear($this->option('quote_form_tips'));\r
+$res .= '</div>'; // .col-4\r
+$res .= '</div>'; // .request-quote\r
+\r
+// Resellers\r
+\r
echo $res;
\ No newline at end of file
//-- Content and breakpoints
@mobile-breakpoint: 1024px;
+@desktop-min-width: 1200px;
@content-max-width: 1680px;
\ No newline at end of file
@import "000-imports";\r
\r
-*{\r
+html {\r
box-sizing: border-box;\r
}\r
+*, *:before, *:after {\r
+ box-sizing: inherit;\r
+}\r
\r
body {\r
background-color: @color-body-bg;\r
line-height: 26/14;\r
}\r
\r
-main{\r
+main {\r
background-color: #fff;\r
max-width: @content-max-width;\r
margin: 0 auto;\r
\r
.content-wrapper {\r
width: 100%;\r
- padding: 0 5%;\r
+ padding-top: 5%;\r
+ padding-bottom: 5%;\r
+\r
+ &:first-of-type {\r
+ padding-top: 152px; // Minimum clearance and top for fixed menu\r
+ }\r
+}\r
+\r
+.no-shrink {\r
+ min-width: @desktop-min-width;\r
}\r
\r
.cubeit-content{\r
width: 90%;\r
margin:0 auto;\r
-}
\ No newline at end of file
+}\r
+\r
+// Simple Flexbox Grid\r
+.grid {\r
+ display: flex;\r
+ padding-left: 5%;\r
+ padding-right: 5%;\r
+}\r
+.col {\r
+ flex: 1 0 auto;\r
+}\r
+// Grid contains 6 columns without gutters\r
+.col-1 { flex-basis: percentage(1/6); }\r
+.col-2 { flex-basis: percentage(2/6); }\r
+.col-3 { flex-basis: percentage(3/6); }\r
+.col-4 { flex-basis: percentage(4/6); }\r
+.col-5 { flex-basis: percentage(5/6); }\r
+.col-6 { flex-basis: percentage(6/6); }\r
}
}
+}
+
+// Request a quote section
+.request-quote {
+ .text {
+ padding-right: 30px;
+ }
}
\ No newline at end of file