Added code generator for bulk coupons

This commit is contained in:
Raphael Michel
2016-06-01 19:10:00 +02:00
parent 2275812608
commit 818f61a819
3 changed files with 40 additions and 1 deletions

View File

@@ -87,7 +87,7 @@ class VoucherBulkForm(VoucherForm):
widget=forms.Textarea,
label=_("Codes"),
help_text=_(
"Add one voucher code per line"
"Add one voucher code per line. We suggest that you copy this list and save it into a file."
)
)

View File

@@ -9,6 +9,20 @@
{% bootstrap_form_errors form %}
<fieldset>
<legend>{% trans "Voucher codes" %}</legend>
<div class="form-group">
<div class="col-md-6 col-md-offset-3">
<div class="input-group">
<input type="text" class="form-control input-xs"
id="voucher-bulk-codes-num"
placeholder="{% trans "Number" %}">
<div class="input-group-btn">
<button class="btn btn-default" type="button" id="voucher-bulk-codes-generate">
{% trans "Generate random codes" %}
</button>
</div>
</div>
</div>
</div>
{% bootstrap_field form.codes layout="horizontal" %}
</fieldset>
<fieldset>