// update login page bootsrap
This commit is contained in:
@@ -22,79 +22,115 @@
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<script type="text/javascript">
|
||||
var there_are = '{l s='There are'}';
|
||||
var there_is = '{l s='There is'}';
|
||||
var label_errors = '{l s='errors'}';
|
||||
var label_error = '{l s='error'}';
|
||||
</script>
|
||||
<div id="container">
|
||||
<div id="error">
|
||||
{if isset($errors)}
|
||||
<h3>{if $nbErrors > 1}{l s='There are %d errors.' sprintf=$nbErrors}{else}{l s='There is %d error.' sprintf=$nbErrors}{/if}</h3>
|
||||
<ol style="margin: 0 0 0 20px;">
|
||||
{foreach from=$errors item="error"}
|
||||
<li>{$error}</li>
|
||||
{/foreach}
|
||||
<script type="text/javascript">
|
||||
var there_are = '{l s='There are'}';
|
||||
var there_is = '{l s='There is'}';
|
||||
var label_errors = '{l s='errors'}';
|
||||
var label_error = '{l s='error'}';
|
||||
</script>
|
||||
<div id="container">
|
||||
<fieldset>
|
||||
<div class="row">
|
||||
<div id="error" class="hide col-lg-12 alert alert-danger">
|
||||
{if isset($errors)}
|
||||
<p>{if $nbErrors > 1}{l s='There are %d errors.' sprintf=$nbErrors}{else}{l s='There is %d error.' sprintf=$nbErrors}{/if}</p>
|
||||
<ol>
|
||||
{foreach from=$errors item="error"}
|
||||
<li>{$error}</li>
|
||||
{/foreach}
|
||||
</ol>
|
||||
{/if}
|
||||
</div>
|
||||
<br />
|
||||
{if isset($warningSslMessage)}
|
||||
{/if}
|
||||
</div>
|
||||
{if isset($warningSslMessage)}
|
||||
<div class="alert alert-warning">{$warningSslMessage}</div>
|
||||
{/if}
|
||||
<div id="login">
|
||||
<h1>{$shop_name}</h1>
|
||||
{if !isset($wrong_folder_name) && !isset($wrong_install_name)}
|
||||
<form action="#" id="login_form" method="post">
|
||||
<div class="field">
|
||||
<label for="email">{l s='Email address:'}</label>
|
||||
<input type="text" id="email" name="email" class="input email_field" tabindex="1" value="{if isset($email)}{$email|escape:'htmlall':'UTF-8'}{/if}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="passwd">{l s='Password:'}</label>
|
||||
<input id="passwd" type="password" name="passwd" class="input password_field" tabindex="2" value="{if isset($password)}{$password}{/if}"/>
|
||||
</div>
|
||||
<div class="field">
|
||||
<input type="submit" name="submitLogin" value="{l s='Log in'}" tabindex="3" class="button fl margin-right-5" />
|
||||
<p class="fl no-margin hide ajax-loader">
|
||||
<img src="../img/loader.gif" alt="" />
|
||||
</p>
|
||||
<p class="fr no-margin">
|
||||
<a href="#" class="show-forgot-password">{l s='Lost password?'}</a>
|
||||
</p>
|
||||
<div class="clear"></div>
|
||||
{/if}
|
||||
<div id="login" class="col-lg-12">
|
||||
<h1>{$shop_name}</h1>
|
||||
{if !isset($wrong_folder_name) && !isset($wrong_install_name)}
|
||||
<form action="#" id="login_form" method="post" class="form-horizontal">
|
||||
<fieldset>
|
||||
<div class="row">
|
||||
<label for="email" class="control-label col-lg-3">
|
||||
{l s='Email address:'}
|
||||
</label>
|
||||
<div class="input-group col-lg-5">
|
||||
<span class="input-group-addon"><i class="icon-envelope"></i></span>
|
||||
<input type="text" id="email" name="email" class="input email_field" tabindex="1" value="{if isset($email)}{$email|escape:'htmlall':'UTF-8'}{/if}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label for="passwd" class="control-label col-lg-3">
|
||||
{l s='Password:'}
|
||||
</label>
|
||||
<div class="input-group col-lg-5">
|
||||
<span class="input-group-addon"><i class="icon-key"></i></span>
|
||||
<input id="passwd" type="password" name="passwd" class="input password_field" tabindex="2" value="{if isset($password)}{$password}{/if}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-9 col-lg-offset-3">
|
||||
<button class="btn btn-default" name="submitLogin" type="submit">
|
||||
{l s='Log in'}
|
||||
</button>
|
||||
<p>
|
||||
<a href="#" class="show-forgot-password">
|
||||
<i class="icon-question-sign"></i>
|
||||
{l s='Lost password?'}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="redirect" id="redirect" value="{$redirect}"/>
|
||||
</form>
|
||||
<form action="#" id="forgot_password_form" method="post" class="hide">
|
||||
<h2 class="no-margin">{l s='Forgot your password?'}</h2>
|
||||
<p class="bold">{l s='In order to receive your access code by email, please enter the address you provided during the registration process.'}</p>
|
||||
<div class="field">
|
||||
<label>{l s='Email address:'}</label>
|
||||
<input type="text" name="email_forgot" id="email_forgot" class="input email_field" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<input type="submit" name="submit" value="{l s='Send'}" class="button fl margin-right-5" />
|
||||
<p class="fl no-margin hide ajax-loader">
|
||||
<img src="../img/loader.gif" alt="" />
|
||||
</p>
|
||||
<p class="fr no-margin">
|
||||
<a href="#" class="show-login-form">{l s='Back to login'}</a>
|
||||
</p>
|
||||
<div class="clear"></div>
|
||||
</fieldset>
|
||||
</form>
|
||||
<form action="#" id="forgot_password_form" method="post" class="hide form-horizontal">
|
||||
<fieldset>
|
||||
<h2>{l s='Forgot your password?'}</h2>
|
||||
<p class="bold">
|
||||
{l s='In order to receive your access code by email, please enter the address you provided during the registration process.'}
|
||||
</p>
|
||||
<div class="row">
|
||||
<label class="control-label col-lg-3">
|
||||
{l s='Email address:'}
|
||||
</label>
|
||||
<div class="input-group col-lg-5">
|
||||
<span class="input-group-addon"><i class="icon-envelope"></i></span>
|
||||
<input type="text" name="email_forgot" id="email_forgot" class="input email_field" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{else}
|
||||
<div class="padding-30">
|
||||
<p>{l s='For security reasons, you cannot connect to the Back Office until after you have:'}</p>
|
||||
<ul>
|
||||
{if isset($wrong_install_name) && $wrong_install_name == true}<li>{l s='deleted the /install folder'}</li>{/if}
|
||||
{if isset($wrong_folder_name) && $wrong_folder_name == true}<li>{l s='renamed the /admin folder (e.g. %s)' sprintf=$randomNb}</li>{/if}
|
||||
</ul>
|
||||
<p><a href="{$adminUrl|escape:'htmlall':'UTF-8'}">{l s='Please then access this page by the new URL (e.g. %s)' sprintf=$adminUrl}</a></p>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<h2><a href="http://www.prestashop.com">© 2005 - {$smarty.now|date_format:"%Y"} Copyright by PrestaShop. all rights reserved.</a></h2>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-9 col-lg-offset-3">
|
||||
<button class="btn btn-default" name="submitLogin" type="submit">
|
||||
{l s='Send'}
|
||||
</button>
|
||||
<p>
|
||||
<a href="#" class="show-login-form">
|
||||
<i class="icon-angle-left"></i>
|
||||
{l s='Back to login'}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
{else}
|
||||
<div class="col-lg-12">
|
||||
<p>{l s='For security reasons, you cannot connect to the Back Office until after you have:'}</p>
|
||||
<ul>
|
||||
{if isset($wrong_install_name) && $wrong_install_name == true}<li>{l s='deleted the /install folder'}</li>{/if}
|
||||
{if isset($wrong_folder_name) && $wrong_folder_name == true}<li>{l s='renamed the /admin folder (e.g. %s)' sprintf=$randomNb}</li>{/if}
|
||||
</ul>
|
||||
<p>
|
||||
<a href="{$adminUrl|escape:'htmlall':'UTF-8'}">{l s='Please then access this page by the new URL (e.g. %s)' sprintf=$adminUrl}</a>
|
||||
</p>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<p class="text-center">
|
||||
<a href="http://www.prestashop.com">
|
||||
© 2005 - {$smarty.now|date_format:"%Y"} Copyright by PrestaShop. all rights reserved.
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
+7
-7
@@ -58,7 +58,7 @@ function displayLogin() {
|
||||
*/
|
||||
function doAjaxLogin(redirect) {
|
||||
$('#error').hide();
|
||||
$('#login_form .ajax-loader').fadeIn('slow', function() {
|
||||
$('#login_form').fadeIn('slow', function() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
headers: { "cache-control": "no-cache" },
|
||||
@@ -82,14 +82,14 @@ function doAjaxLogin(redirect) {
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
$('#error').html('<h3>TECHNICAL ERROR:</h3><p>Details: Error thrown: ' + XMLHttpRequest + '</p><p>Text status: ' + textStatus + '</p>').removeClass('hide');
|
||||
$('#login_form .ajax-loader').fadeOut('slow');
|
||||
$('#login_form').fadeOut('slow');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
function doAjaxForgot() {
|
||||
$('#error').hide();
|
||||
$('#forgot_password_form .ajax-loader').fadeIn('slow', function() {
|
||||
$('#forgot_password_form').fadeIn('slow', function() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
headers: { "cache-control": "no-cache" },
|
||||
@@ -109,23 +109,23 @@ function doAjaxForgot() {
|
||||
else
|
||||
{
|
||||
alert(jsonData.confirm);
|
||||
$('#forgot_password_form .ajax-loader').hide();
|
||||
$('#forgot_password_form').hide();
|
||||
displayLogin();
|
||||
}
|
||||
},
|
||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||
$('#error').html('<h3>TECHNICAL ERROR:</h3><p>Details: Error thrown: ' + XMLHttpRequest + '</p><p>Text status: ' + textStatus + '</p>').show();
|
||||
$('#forgot_password_form .ajax-loader').fadeOut('slow');
|
||||
$('#forgot_password_form').fadeOut('slow');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
function displayErrors(errors) {
|
||||
str_errors = '<h3>' + (errors.length > 1 ? there_are : there_is) + ' ' + errors.length + ' ' + (errors.length > 1 ? label_errors : label_error) + '</h3><ol>';
|
||||
str_errors = '<p><strong>' + (errors.length > 1 ? there_are : there_is) + ' ' + errors.length + ' ' + (errors.length > 1 ? label_errors : label_error) + '</strong></p><ol>';
|
||||
for (var error in errors) //IE6 bug fix
|
||||
if (error != 'indexOf') str_errors += '<li>' + errors[error] + '</li>';
|
||||
$('.ajax-loader').hide();
|
||||
$('#error').html(str_errors + '</ol>').fadeIn('slow');
|
||||
$('#error').html(str_errors + '</ol>').removeClass('hide').fadeIn('slow');
|
||||
$("#login").effect("shake", {
|
||||
times: 4
|
||||
}, 100);
|
||||
|
||||
Reference in New Issue
Block a user