Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
fix(contact-form): Fixed display success wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
Shipow committed Jun 22, 2016
1 parent 04be137 commit ca4eab0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 2 additions & 4 deletions docs/source/contact.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ subtitle: Turn any <code>&lt;input&gt;</code> 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
Expand Down Expand Up @@ -63,18 +63,16 @@ subtitle: Turn any <code>&lt;input&gt;</code> 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.<br><br>Return to <a href='https://community.algolia.com/places'>Places homepage</a> or <a href='https://www.algolia.com/product'>learn more about Algolia</a>";
document.getElementById("form-message-success").className = "";
document.getElementById("form-contact").className += " hide";
}


var placesAutocomplete = places({
container: document.querySelector('#country'),
type: 'country',
Expand Down
3 changes: 3 additions & 0 deletions docs/source/stylesheets/components/_inputs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ input {
padding: 30px;
text-align: center;
border-radius: 4px;
&.hide{
display: none;
}
}

#form-contact {
Expand Down

0 comments on commit ca4eab0

Please sign in to comment.