Add Update Qty button for user with javascript disabled

This commit is contained in:
touffies
2013-11-12 11:46:36 +01:00
parent 28900df9c4
commit 35dfcd42be
3 changed files with 16 additions and 6 deletions

View File

@@ -43,6 +43,7 @@
// Keep old style button // Keep old style button
&.btn-add-address, &.btn-add-address,
&.btn-cart-update,
&.btn-coupon, &.btn-coupon,
&.btn-filter, &.btn-filter,
&.btn-grid, &.btn-grid,

View File

@@ -97,3 +97,9 @@
font-size: 2.2em; font-size: 2.2em;
} }
} }
// Qty (js enabled)
.js .group-qty {
.form-inline .form-group { display: block; }
.btn-cart-update { .sr-only; }
}

View File

@@ -98,13 +98,16 @@
</td> </td>
<td class="qty"> <td class="qty">
<div class="form-group group-qty"> <div class="form-group group-qty">
<form action="{url path="/cart/update"}" method="post"> <form action="{url path="/cart/update"}" class="form-inline" method="post">
<input type="hidden" name="cart_item" value="{$ITEM_ID}"> <input type="hidden" name="cart_item" value="{$ITEM_ID}">
<div class="form-group">
<select name="quantity" class="form-control" onchange="jQuery(this).parent('form').submit();"> <select name="quantity" class="form-control" onchange="jQuery(this).parent('form').submit();">
{for $will=1 to $STOCK} {for $will=1 to $STOCK}
<option {if $QUANTITY == $will}selected="selected"{/if}>{$will}</option> <option {if $QUANTITY == $will}selected="selected"{/if}>{$will}</option>
{/for} {/for}
</select> </select>
</div>
<button type="submit" title="{intl l="Update Quantity"}" class="btn btn-cart-update">{intl l="+"}</button>
</form> </form>
</div> </div>
</td> </td>