diff --git a/controllers/contact.js b/controllers/contact.js index e680e01970..ac68f03fd3 100644 --- a/controllers/contact.js +++ b/controllers/contact.js @@ -8,9 +8,7 @@ var sendgrid = require('sendgrid')(secrets.sendgrid.user, secrets.sendgrid.pass exports.getContact = function(req, res) { res.render('contact', { - title: 'Contact', - success: req.flash('success'), - errors: req.flash('errors') + title: 'Contact' }); }; @@ -53,7 +51,7 @@ exports.postContact = function(req, res) { req.flash('errors', { msg: err.message }); return res.redirect('/contact'); } - req.flash('success', 'Email has been sent successfully!'); + req.flash('success', { msg: 'Email has been sent successfully!' }); res.redirect('/contact'); }); }; diff --git a/views/contact.jade b/views/contact.jade index b7782e778d..9e66769df6 100644 --- a/views/contact.jade +++ b/views/contact.jade @@ -1,14 +1,6 @@ extends layout block content - if errors.length - .alert.alert-danger.animated.fadeIn - for error in errors - div= error.msg - if success.length - .alert.alert-success.animated.fadeIn - p= success - .page-header h3 Contact Form