]> _ Git - fluidbook-v3.git/commitdiff
Fix #687 @1
authorstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 16 Sep 2016 18:38:01 +0000 (18:38 +0000)
committerstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 16 Sep 2016 18:38:01 +0000 (18:38 +0000)
framework/application/controllers/AjaxController.php
framework/application/views/helpers/QuoteForm.php
less/315-quote.less

index b4eaf78c3620bb9ab0f967ec911542b2f57fcb1b..368beb5fb695f75159a9e296ea2ab6762659d17b 100644 (file)
@@ -22,7 +22,17 @@ class AjaxController extends CubeIT_Controller_AjaxController {
                                $okmessage = (string)$okmessage->content;
                        }
 
-                       $this->_datas->addReplace('#' . $formID, '<div id="confirmationQuote">' . $okmessage . '</div>');
+                       // If we're processing the popup form, the success message will replace the whole section including the text
+            // Otherwise, just the form itself is replaced.
+                       if ($formID == 'requestQuotePopup') {
+                           // Todo: work out why CSS isn't taking effect (see #confirmationQuote in 315-quote.less) - using inline CSS for now.
+                // Todo: see issue https://team.cubedesigners.com/redmine/issues/737 for possible cause
+                $this->_datas->addReplace('#' . $formID .'Wrapper', '<div id="confirmationQuote" style="background-color:#fff">' . $okmessage . '</div>');
+            } else {
+                $this->_datas->addReplace('#' . $formID, '<div id="confirmationQuote">' . $okmessage . '</div>');
+            }
+
+
                        $this->_datas->addGAEvent('form', 'sent', 'quote');
                } else {
                        $this->_datas->refreshForm($form); // Respond with validation errors
index 147d1368dd68b5b427d9d84c05a99c23b8cc10e7..1d67d89b4f670d90d60ce033d81c6daa916c62b4 100644 (file)
@@ -12,9 +12,11 @@ class Fluidbook_View_Helper_QuoteForm extends CubeIT_View_Helper_Abstract {
                if ($formID) {
                        $form->setId($formID);
                        $form->setAction($form->getAction() . '/' . $formID);
-               }
+               } else {
+            $formID = $form->getId();
+        }
 
-               $res = '<div class="request-quote content-wrapper grid">';
+               $res = '<div class="request-quote content-wrapper grid" id="'. $formID .'Wrapper">';
                $res .= '<div class="text col-2">';
                $res .= $this->title($this->option('quote_heading'));
                $res .= $this->markupDotclear($this->option('quote_description'));
index 3f7dfd54ca839094811211e0919e8af3dd1b58d3..49e36197ff1544d7e07a0af15eb27a778661e563 100644 (file)
        font-size: 22px;
        padding: 200px 120px;
        text-align: center;
+
+       .ajaxpopup & {
+               background-color: #fff;
+       }
 }
 
 .popupWindow .closePopup {