* [FIX] Fixed wrong behavior when setting mail parameters

* [MOD] Improved email message templates

Signed-off-by: nuxsmin <nuxsmin@syspass.org>
This commit is contained in:
nuxsmin
2018-11-19 18:44:18 +01:00
parent afdfa80d8f
commit 13e12baaf0
13 changed files with 98 additions and 41 deletions

View File

@@ -144,7 +144,11 @@ final class ConfigEncryptionController extends SimpleControllerBase
}
}
return $this->returnJsonResponse(JsonResponse::JSON_SUCCESS_STICKY, __u('Master password updated'), [__u('Please, restart the session for update it')]);
return $this->returnJsonResponse(
JsonResponse::JSON_SUCCESS_STICKY,
__u('Master password updated'),
[__u('Please, restart the session for update it')]
);
}
/**
@@ -196,13 +200,21 @@ final class ConfigEncryptionController extends SimpleControllerBase
try {
$temporaryMasterPassService->sendByEmailForGroup($groupId, $key);
return $this->returnJsonResponse(JsonResponse::JSON_SUCCESS, __u('Temporary password generated'), [__u('Email sent')]);
return $this->returnJsonResponse(
JsonResponse::JSON_SUCCESS,
__u('Temporary password generated'),
[__u('Email sent')]
);
} catch (\Exception $e) {
processException($e);
$this->eventDispatcher->notifyEvent('exception', new Event($e));
return $this->returnJsonResponse(JsonResponse::JSON_WARNING, __u('Temporary password generated'), [__u('Error while sending the email')]);
return $this->returnJsonResponse(
JsonResponse::JSON_WARNING,
__u('Temporary password generated'),
[__u('Error while sending the email')]
);
}
}