]> _ Git - fluidbook-v3.git/commitdiff
wip #484 @0.25
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 30 Jun 2016 17:08:07 +0000 (17:08 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 30 Jun 2016 17:08:07 +0000 (17:08 +0000)
framework/application/controllers/AjaxController.php
less/315-quote.less

index 2551069247ebe1c67a79d87fe93a34b81e52dbec..c89c577a31e70bc6302ebed58827f3f9718907ea 100644 (file)
@@ -7,8 +7,14 @@ class AjaxController extends CubeIT_Controller_AjaxController {
 
                if ($form->isValid($_POST)) {
                        $url = 'https://workshop.fluidbook.com/ajax/demandeDevis?devis_form=' . base64_encode(serialize($_POST));
-                       fb($url);
-                       fb(file_get_contents($url));
+                       $xml = simplexml_load_file($url);
+
+                       $okmessage = array_pop($xml->xpath('//alert'));
+                       if(null!==$okmessage){
+                               $okmessage=(string)$okmessage->content;
+                       }
+                       
+                       $this->_datas->addReplace('#requestQuote', '<div id="confirmationQuote">' . $okmessage . '</div>');
                } else {
                        $this->_datas->refreshForm($form); // Respond with validation errors
                        $this->_datas->addAction('eval', 'displayErrors()');
index 6658ed22851308cbe7ff4338d4eca1df2fca4188..cc72e6785c4b984a0d2cd77503d98fc7cb629ca1 100644 (file)
                display: none;
        }
 
+}
+
+#confirmationQuote {
+       background-color: #f3f3f3;
+       font-family: @opensans;
+       font-weight: 300;
+       color: @color-text;
+       font-size: 22px;
+       padding: 200px 120px;
+       text-align: center;
 }
\ No newline at end of file