// Fixed #PSTEST-260

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@12093 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
bMancone
2012-01-03 17:41:40 +00:00
parent e155f70095
commit f33d42c0e5
2 changed files with 95 additions and 39 deletions
@@ -37,6 +37,40 @@
<input type="hidden" name="id_customer" value="{$customer->id}" />
<input type="hidden" name="email" value="{$customer->email}" />
{else}
<script type="text/javascript">
$('input[name=email]').live('blur', function(e)
{
var email = $(this).val();
if (email.length > 5)
{
var data = {};
data.email = email;
data.token = "{$token}";
data.ajax = 1;
data.controller = "AdminAddresses";
data.action = "loadNames";
$.ajax({
type: "POST",
url: "ajax-tab.php",
data: data,
dataType: 'json',
async : true,
success: function(msg)
{
if (msg)
{
var infos = msg.infos.split('_');
$('input[name=firstname]').val(infos[0]);
$('input[name=lastname]').val(infos[1]);
}
},
error: function(msg)
{
}
});
}
});
</script>
<label>{l s='Customer e-mail'}</label>
<div class="margin-form">
<input type="text" size="33" name="email" value="{$fields_value[$input.name]|escape:'htmlall':'UTF-8'}" style="text-transform: lowercase;" /> <sup>*</sup>