2016-02-25 14:49:34 -05:00
|
|
|
extends /templates/core/modal-base-flat
|
2014-12-06 13:05:40 -05:00
|
|
|
|
2016-05-09 18:16:54 -04:00
|
|
|
// DNT
|
|
|
|
|
2014-12-06 13:05:40 -05:00
|
|
|
block modal-header-content
|
|
|
|
h3 Administer User
|
2016-05-09 18:16:54 -04:00
|
|
|
h4 #{view.user.get('name') || 'Unnamed'} / #{view.user.get('email')}
|
|
|
|
span= view.user.id
|
2014-12-06 13:05:40 -05:00
|
|
|
|
|
|
|
block modal-body-content
|
2016-05-25 08:52:43 -04:00
|
|
|
|
|
|
|
h3.m-t-3 Grant Student Licenses
|
|
|
|
#prepaid-form.form
|
|
|
|
if view.state === 'creating-prepaid'
|
|
|
|
.progress.progress-striped.active
|
|
|
|
.progress-bar(style="width: 100%")
|
|
|
|
|
|
|
|
else if view.state === 'made-prepaid'
|
|
|
|
.alert.alert-success Licenses created!
|
|
|
|
|
|
|
|
else
|
|
|
|
.form-group
|
|
|
|
label Number of Licenses
|
|
|
|
input#seats-input.form-control(type="number", name="maxRedeemers")
|
|
|
|
.form-group
|
|
|
|
label Start Date
|
|
|
|
input.form-control(type="date" name="startDate" value=moment().format('YYYY-MM-DD'))
|
|
|
|
.form-group
|
|
|
|
label End Date
|
|
|
|
input.form-control(type="date" name="endDate" value=moment().add(1, 'year').format('YYYY-MM-DD')))
|
|
|
|
.form-group
|
|
|
|
button#add-seats-btn.btn.btn-primary Add Licenses
|
|
|
|
|
|
|
|
if view.prepaids.size()
|
|
|
|
h3.m-t-3 Existing Prepaids
|
|
|
|
table.table.table-condensed
|
|
|
|
tr
|
|
|
|
th ID
|
|
|
|
th Type
|
|
|
|
th Start
|
|
|
|
th End
|
|
|
|
th Used
|
|
|
|
for prepaid in view.prepaids.models
|
|
|
|
tr
|
|
|
|
td= prepaid.id
|
|
|
|
td= prepaid.get('type')
|
|
|
|
td
|
|
|
|
if prepaid.get('startDate')
|
|
|
|
= moment(prepaid.get('startDate')).utc().format('lll')
|
|
|
|
td
|
|
|
|
if prepaid.get('endDate')
|
|
|
|
= moment(prepaid.get('endDate')).utc().format('lll')
|
|
|
|
td #{(prepaid.get('redeemers') || []).length} / #{prepaid.get('maxRedeemers') || 0}
|
|
|
|
|
2014-12-06 13:05:40 -05:00
|
|
|
h3 Stripe Benefit
|
|
|
|
.form
|
|
|
|
.form-group
|
|
|
|
.radio
|
|
|
|
label
|
2016-05-09 18:16:54 -04:00
|
|
|
input(type="radio" name="stripe-benefit" value="" checked=view.none)
|
2014-12-06 13:05:40 -05:00
|
|
|
| None
|
|
|
|
.radio
|
|
|
|
label
|
2016-05-09 18:16:54 -04:00
|
|
|
input(type="radio" name="stripe-benefit" value="free" checked=view.free)
|
2014-12-06 13:05:40 -05:00
|
|
|
| Free
|
|
|
|
.radio
|
|
|
|
label
|
2016-05-09 18:16:54 -04:00
|
|
|
input(type="radio" name="stripe-benefit" value="free-until" checked=view.freeUntil)
|
2014-12-06 13:05:40 -05:00
|
|
|
| Free Until
|
2016-05-09 18:16:54 -04:00
|
|
|
input.form-control.spl(type="date" name="stripe-free-until" value=view.freeUntilDate)#free-until-date
|
2014-12-06 13:05:40 -05:00
|
|
|
.radio
|
|
|
|
label
|
2016-05-09 18:16:54 -04:00
|
|
|
input(type="radio" name="stripe-benefit" value="coupon" checked=view.coupon)
|
2014-12-06 13:05:40 -05:00
|
|
|
| Coupon
|
|
|
|
select.form-control#coupon-select
|
2016-05-09 18:16:54 -04:00
|
|
|
for coupon in view.coupons.models
|
|
|
|
option(value=coupon.id selected=coupon.id===view.currentCouponID)= coupon.formatString()
|
2015-11-10 17:33:27 -05:00
|
|
|
button#save-changes.btn.btn-primary Save Changes
|
2014-12-06 13:05:40 -05:00
|
|
|
|
2016-05-25 08:52:43 -04:00
|
|
|
block modal-footer
|