$contact_type = new Zend_Form_Element_Select('contact_type');
$contact_type->setLabel(__('Vous êtes'));
$contact_type->setMultiOptions(array(
- '' => __("???"), // Todo: set options
+ '' => '',
+ 'agency' => 'Une agence de communication',
+ 'freelancer' => 'Un créatif freelance',
+ 'company' => 'Une société',
+ 'other' => 'Autre',
));
$contact_type->setAttrib('required', 'required'); // Needed so we can style the first element when nothing selected
$contact_type->setRequired(true);
$comments->setLabel(__('Commentaires sur votre projet'));
$this->addElement($comments);
+ $tips = new CubeIT_Form_Element_Html('tips');
+ $tips->setContent('<!-- TIPS -->'); // Just a placeholder for CMS content
+ $this->addElement($tips);
+
$submit = new Zend_Form_Element_Button('submit');
$submit->setLabel(__('Envoyer la demande'));
$submit->setAttrib('class', 'submit-button');
--- /dev/null
+<?php
+
+class Fluidbook_View_Helper_IntroBlock extends CubeIT_View_Helper_Abstract {
+
+ public function introBlock($title, $content, $bg_image = null, $bg_color = null) {
+
+ $style = '';
+ $extra_attributes = '';
+
+ if ($bg_image) {
+ $image_path = CubeIT_View_Helper_ImageCms::getPath($bg_image);
+
+ // Work out the ratio of the background image
+ CubeIT_Image::getDimensions($image_path, $image_width, $image_height);
+ $image_ratio = $image_height / $image_width;
+
+ $style = "background-image: url($image_path);";
+ $extra_attributes = 'data-bg-ratio="'. $image_ratio .'"';
+ }
+
+ if ($bg_color) {
+ $style .= "background-color: $bg_color";
+ }
+
+
+ $res = '<div class="content-wrapper no-shrink" style="'. $style .'"'. $extra_attributes .'>';
+
+ $res .= '<div class="grid">';
+ $res .= '<div class="col-2">';
+
+ $res .= '<h1 class="title">'. nl2br($title) .'</h1>';
+ $res .= $content;
+
+ $res .= '</div>'; // .col-2
+ $res .= '</div>'; // .grid
+ $res .= '</div>'; // .content-wrapper
+
+ return $res;
+ }
+}
\ No newline at end of file
--- /dev/null
+<?php
+
+class Fluidbook_View_Helper_QuoteForm extends CubeIT_View_Helper_Abstract {
+
+ public function quoteForm() {
+
+ $res = '<div class="request-quote content-wrapper grid">';
+ $res .= '<div class="text col-2">';
+ $res .= '<h1 class="title">'. nl2br($this->option('quote_heading')) .'</h1>';
+ $res .= $this->markupDotclear($this->option('quote_description'));
+ $res .= '</div>'; // .col-2
+ $res .= '<div class="form col-4">';
+ $form = new Fluidbook_Form_RequestQuote();
+ $tips = $this->markupDotclear($this->option('quote_form_tips'), [], ['class' => 'tips']);
+ $res .= str_replace('<!-- TIPS -->', '<div id="wrap-tips">'. $tips .'</div>', $form); // Inject tips HTML into form via placeholder
+ $res .= '</div>'; // .col-4
+ $res .= '</div>'; // .request-quote
+
+ return $res;
+ }
+}
\ No newline at end of file