discourse-subscriptions/assets/javascripts/discourse/templates/components/create-coupon-form.hbs

37 lines
1.1 KiB
Handlebars

<div class='create-coupon-form'>
<form class="form-horizontal">
<p>
<label for="promo_code">{{i18n 'discourse_subscriptions.admin.coupons.promo_code'}}</label>
{{input type="text" name="promo_code" value=promoCode}}
</p>
<p>
<label for="amount">{{i18n 'discourse_subscriptions.admin.coupons.discount'}}</label>
{{combo-box
content=discountTypes
value=discountType
onChange=(action (mut discountType))
}}
{{input class="discount-amount" type="text" name="amount" value=discount}}
</p>
<p>
<label for="active">
{{i18n 'discourse_subscriptions.admin.coupons.active'}}
</label>
{{input type="checkbox" name="active" checked=active}}
</p>
</form>
{{d-button
action=(action "createNewCoupon")
label="discourse_subscriptions.admin.coupons.create"
title="discourse_subscriptions.admin.coupons.create"
icon="plus"
class="btn-primary btn btn-icon"}}
{{d-button
action=(action "cancelCreate")
label="cancel"
title="cancel"
icon="times"
class="btn btn-icon"}}
</div>