From ca4eab0ff534e8b94b6e017300d003a7f50cfbf7 Mon Sep 17 00:00:00 2001 From: Shipow Date: Wed, 22 Jun 2016 22:44:36 +0200 Subject: [PATCH] fix(contact-form): Fixed display success wrapper --- docs/source/contact.html.haml | 6 ++---- docs/source/stylesheets/components/_inputs.scss | 3 +++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/source/contact.html.haml b/docs/source/contact.html.haml index 4be9cd401..d8a8451e5 100644 --- a/docs/source/contact.html.haml +++ b/docs/source/contact.html.haml @@ -9,7 +9,7 @@ subtitle: Turn any <input> into an address autocomplete .container %div %h2.title Contact Us - #form-message-success + #form-message-success.hide %form#form-contact{:action => "https://goto.algolia.com/l/139121/2016-06-21/gbdyh", :method => "post", :onsubmit => "return validateForm()"} .col-6 .form-group @@ -63,18 +63,16 @@ subtitle: Turn any <input> into an address autocomplete } }; - - (function() { var formState = getUrlParameter('form'); if (formState === 'success'){ document.getElementById("form-message-success").innerHTML="Thank you for contacting us regarding Algolia Places, we'll be in touch shortly.

Return to Places homepage or learn more about Algolia"; + document.getElementById("form-message-success").className = ""; document.getElementById("form-contact").className += " hide"; } - var placesAutocomplete = places({ container: document.querySelector('#country'), type: 'country', diff --git a/docs/source/stylesheets/components/_inputs.scss b/docs/source/stylesheets/components/_inputs.scss index 06d1ac8c0..509de2c67 100644 --- a/docs/source/stylesheets/components/_inputs.scss +++ b/docs/source/stylesheets/components/_inputs.scss @@ -69,6 +69,9 @@ input { padding: 30px; text-align: center; border-radius: 4px; + &.hide{ + display: none; + } } #form-contact {