//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}
|
||||
<div id="login">
|
||||
{if !isset($wrong_folder_name)}
|
||||
<h1>{$shop_name}</h1>
|
||||
<form action="" method="post" id="login_form" onsubmit="doAjaxLogin('{$redirect}');return false;">
|
||||
<label for="email">{l s='E-mail address:'}</label><br />
|
||||
<input type="text" id="email" name="email" class="input" value="{if isset($email)}{$email|htmlentities}{/if}" />
|
||||
<div style="margin: 1.8em 0 0 0;">
|
||||
<label for="passwd">{l s='Password:'}</label><br />
|
||||
<input id="passwd" type="password" name="passwd" class="input" value="{if isset($password)}{$password}{/if}"/>
|
||||
</div>
|
||||
<div>
|
||||
<div id="submit">
|
||||
{if isset($redirect)}
|
||||
<div id="login_form">
|
||||
<h1>{$shop_name}</h1>
|
||||
<form action="" method="post" id="login_form" onsubmit="doAjaxLogin('{$redirect}');return false;">
|
||||
<label for="email">{l s='E-mail address:'}</label><br />
|
||||
<input type="text" id="email" name="email" class="input" value="{if isset($email)}{$email|htmlentities}{/if}" />
|
||||
<div style="margin: 1.8em 0 0 0;">
|
||||
<label for="passwd">{l s='Password:'}</label><br />
|
||||
<input id="passwd" type="password" name="passwd" class="input" value="{if isset($password)}{$password}{/if}"/>
|
||||
</div>
|
||||
<div>
|
||||
<div id="submit">
|
||||
<input type="hidden" name="redirect" value="{$redirect}"/>
|
||||
{/if}
|
||||
<input type="submit" name="submitLogin" value="{l s='Log in'}" class="button" style="float:left"/>
|
||||
<span style="float:left;width:30px">
|
||||
<img id="ajax-loader" src="../img/loader.gif" style="float:left;margin:2px 0 0 5px;display:none">
|
||||
</span>
|
||||
<input type="submit" name="submitLogin" value="{l s='Log in'}" class="button" style="float:left"/>
|
||||
<span style="float:left;width:30px">
|
||||
<img id="ajax-loader" src="../img/loader.gif" style="float:left;margin:2px 0 0 5px;display:none">
|
||||
</span>
|
||||
</div>
|
||||
<div id="lost">
|
||||
<a href="#" onclick="displayForgotPassword();return false;">{l s='Lost password?'}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="lost">
|
||||
<a href="#" onclick="displayForgotPassword();return false;">{l s='Lost password?'}</a>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
//TODO FOCUS ON EMAIL
|
||||
</script>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
//TODO FOCUS ON EMAIL
|
||||
</script>
|
||||
</form>
|
||||
</div>
|
||||
{else}
|
||||
<h1>{$shop_name}</h1>
|
||||
<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>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div id="forgot_password" style="display:none">
|
||||
<h1>{$shop_name}</h1>
|
||||
<form action="" method="post" onsubmit="doAjaxForgot();return false;">
|
||||
<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 />
|
||||
<input style="margin-top:20px" type="text" name="email_forgot" id="email_forgot" class="input" />
|
||||
<div id="submit">
|
||||
<input type="submit" name="Submit" value="{l s='Send'}" class="button" style="float:left" />
|
||||
<div id="forgot_password" style="display:none">
|
||||
<h1>{$shop_name}</h1>
|
||||
<form action="" method="post" onsubmit="doAjaxForgot();return false;">
|
||||
<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 />
|
||||
<input style="margin-top:20px" type="text" name="email_forgot" id="email_forgot" class="input" />
|
||||
<div id="submit">
|
||||
<input type="submit" name="Submit" value="{l s='Send'}" class="button" style="float:left" />
|
||||
<span style="float:left;width:30px">
|
||||
<img id="ajax-loader" src="../img/loader.gif" style="float:left;margin:2px 0 0 5px;display:none">
|
||||
</span>
|
||||
</div>
|
||||
<div id="lost"><a href="#" onclick="displayLogin();return false;">{l s='Back to login'}</a></div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="lost"><a href="#" onclick="displayLogin();return false;">{l s='Back to login'}</a></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<h2><a href="http://www.prestashop.com">© 2005 - {$smarty.now|date_format:"%Y"} Copyright by PrestaShop. all rights reserved.</a></h2>
|
||||
</div>
|
||||
|
||||
@@ -40,7 +40,6 @@ class AdminLoginControllerCore extends AdminController
|
||||
public function setMedia()
|
||||
{
|
||||
$this->addJquery();
|
||||
$this->addJqueryPlugin('flip');
|
||||
$this->addCSS(_PS_CSS_DIR_.'login.css');
|
||||
$this->addJS(_PS_JS_DIR_.'login.js');
|
||||
$this->addJqueryUI('ui.widget');
|
||||
@@ -79,6 +78,12 @@ class AdminLoginControllerCore extends AdminController
|
||||
// Redirect to admin panel
|
||||
if (isset($_GET['redirect']) && Validate::isControllerName($_GET['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))
|
||||
$this->context->smarty->assign(
|
||||
|
||||
+10
-6
@@ -4,15 +4,19 @@ $(document).ready(function() {
|
||||
|
||||
function displayForgotPassword() {
|
||||
$('#error').hide();
|
||||
$("#login").flip({
|
||||
direction: 'tb',
|
||||
color: '#FFF',
|
||||
content: $('#forgot_password')
|
||||
})
|
||||
$('#login_form').fadeOut('fast', function () {
|
||||
$("#forgot_password").fadeIn('fast');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function displayLogin() {
|
||||
$('#error').hide();
|
||||
$('#login').revertFlip();
|
||||
|
||||
$('#forgot_password').fadeOut('fast', function () {
|
||||
$("#login_form").fadeIn('fast');
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user