From 39a63093fa2ac9416ed2e5ba38925ed87da969fb Mon Sep 17 00:00:00 2001 From: Taylor Dolan Date: Fri, 12 Aug 2016 10:25:47 -0700 Subject: [PATCH 1/3] put form error in popover --- src/js/signup.js | 5 +++-- src/styles/components/popover.scss | 7 +++++++ src/styles/pricing/pricing-hero.scss | 7 +++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/js/signup.js b/src/js/signup.js index ba122c0d..add90a5a 100644 --- a/src/js/signup.js +++ b/src/js/signup.js @@ -219,14 +219,15 @@ function submitForm(e) { function sundipValidation(resultMessage, form, formName) { var prevError = form.getElementsByClassName('red')[0]; var error = document.createElement('small'); + var submitButton = form.getElementsByTagName('button')[0]; if (prevError) { prevError.parentNode.removeChild(prevError); } - error.classList.add('small','red','text-center'); + error.classList.add('popover', 'bottom', 'in', 'small','red','text-center'); error.innerHTML = resultMessage; - form.appendChild(error); + submitButton.appendChild(error); analytics.ready(function() { analytics.track('Error ' + formName + '-list form', {error: resultMessage, clientId: ga.getAll()[0].get('clientId')}); diff --git a/src/styles/components/popover.scss b/src/styles/components/popover.scss index d89439d3..a012feae 100644 --- a/src/styles/components/popover.scss +++ b/src/styles/components/popover.scss @@ -90,6 +90,13 @@ visibility: hidden; z-index: 100; + &.in { + opacity: 1; + transform: scale3d(1,1,1) translate3d(-50%,0,0); + transition: all .15s ease-in-out; + visibility: visible; + } + &.bottom { box-shadow: 0 1px 3px rgba($black,.1); top: calc(100% + 12px); diff --git a/src/styles/pricing/pricing-hero.scss b/src/styles/pricing/pricing-hero.scss index 5e049605..63d1a031 100644 --- a/src/styles/pricing/pricing-hero.scss +++ b/src/styles/pricing/pricing-hero.scss @@ -1,6 +1,13 @@ .pricing-hero { padding-bottom: 0; + .popover { + line-height: 1.4; + white-space: normal; + width: 100%; + word-wrap: break-word; + } + .grid-block { overflow: visible; } From 286c7cefba2edac845489cddb77da0cf0590b505 Mon Sep 17 00:00:00 2001 From: Taylor Dolan Date: Fri, 12 Aug 2016 10:25:56 -0700 Subject: [PATCH 2/3] fix position of submit button --- src/html/private/preview-pricing/pricing-hero.hbs | 2 +- src/styles/pricing/pricing-hero.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/html/private/preview-pricing/pricing-hero.hbs b/src/html/private/preview-pricing/pricing-hero.hbs index 72fc5070..9263949d 100644 --- a/src/html/private/preview-pricing/pricing-hero.hbs +++ b/src/html/private/preview-pricing/pricing-hero.hbs @@ -49,7 +49,7 @@

Enterprise

-
+

No spam — we promise!

diff --git a/src/styles/pricing/pricing-hero.scss b/src/styles/pricing/pricing-hero.scss index 63d1a031..53fbf5ca 100644 --- a/src/styles/pricing/pricing-hero.scss +++ b/src/styles/pricing/pricing-hero.scss @@ -120,7 +120,7 @@ &.form { .price-wrapper { - margin-bottom: 11px; + margin-bottom: 20px; padding-top: 20px; } From 4cc9df88b2596344c3aa3c34a9937e7f3a7279df Mon Sep 17 00:00:00 2001 From: Taylor Dolan Date: Fri, 12 Aug 2016 10:29:31 -0700 Subject: [PATCH 3/3] move error popover style + delete unused style --- src/styles/pricing/pricing-hero.scss | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/styles/pricing/pricing-hero.scss b/src/styles/pricing/pricing-hero.scss index 53fbf5ca..8d1a6f14 100644 --- a/src/styles/pricing/pricing-hero.scss +++ b/src/styles/pricing/pricing-hero.scss @@ -1,13 +1,6 @@ .pricing-hero { padding-bottom: 0; - .popover { - line-height: 1.4; - white-space: normal; - width: 100%; - word-wrap: break-word; - } - .grid-block { overflow: visible; } @@ -144,16 +137,16 @@ } } - .divider { - background: $gray-lightest; - height: 1px; - margin: auto 0 20px; - width: 100%; - } - .input { margin-bottom: 10px; } + + .popover { + line-height: 1.4; + white-space: normal; + width: 100%; + word-wrap: break-word; + } } .sup {