Final Update From Caleb

Incorporated all Caleb's changes
This commit is contained in:
2018-08-23 16:58:50 -07:00
parent 2593d0f977
commit 14bd554d35
206 changed files with 2661 additions and 84 deletions

View File

@@ -1 +1,20 @@
import './Contact.html';
import './Contact.html';
Template.Contact.events({
'click .send': function(event, template) {
let name = $('input[name="name"]').val();
let email = $('input[name="email"]').val();
let message = $('textarea[name="content"]').val();
if(template.$('form')[0].checkValidity() && name !== undefined && name.length > 0 && email !== undefined && email.length > 0 && message !== undefined && message.length > 0){
Meteor.call("submitContactForm", name, email, message, function(error, result) {
if(error) sAlert.error(error);
else sAlert.success("Your message has been received!");
});
}
else {
sAlert.error("Form not valid! Try again...");
}
}
});