//small fix on BO login

This commit is contained in:
vAugagneur committed 2012-03-14 10:49:23 +00:00
1 parent 5534a52edf
commit ba52d26efc
3 files changed
+19 -10

No files matched your search

@@ -49,6 +49,7 @@
{/if} {/if}
<div id="login"> <div id="login">
{if !isset($wrong_folder_name)} {if !isset($wrong_folder_name)}
<div id="login_form">
<h1>{$shop_name}</h1> <h1>{$shop_name}</h1>
<form action="" method="post" id="login_form" onsubmit="doAjaxLogin('{$redirect}');return false;"> <form action="" method="post" id="login_form" onsubmit="doAjaxLogin('{$redirect}');return false;">
<label for="email">{l s='E-mail address:'}</label><br /> <label for="email">{l s='E-mail address:'}</label><br />
@@ -59,9 +60,7 @@
</div> </div>
<div> <div>
<div id="submit"> <div id="submit">
{if isset($redirect)}
<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">
@@ -75,6 +74,7 @@
//TODO FOCUS ON EMAIL //TODO FOCUS ON EMAIL
</script> </script>
</form> </form>
</div>
{else} {else}
<h1>{$shop_name}</h1> <h1>{$shop_name}</h1>
<div style="margin:30px;"> <div style="margin:30px;">
@@ -86,7 +86,6 @@
<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;">
@@ -102,5 +101,6 @@
<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">&copy; 2005 - {$smarty.now|date_format:"%Y"} Copyright by PrestaShop. all rights reserved.</a></h2> <h2><a href="http://www.prestashop.com">&copy; 2005 - {$smarty.now|date_format:"%Y"} Copyright by PrestaShop. all rights reserved.</a></h2>
</div> </div>
+6 -1
View File
@@ -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
View File
@@ -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;
} }