[-] FO: Fix #PSCFV-6375 always display the vat_number field for registration even if the european vat number module is disabled
This commit is contained in:
@@ -46,7 +46,6 @@ var countriesNeedZipCode = new Array();
|
|||||||
$(function(){ldelim}
|
$(function(){ldelim}
|
||||||
$('.id_state option[value={if isset($smarty.post.id_state)}{$smarty.post.id_state|intval}{else}{if isset($address->id_state)}{$address->id_state|intval}{/if}{/if}]').attr('selected', true);
|
$('.id_state option[value={if isset($smarty.post.id_state)}{$smarty.post.id_state|intval}{else}{if isset($address->id_state)}{$address->id_state|intval}{/if}{/if}]').attr('selected', true);
|
||||||
{rdelim});
|
{rdelim});
|
||||||
{if $vat_management}
|
|
||||||
{literal}
|
{literal}
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('#company').blur(function(){
|
$('#company').blur(function(){
|
||||||
@@ -62,7 +61,6 @@ $(function(){ldelim}
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
{/literal}
|
{/literal}
|
||||||
{/if}
|
|
||||||
//]]>
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -104,13 +102,7 @@ $(function(){ldelim}
|
|||||||
<label for="company">{l s='Company'}</label>
|
<label for="company">{l s='Company'}</label>
|
||||||
<input type="text" id="company" name="company" value="{if isset($smarty.post.company)}{$smarty.post.company}{else}{if isset($address->company)}{$address->company}{/if}{/if}" />
|
<input type="text" id="company" name="company" value="{if isset($smarty.post.company)}{$smarty.post.company}{else}{if isset($address->company)}{$address->company}{/if}{/if}" />
|
||||||
</p>
|
</p>
|
||||||
{if $vat_display == 2}
|
<div id="vat_area">
|
||||||
<div id="vat_area">
|
|
||||||
{elseif $vat_display == 1}
|
|
||||||
<div id="vat_area" style="display: none;">
|
|
||||||
{else}
|
|
||||||
<div style="display: none;">
|
|
||||||
{/if}
|
|
||||||
<div id="vat_number">
|
<div id="vat_number">
|
||||||
<p class="text">
|
<p class="text">
|
||||||
<label for="vat_number">{l s='VAT number'}</label>
|
<label for="vat_number">{l s='VAT number'}</label>
|
||||||
|
|||||||
@@ -52,23 +52,21 @@ $(function(){ldelim}
|
|||||||
$('.id_state option[value={if isset($smarty.post.id_state)}{$smarty.post.id_state|intval}{else}{if isset($address)}{$address->id_state|intval}{/if}{/if}]').attr('selected', true);
|
$('.id_state option[value={if isset($smarty.post.id_state)}{$smarty.post.id_state|intval}{else}{if isset($address)}{$address->id_state|intval}{/if}{/if}]').attr('selected', true);
|
||||||
{rdelim});
|
{rdelim});
|
||||||
//]]>
|
//]]>
|
||||||
{if $vat_management}
|
{literal}
|
||||||
{literal}
|
$(document).ready(function() {
|
||||||
$(document).ready(function() {
|
$('#company').blur(function(){
|
||||||
$('#company').blur(function(){
|
|
||||||
vat_number();
|
|
||||||
});
|
|
||||||
vat_number();
|
vat_number();
|
||||||
function vat_number()
|
|
||||||
{
|
|
||||||
if ($('#company').val() != '')
|
|
||||||
$('#vat_number').show();
|
|
||||||
else
|
|
||||||
$('#vat_number').hide();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
{/literal}
|
vat_number();
|
||||||
{/if}
|
function vat_number()
|
||||||
|
{
|
||||||
|
if ($('#company').val() != '')
|
||||||
|
$('#vat_number').show();
|
||||||
|
else
|
||||||
|
$('#vat_number').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
{/literal}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<h1>{if !isset($email_create)}{l s='Log in'}{else}{l s='Create an account'}{/if}</h1>
|
<h1>{if !isset($email_create)}{l s='Log in'}{else}{l s='Create an account'}{/if}</h1>
|
||||||
|
|||||||
@@ -51,22 +51,20 @@ countriesNeedZipCode = new Array();
|
|||||||
$(function(){ldelim}
|
$(function(){ldelim}
|
||||||
$('.id_state option[value={if isset($smarty.post.id_state)}{$smarty.post.id_state}{else}{if isset($address->id_state)}{$address->id_state|escape:'htmlall':'UTF-8'}{/if}{/if}]').attr('selected', 'selected');
|
$('.id_state option[value={if isset($smarty.post.id_state)}{$smarty.post.id_state}{else}{if isset($address->id_state)}{$address->id_state|escape:'htmlall':'UTF-8'}{/if}{/if}]').attr('selected', 'selected');
|
||||||
{rdelim});
|
{rdelim});
|
||||||
{if $vat_management}
|
|
||||||
{literal}
|
{literal}
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('#company').blur(function(){
|
$('#company').blur(function(){
|
||||||
vat_number();
|
|
||||||
});
|
|
||||||
vat_number();
|
vat_number();
|
||||||
function vat_number()
|
|
||||||
{
|
|
||||||
if ($('#company').val() != '')
|
|
||||||
$('#vat_number').show();
|
|
||||||
else
|
|
||||||
$('#vat_number').hide();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
{/literal}
|
vat_number();
|
||||||
|
function vat_number()
|
||||||
|
{
|
||||||
|
if ($('#company').val() != '')
|
||||||
|
$('#vat_number').show();
|
||||||
|
else
|
||||||
|
$('#vat_number').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
{/if}
|
{/if}
|
||||||
//]]>
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -53,23 +53,21 @@ $(function(){ldelim}
|
|||||||
$('.id_state option[value={if isset($smarty.post.id_state)}{$smarty.post.id_state|intval}{else}{if isset($address)}{$address->id_state|escape:'htmlall':'UTF-8'}{/if}{/if}]').attr('selected', 'selected');
|
$('.id_state option[value={if isset($smarty.post.id_state)}{$smarty.post.id_state|intval}{else}{if isset($address)}{$address->id_state|escape:'htmlall':'UTF-8'}{/if}{/if}]').attr('selected', 'selected');
|
||||||
{rdelim});
|
{rdelim});
|
||||||
//]]>
|
//]]>
|
||||||
{if $vat_management}
|
{literal}
|
||||||
{literal}
|
$(document).ready(function() {
|
||||||
$(document).ready(function() {
|
$('#company').blur(function(){
|
||||||
$('#company').blur(function(){
|
|
||||||
vat_number();
|
|
||||||
});
|
|
||||||
vat_number();
|
vat_number();
|
||||||
function vat_number()
|
|
||||||
{
|
|
||||||
if ($('#company').val() != '')
|
|
||||||
$('#vat_number').show();
|
|
||||||
else
|
|
||||||
$('#vat_number').hide();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
{/literal}
|
vat_number();
|
||||||
{/if}
|
function vat_number()
|
||||||
|
{
|
||||||
|
if ($('#company').val() != '')
|
||||||
|
$('#vat_number').show();
|
||||||
|
else
|
||||||
|
$('#vat_number').hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
{/literal}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{assign var='stateExist' value=false}
|
{assign var='stateExist' value=false}
|
||||||
@@ -77,4 +75,4 @@ $(function(){ldelim}
|
|||||||
{include file="./authentication-choice.tpl"}
|
{include file="./authentication-choice.tpl"}
|
||||||
{else}
|
{else}
|
||||||
{include file="./authentication-create-account.tpl"}
|
{include file="./authentication-create-account.tpl"}
|
||||||
{/if}
|
{/if}
|
||||||
@@ -71,35 +71,33 @@
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
{/if}
|
{/if}
|
||||||
//]]>
|
//]]>
|
||||||
{if $vat_management}
|
{literal}
|
||||||
{literal}
|
function vat_number()
|
||||||
function vat_number()
|
{
|
||||||
{
|
if ($('#company').val() != '')
|
||||||
if ($('#company').val() != '')
|
$('#vat_number_block').show();
|
||||||
$('#vat_number_block').show();
|
else
|
||||||
else
|
$('#vat_number_block').hide();
|
||||||
$('#vat_number_block').hide();
|
}
|
||||||
}
|
function vat_number_invoice()
|
||||||
function vat_number_invoice()
|
{
|
||||||
{
|
if ($('#company_invoice').val() != '')
|
||||||
if ($('#company_invoice').val() != '')
|
$('#vat_number_block_invoice').show();
|
||||||
$('#vat_number_block_invoice').show();
|
else
|
||||||
else
|
$('#vat_number_block_invoice').hide();
|
||||||
$('#vat_number_block_invoice').hide();
|
}
|
||||||
}
|
|
||||||
|
$(document).ready(function() {
|
||||||
$(document).ready(function() {
|
$('#company').blur(function(){
|
||||||
$('#company').blur(function(){
|
|
||||||
vat_number();
|
|
||||||
});
|
|
||||||
$('#company_invoice').blur(function(){
|
|
||||||
vat_number_invoice();
|
|
||||||
});
|
|
||||||
vat_number();
|
vat_number();
|
||||||
|
});
|
||||||
|
$('#company_invoice').blur(function(){
|
||||||
vat_number_invoice();
|
vat_number_invoice();
|
||||||
});
|
});
|
||||||
{/literal}
|
vat_number();
|
||||||
{/if}
|
vat_number_invoice();
|
||||||
|
});
|
||||||
|
{/literal}
|
||||||
</script>
|
</script>
|
||||||
<!-- Error return block -->
|
<!-- Error return block -->
|
||||||
<div id="opc_account_errors" class="error" style="display:none;"></div>
|
<div id="opc_account_errors" class="error" style="display:none;"></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user