Merge branch 'coupon' of https://github.com/thelia/thelia into coupon
# By mespeche # Via mespeche * 'coupon' of https://github.com/thelia/thelia: Max usage field and Is enabled field updates Max usage gestion
This commit is contained in:
@@ -55,15 +55,15 @@
|
|||||||
if($('#is-unlimited').length){
|
if($('#is-unlimited').length){
|
||||||
|
|
||||||
if($('#is-unlimited').is(':checked')){
|
if($('#is-unlimited').is(':checked')){
|
||||||
$('#max-usage').hide().val('');
|
$('#max-usage').hide().attr('value', '-1');
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#is-unlimited').change(function(){
|
$('#is-unlimited').change(function(){
|
||||||
if($('#is-unlimited').is(':checked')){
|
if($('#is-unlimited').is(':checked')){
|
||||||
$('#max-usage').hide().val('');
|
$('#max-usage').hide().attr('value', '-1');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$('#max-usage').show();
|
$('#max-usage').show().val('').attr('value', '');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,13 @@
|
|||||||
<input id="title" type="text" name="title" placeholder="title">
|
<input id="title" type="text" name="title" placeholder="title">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<label for="enabled" class="checkbox">
|
||||||
|
<input id="enabled" type="checkbox" name="isEnabled" value="1" checked>
|
||||||
|
Is enabled ?
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label for="available-on-special-offers" class="checkbox">
|
<label for="available-on-special-offers" class="checkbox">
|
||||||
<input id="available-on-special-offers" type="checkbox" name="isAvailableOnSpecialOffers" value="1">
|
<input id="available-on-special-offers" type="checkbox" name="isAvailableOnSpecialOffers" value="1">
|
||||||
@@ -66,7 +73,7 @@
|
|||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label for="max-usage">Max usage :</label>
|
<label for="max-usage">Max usage :</label>
|
||||||
<label for="is-unlimited" class="checkbox">
|
<label for="is-unlimited" class="checkbox">
|
||||||
<input id="is-unlimited" type="checkbox" name="isUnlimited" value="1">
|
<input id="is-unlimited" type="checkbox" name="isUnlimited" value="1" checked>
|
||||||
Is unlimited ?
|
Is unlimited ?
|
||||||
</label>
|
</label>
|
||||||
<input id="max-usage" type="text" name="maxUsage" placeholder="max usage">
|
<input id="max-usage" type="text" name="maxUsage" placeholder="max usage">
|
||||||
@@ -105,7 +112,7 @@
|
|||||||
|
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label for="short-description">Short description :</label>
|
<label for="short-description">Short description :</label>
|
||||||
<textarea id="short-description" name="short-description" placeholder="short description" class="span12" rows="5"></textarea>
|
<textarea id="short-description" name="shortDescription" placeholder="short description" class="span12" rows="5"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -113,7 +120,7 @@
|
|||||||
|
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label for="long-description">Long description :</label>
|
<label for="long-description">Long description :</label>
|
||||||
<textarea id="long-description" name="long-description" placeholder="long description" class="span12 wysiwyg" rows="10"></textarea>
|
<textarea id="long-description" name="longDescription" placeholder="long description" class="span12 wysiwyg" rows="10"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit" class="btn btn-primary">Save</button>
|
<button type="submit" class="btn btn-primary">Save</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user