//small fix on BO login
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14141 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -49,32 +49,32 @@
|
|||||||
{/if}
|
{/if}
|
||||||
<div id="login">
|
<div id="login">
|
||||||
{if !isset($wrong_folder_name)}
|
{if !isset($wrong_folder_name)}
|
||||||
<h1>{$shop_name}</h1>
|
<div id="login_form">
|
||||||
<form action="" method="post" id="login_form" onsubmit="doAjaxLogin('{$redirect}');return false;">
|
<h1>{$shop_name}</h1>
|
||||||
<label for="email">{l s='E-mail address:'}</label><br />
|
<form action="" method="post" id="login_form" onsubmit="doAjaxLogin('{$redirect}');return false;">
|
||||||
<input type="text" id="email" name="email" class="input" value="{if isset($email)}{$email|htmlentities}{/if}" />
|
<label for="email">{l s='E-mail address:'}</label><br />
|
||||||
<div style="margin: 1.8em 0 0 0;">
|
<input type="text" id="email" name="email" class="input" value="{if isset($email)}{$email|htmlentities}{/if}" />
|
||||||
<label for="passwd">{l s='Password:'}</label><br />
|
<div style="margin: 1.8em 0 0 0;">
|
||||||
<input id="passwd" type="password" name="passwd" class="input" value="{if isset($password)}{$password}{/if}"/>
|
<label for="passwd">{l s='Password:'}</label><br />
|
||||||
</div>
|
<input id="passwd" type="password" name="passwd" class="input" value="{if isset($password)}{$password}{/if}"/>
|
||||||
<div>
|
</div>
|
||||||
<div id="submit">
|
<div>
|
||||||
{if isset($redirect)}
|
<div id="submit">
|
||||||
<input type="hidden" name="redirect" value="{$redirect}"/>
|
<input type="hidden" name="redirect" value="{$redirect}"/>
|
||||||
{/if}
|
<input type="submit" name="submitLogin" value="{l s='Log in'}" class="button" style="float:left"/>
|
||||||
<input type="submit" name="submitLogin" value="{l s='Log in'}" class="button" style="float:left"/>
|
<span style="float:left;width:30px">
|
||||||
<span style="float:left;width:30px">
|
<img id="ajax-loader" src="../img/loader.gif" style="float:left;margin:2px 0 0 5px;display:none">
|
||||||
<img id="ajax-loader" src="../img/loader.gif" style="float:left;margin:2px 0 0 5px;display:none">
|
</span>
|
||||||
</span>
|
</div>
|
||||||
|
<div id="lost">
|
||||||
|
<a href="#" onclick="displayForgotPassword();return false;">{l s='Lost password?'}</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="lost">
|
<script type="text/javascript">
|
||||||
<a href="#" onclick="displayForgotPassword();return false;">{l s='Lost password?'}</a>
|
//TODO FOCUS ON EMAIL
|
||||||
</div>
|
</script>
|
||||||
</div>
|
</form>
|
||||||
<script type="text/javascript">
|
</div>
|
||||||
//TODO FOCUS ON EMAIL
|
|
||||||
</script>
|
|
||||||
</form>
|
|
||||||
{else}
|
{else}
|
||||||
<h1>{$shop_name}</h1>
|
<h1>{$shop_name}</h1>
|
||||||
<div style="margin:30px;">
|
<div style="margin:30px;">
|
||||||
@@ -86,21 +86,21 @@
|
|||||||
<br />{l s='Please then access this page by the new url (eg.) http://www.domain.tld/admin'}{$randomNb}</span></p>
|
<br />{l s='Please then access this page by the new url (eg.) http://www.domain.tld/admin'}{$randomNb}</span></p>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
<div id="forgot_password" style="display:none">
|
||||||
<div id="forgot_password" style="display:none">
|
<h1>{$shop_name}</h1>
|
||||||
<h1>{$shop_name}</h1>
|
<form action="" method="post" onsubmit="doAjaxForgot();return false;">
|
||||||
<form action="" method="post" onsubmit="doAjaxForgot();return false;">
|
<div class="page-title center">{l s='Forgot your password?'}</div><br />
|
||||||
<div class="page-title center">{l s='Forgot your password?'}</div><br />
|
<span style="font-weight: bold;">{l s='Please, enter your e-mail address the one you wrote during your registration in order to receive your access codes by e-mail'}</span><br />
|
||||||
<span style="font-weight: bold;">{l s='Please, enter your e-mail address the one you wrote during your registration in order to receive your access codes by e-mail'}</span><br />
|
<input style="margin-top:20px" type="text" name="email_forgot" id="email_forgot" class="input" />
|
||||||
<input style="margin-top:20px" type="text" name="email_forgot" id="email_forgot" class="input" />
|
<div id="submit">
|
||||||
<div id="submit">
|
<input type="submit" name="Submit" value="{l s='Send'}" class="button" style="float:left" />
|
||||||
<input type="submit" name="Submit" value="{l s='Send'}" class="button" style="float:left" />
|
|
||||||
<span style="float:left;width:30px">
|
<span style="float:left;width:30px">
|
||||||
<img id="ajax-loader" src="../img/loader.gif" style="float:left;margin:2px 0 0 5px;display:none">
|
<img id="ajax-loader" src="../img/loader.gif" style="float:left;margin:2px 0 0 5px;display:none">
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div id="lost"><a href="#" onclick="displayLogin();return false;">{l s='Back to login'}</a></div>
|
<div id="lost"><a href="#" onclick="displayLogin();return false;">{l s='Back to login'}</a></div>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h2><a href="http://www.prestashop.com">© 2005 - {$smarty.now|date_format:"%Y"} Copyright by PrestaShop. all rights reserved.</a></h2>
|
<h2><a href="http://www.prestashop.com">© 2005 - {$smarty.now|date_format:"%Y"} Copyright by PrestaShop. all rights reserved.</a></h2>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ class AdminLoginControllerCore extends AdminController
|
|||||||
public function setMedia()
|
public function setMedia()
|
||||||
{
|
{
|
||||||
$this->addJquery();
|
$this->addJquery();
|
||||||
$this->addJqueryPlugin('flip');
|
|
||||||
$this->addCSS(_PS_CSS_DIR_.'login.css');
|
$this->addCSS(_PS_CSS_DIR_.'login.css');
|
||||||
$this->addJS(_PS_JS_DIR_.'login.js');
|
$this->addJS(_PS_JS_DIR_.'login.js');
|
||||||
$this->addJqueryUI('ui.widget');
|
$this->addJqueryUI('ui.widget');
|
||||||
@@ -79,6 +78,12 @@ class AdminLoginControllerCore extends AdminController
|
|||||||
// Redirect to admin panel
|
// Redirect to admin panel
|
||||||
if (isset($_GET['redirect']) && Validate::isControllerName($_GET['redirect']))
|
if (isset($_GET['redirect']) && Validate::isControllerName($_GET['redirect']))
|
||||||
$this->context->smarty->assign(array('redirect' => Tools::getValue('redirect')));
|
$this->context->smarty->assign(array('redirect' => Tools::getValue('redirect')));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$tab = new Tab((int)$this->context->employee->default_tab);
|
||||||
|
$url = $this->context->link->getAdminLink($tab->class_name);
|
||||||
|
$this->context->smarty->assign(array('redirect' => $url));
|
||||||
|
}
|
||||||
|
|
||||||
if ($nbErrors = count($this->errors))
|
if ($nbErrors = count($this->errors))
|
||||||
$this->context->smarty->assign(
|
$this->context->smarty->assign(
|
||||||
|
|||||||
+10
-6
@@ -4,15 +4,19 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
function displayForgotPassword() {
|
function displayForgotPassword() {
|
||||||
$('#error').hide();
|
$('#error').hide();
|
||||||
$("#login").flip({
|
$('#login_form').fadeOut('fast', function () {
|
||||||
direction: 'tb',
|
$("#forgot_password").fadeIn('fast');
|
||||||
color: '#FFF',
|
});
|
||||||
content: $('#forgot_password')
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function displayLogin() {
|
function displayLogin() {
|
||||||
$('#error').hide();
|
$('#error').hide();
|
||||||
$('#login').revertFlip();
|
|
||||||
|
$('#forgot_password').fadeOut('fast', function () {
|
||||||
|
$("#login_form").fadeIn('fast');
|
||||||
|
});
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user