From a761932ce594d409319c06a3bf96951adaad5a1b Mon Sep 17 00:00:00 2001 From: Chuck Williams Date: Thu, 9 Feb 2017 01:03:37 -0700 Subject: [PATCH] WIP: send-contact-email. --- _config.yml | 3 +- _includes/hero/contact.html | 62 ++++++++++++++++++------------------- src/js/contact.js | 11 +++++++ 3 files changed, 44 insertions(+), 32 deletions(-) diff --git a/_config.yml b/_config.yml index 7513c40..e5780df 100644 --- a/_config.yml +++ b/_config.yml @@ -21,7 +21,8 @@ description: Digital Cash url: https://www.dash.org -api: /api/v1 +#api: /api/v1 +api: "http://localhost:8080" languages: ["en", "es", "cn", "pt", "ru", "it"] exclude_from_localizations: ["assets","dist","style-guide"] diff --git a/_includes/hero/contact.html b/_includes/hero/contact.html index dfe3703..5876f0f 100644 --- a/_includes/hero/contact.html +++ b/_includes/hero/contact.html @@ -20,37 +20,37 @@ Contact us.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ + +
+
+
diff --git a/src/js/contact.js b/src/js/contact.js index 89040ef..98f4d2f 100755 --- a/src/js/contact.js +++ b/src/js/contact.js @@ -9,6 +9,17 @@ console.log(name, email, category, message); $(this).closest('form').find('input[type=text], textarea').val(''); + + $.post("http://localhost:8080/send-contact-email/",{ + from: name, + email: email, + subject: category, + message: message + }, function(response){ + console.info('Message sent: ' , response); + }) + + $('#msg_sent').css('display', 'inline-block'); $('#msg_sent').fadeOut(3000); });