Added validate on email

This commit is contained in:
Kasper Rynning-Tønnesen
2016-02-09 08:12:10 +01:00
parent 67e1f47fab
commit 1971783bbd
5 changed files with 19 additions and 17 deletions

View File

@@ -6,7 +6,7 @@
<h4>Want to contact us?</h4> <h4>Want to contact us?</h4>
<div id="contact-container"> <div id="contact-container">
<form id="contact-form" method="post" onsubmit="return false;"> <form id="contact-form" method="post" onsubmit="return false;">
<input id="contact-form-from" name="from" type="email" placeholder="your@mail.com" autocomplete="off"> <input id="contact-form-from" name="from" type="email" placeholder="your@mail.com" autocomplete="off" class="validate">
<input id="contact-form-message" name="message" type="text" placeholder="Your message to us..." autocomplete="off"> <input id="contact-form-message" name="message" type="text" placeholder="Your message to us..." autocomplete="off">
<button class="contact-button-submit" action="submit" id="submit-contact-form">Send</button> <button class="contact-button-submit" action="submit" id="submit-contact-form">Send</button>
<div class="valign hide" id="send-loader"> <div class="valign hide" id="send-loader">

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -170,6 +170,7 @@ var Helper = {
send_mail: function(from, message){ send_mail: function(from, message){
if(from != "" && message != ""){
$.ajax({ $.ajax({
type: "POST", type: "POST",
data: {from: from, message: message}, data: {from: from, message: message},
@@ -185,6 +186,7 @@ var Helper = {
} }
}); });
} }
}
} }