// AdminTaxRules tpl refactoring
This commit is contained in:
@@ -26,23 +26,13 @@
|
|||||||
{extends file="helpers/form/form.tpl"}
|
{extends file="helpers/form/form.tpl"}
|
||||||
|
|
||||||
{block name="label"}
|
{block name="label"}
|
||||||
{if isset($input.label)}
|
{if $input.name == 'zipcode' && isset($input.label)}
|
||||||
<label
|
<label id="zipcode-label">{$input.label}</label>
|
||||||
{if $input.name == 'states[]'}
|
{elseif $input.name == 'states[]'}
|
||||||
id="state-label" style="display: none;"
|
<label id="states-label">{$input.label}</label>
|
||||||
{elseif $input.name == 'zipcode'}
|
{else}
|
||||||
id="zipcode-label"
|
{$smarty.block.parent}
|
||||||
{/if}
|
{/if}
|
||||||
>{$input.label} </label>
|
|
||||||
{/if}
|
|
||||||
{/block}
|
|
||||||
|
|
||||||
{block name="start_field_block"}
|
|
||||||
<div class="margin-form"
|
|
||||||
{if $input.name == 'states[]'}
|
|
||||||
id="state-select" style="display: none;"
|
|
||||||
{/if}
|
|
||||||
>
|
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name="script"}
|
{block name="script"}
|
||||||
@@ -68,8 +58,8 @@
|
|||||||
$("#zipcode-label").hide();
|
$("#zipcode-label").hide();
|
||||||
$("#zipcode").hide();
|
$("#zipcode").hide();
|
||||||
|
|
||||||
$("#state-select").hide();
|
$("#states").parent().hide();
|
||||||
$("#state-label").hide();
|
$("#states-label").hide();
|
||||||
} else {
|
} else {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "ajax.php",
|
url: "ajax.php",
|
||||||
@@ -78,14 +68,14 @@
|
|||||||
success: function(html){
|
success: function(html){
|
||||||
if (html == "false")
|
if (html == "false")
|
||||||
{
|
{
|
||||||
$("#state-label").hide();
|
$("#states").parent().hide();
|
||||||
$("#state-select").hide();
|
$("#states-label").hide();
|
||||||
$("#states").html('');
|
$("#states").html('');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$("#state-label").show();
|
$("#states").parent().show();
|
||||||
$("#state-select").show();
|
$("#states-label").show();
|
||||||
$("#states").html(html);
|
$("#states").html(html);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user