* [MOD] UI tweaks on login and password reset views

This commit is contained in:
nuxsmin
2018-03-28 12:36:46 +02:00
parent 4b45e206c9
commit d7c8daf0ff
14 changed files with 400 additions and 255 deletions

View File

@@ -61,14 +61,14 @@ class UserPassResetController extends ControllerBase
*
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
* @throws \SP\Core\Dic\ContainerException
*/
public function indexAction()
{
$this->dic->get(LayoutHelper::class)->getPublicLayout('request', 'passreset');
$this->dic->get(LayoutHelper::class)
->getCustomLayout('request', 'passreset');
if (!$this->configData->isMailEnabled()) {
ErrorUtil::showErrorInView($this->view, self::ERR_UNAVAILABLE);
ErrorUtil::showErrorInView($this->view, self::ERR_UNAVAILABLE, 'request');
}
$this->view();
@@ -140,16 +140,16 @@ class UserPassResetController extends ControllerBase
/**
* @param null $hash
* @throws \SP\Core\Dic\ContainerException
*/
public function resetAction($hash = null)
{
$this->dic->get(LayoutHelper::class)->getPublicLayout('reset', 'passreset');
$this->dic->get(LayoutHelper::class)
->getCustomLayout('reset', 'passreset');
if ($hash && $this->configData->isMailEnabled()) {
$this->view->assign('hash', $hash);
} else {
ErrorUtil::showErrorInView($this->view, self::ERR_UNAVAILABLE);
ErrorUtil::showErrorInView($this->view, self::ERR_UNAVAILABLE, 'reset');
}
$this->view();
@@ -163,8 +163,8 @@ class UserPassResetController extends ControllerBase
try {
$this->checkTracking();
$pass = Request::analyzeEncrypted('pass');
$passR = Request::analyzeEncrypted('passR');
$pass = Request::analyzeEncrypted('password');
$passR = Request::analyzeEncrypted('password_repeat');
if (!$pass || !$passR) {
throw new ValidationException(__u('La clave no puede estar en blanco'));