Fixed some bugs in subscription process

Added timezone selector to campaign scheduling
Fixed problems with pausing campaign.
This commit is contained in:
Tomas Bures 2019-07-10 02:06:56 +04:00
parent 4113cb8476
commit e3a5a3c4eb
23 changed files with 218 additions and 99 deletions

View file

@ -249,7 +249,7 @@ router.postAsync('/:cid/subscribe', passport.parseForm, corsOrCsrfProtection, as
const emailErr = await tools.validateEmail(email);
if (emailErr) {
const errMsg = tools.validateEmailGetMessage(emailErr, email);
const errMsg = tools.validateEmailGetMessage(emailErr, email, req.locale);
if (req.xhr) {
throw new Error(errMsg);
@ -457,7 +457,7 @@ router.postAsync('/:lcid/manage-address', passport.parseForm, passport.csrfProte
} else {
const emailErr = await tools.validateEmail(emailNew);
if (emailErr) {
const errMsg = tools.validateEmailGetMessage(emailErr, email);
const errMsg = tools.validateEmailGetMessage(emailErr, email, req.locale);
req.flash('danger', errMsg);