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
&.btn-add-address,
&.btn-cart-update,
&.btn-coupon,
&.btn-filter,
&.btn-grid,

View File

@@ -96,4 +96,10 @@
display: block;
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 class="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}">
<select name="quantity" class="form-control" onchange="jQuery(this).parent('form').submit();">
{for $will=1 to $STOCK}
<option {if $QUANTITY == $will}selected="selected"{/if}>{$will}</option>
{/for}
</select>
<div class="form-group">
<select name="quantity" class="form-control" onchange="jQuery(this).parent('form').submit();">
{for $will=1 to $STOCK}
<option {if $QUANTITY == $will}selected="selected"{/if}>{$will}</option>
{/for}
</select>
</div>
<button type="submit" title="{intl l="Update Quantity"}" class="btn btn-cart-update">{intl l="+"}</button>
</form>
</div>
</td>