Commit 4e9eeff8 authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(CP, vouchers) add support for user defined voucher validity (in minutes)

(cherry picked from commit 72d69220)
(cherry picked from commit dd50e688)
parent b28d718f
......@@ -285,6 +285,17 @@ POSSIBILITY OF SUCH DAMAGE.
});
});
$("#voucher-validity").change(function(){
if ($(this).children(":selected").attr("id") == 'voucher-validity-custom') {
$("#voucher-validity-custom-data").show();
} else {
$("#voucher-validity-custom-data").hide();
}
});
$("#voucher-validity-custom-data").keyup(function(){
$("#voucher-validity-custom").val($(this).val()*60);
});
updateVoucherProviders();
$('.selectpicker').selectpicker('refresh');
});
......@@ -381,7 +392,9 @@ POSSIBILITY OF SUCH DAMAGE.
<option value="518400">{{ lang._('6 days') }}</option>
<option value="604800">{{ lang._('1 week') }}</option>
<option value="1209600">{{ lang._('2 weeks') }}</option>
<option id="voucher-validity-custom" value="">{{ lang._('Custom (minutes)') }}</option>
</select>
<input type="text" id="voucher-validity-custom-data" style="display:none;">
</td>
<td>
<select id="voucher-quantity" class="selectpicker" data-width="200px">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment