From 34376a0bb92654aed09976b9d079260fa0d8e41d Mon Sep 17 00:00:00 2001 From: touffies Date: Tue, 12 Nov 2013 13:52:43 +0100 Subject: [PATCH] Change the way we select the invoice address to be able to modify the choice if the user has js disabled --- templates/default/order-invoice.html | 101 ++++++++------------------- 1 file changed, 28 insertions(+), 73 deletions(-) diff --git a/templates/default/order-invoice.html b/templates/default/order-invoice.html index 9b23cc748..78bf56667 100644 --- a/templates/default/order-invoice.html +++ b/templates/default/order-invoice.html @@ -162,7 +162,7 @@ {/form} {form name="thelia.order.payment"} - + {assign var="isPost" value="{$smarty.post|count}"}
{form_hidden_fields form=$form} @@ -191,7 +191,6 @@ {form_field form=$form field='invoice-address'} -
{intl l="Billing address"}s
@@ -201,65 +200,19 @@
- - - {if !$error && $value} - {assign defaultParam '*'} - {else} - {assign defaultParam 'true'} - {/if} - {if !$error && $value} - {assign idParam $value} - {else} - {assign idParam '*'} - {/if} - {loop type="address" name="invoice-address" default=$defaultParam id=$idParam} - - - - - - - {if !$error} - - - + {loop type="address" name="invoice-address"} + {assign var="isInvoiceAddressChecked" value="0"} + {if $isPost} + {if $value == $ID} + {assign var="isInvoiceAddressChecked" value="1"} + {/if} + {elseif $DEFAULT} + {assign var="isInvoiceAddressChecked" value="1"} {/if} - {/loop} - - {if !$error && $value} - {assign defaultParam '*'} - {else} - {assign defaultParam 'false'} - {/if} - {if !$error && $value} - {assign excludeParam $value} - {else} - {assign excludeParam 'none'} - {/if} - {loop type="address" name="invoice-address" default=$defaultParam exclude=$excludeParam} - - - - - - + + {/loop} -
- {loop type="title" name="customer.title.info" id=$TITLE}{$SHORT}{/loop} {$LASTNAME|upper} {$FIRSTNAME|ucwords} - {$COMPANY} -
- {$ADDRESS1}
- {if $ADDRESS2 != ""} - {$ADDRESS2}
- {/if} - {if $ADDRESS3 != ""} - {$ADDRESS3}
- {/if} - {$ZIPCODE} - {$CITY}, {loop type="country" name="customer.country.info" id=$COUNTRY}{$TITLE}{/loop} -
-
- -
- {intl l="Change address"} -
+
+
- -
+
@@ -342,15 +291,21 @@ {block name="javascript-initialization"}