[FIX] website_sale_delivery: selection of non-available delivery method

Instead of disabling non-available method, hide it to avoid confusing the user
Fixes #1720
This commit is contained in:
Justin Warren 2014-08-11 17:23:37 +02:00 committed by Martin Trigaux
parent 0739bc4eda
commit 7d78bc1e14
1 changed files with 7 additions and 8 deletions

View File

@ -27,19 +27,18 @@
<h4>Choose your Delivery Method</h4>
<ul class="list-unstyled">
<li t-foreach="deliveries" t-as="delivery">
<label>
<input t-att-value="delivery.id" type="radio" name="delivery_type"
t-att-checked="order.carrier_id and order.carrier_id.id == delivery.id and 'checked' or False"
t-att-disabled="delivery.available and '0' or '1'"/>
<span t-field="delivery.name"/>
<t t-if="delivery.available">
<t t-if="delivery.available">
<label>
<input t-att-value="delivery.id" type="radio" name="delivery_type"
t-att-checked="order.carrier_id and order.carrier_id.id == delivery.id and 'checked' or False"/>
<span t-field="delivery.name"/>
<span class="badge" t-field="delivery.price"
t-field-options='{
"widget": "monetary",
"display_currency": "website.pricelist_id.currency_id"
}'/>
</t>
</label>
</label>
</t>
</li>
</ul>
</div>