Add Update Email View
This commit: - Displays the user's email that we have on records - Adds a button in the settings to update email - Adds a form view to update the email - Fixes CSS for the Email icons and the email form ~ Credits to @hallaathrad - Linting fixes and updated with Berkeley's Comments - Streamline checks and fix scope - Add AJAX Calls - Add flash messages - Update the views & add XHR value
This commit is contained in:
@@ -149,6 +149,7 @@ module.exports = function(app) {
|
||||
router.get('/email-signup', getEmailSignup);
|
||||
router.get('/email-signin', getEmailSignin);
|
||||
router.get('/deprecated-signin', getDepSignin);
|
||||
router.get('/email-update', getUpdateEmail);
|
||||
router.get(
|
||||
'/toggle-lockdown-mode',
|
||||
sendNonUserToMap,
|
||||
@@ -226,6 +227,7 @@ module.exports = function(app) {
|
||||
res.redirect('/');
|
||||
}
|
||||
|
||||
|
||||
function getDepSignin(req, res) {
|
||||
if (req.user) {
|
||||
return res.redirect('/');
|
||||
@@ -235,6 +237,15 @@ module.exports = function(app) {
|
||||
});
|
||||
}
|
||||
|
||||
function getUpdateEmail(req, res) {
|
||||
if (!req.user) {
|
||||
return res.redirect('/');
|
||||
}
|
||||
return res.render('account/email-update', {
|
||||
title: 'Update your Email'
|
||||
});
|
||||
}
|
||||
|
||||
function getEmailSignin(req, res) {
|
||||
if (req.user) {
|
||||
return res.redirect('/');
|
||||
|
Reference in New Issue
Block a user