2015-11-30 16:59:22 -05:00
|
|
|
extends /templates/core/modal-base
|
|
|
|
|
|
|
|
block modal-header-content
|
|
|
|
.clearfix
|
|
|
|
.text-center
|
2015-12-08 15:05:08 -05:00
|
|
|
h2(data-i18n="courses.enroll_paid")
|
2015-12-21 18:01:14 -05:00
|
|
|
if view.classroom
|
|
|
|
p= view.classroom.get('name')
|
2015-11-30 16:59:22 -05:00
|
|
|
|
|
|
|
block modal-body-content
|
|
|
|
- var usedLic = view.prepaids.totalRedeemers();
|
|
|
|
- var totalLic = view.prepaids.totalMaxRedeemers();
|
|
|
|
- var remainingLic = totalLic - usedLic;
|
|
|
|
.text-center
|
|
|
|
p
|
2015-12-08 15:05:08 -05:00
|
|
|
strong.spr(data-i18n="courses.you_have1")
|
|
|
|
strong= remainingLic
|
|
|
|
strong.spl(data-i18n="courses.you_have2")
|
2015-11-30 16:59:22 -05:00
|
|
|
|
|
|
|
.row
|
|
|
|
.col-sm-10.col-sm-offset-1
|
|
|
|
form.form
|
|
|
|
if view.user
|
|
|
|
.form-group
|
|
|
|
.radio
|
|
|
|
label
|
|
|
|
input(type="radio", name="targets" value="given" checked=true)
|
2015-12-08 15:05:08 -05:00
|
|
|
span.spr(data-i18n="courses.use_one")
|
|
|
|
span= view.user.broadName()
|
2015-11-30 16:59:22 -05:00
|
|
|
.radio
|
|
|
|
label
|
|
|
|
input(type="radio", name="targets" value="selection")
|
2015-12-08 15:05:08 -05:00
|
|
|
span(data-i18n="courses.use_multiple")
|
2015-11-30 16:59:22 -05:00
|
|
|
else
|
2015-12-08 15:05:08 -05:00
|
|
|
p(data-i18n="courses.use_multiple")
|
2015-12-06 09:27:54 -05:00
|
|
|
|
2015-11-30 16:59:22 -05:00
|
|
|
.well.form-group
|
|
|
|
for user in view.users.models
|
|
|
|
.checkbox
|
|
|
|
label
|
|
|
|
- var paid = user.get('coursePrepaidID')
|
|
|
|
input(type="checkbox", disabled=paid, checked=true, data-user-id=user.id, name='user')
|
|
|
|
span.spr= user.broadName()
|
2015-12-04 17:53:30 -05:00
|
|
|
if paid
|
|
|
|
span (
|
2015-12-08 15:05:08 -05:00
|
|
|
span(data-i18n="courses.already_enrolled")
|
2015-12-04 17:53:30 -05:00
|
|
|
span )
|
2015-11-30 16:59:22 -05:00
|
|
|
|
|
|
|
#error-alert.alert.alert-danger.hide
|
2015-12-08 15:05:08 -05:00
|
|
|
|
2015-11-30 16:59:22 -05:00
|
|
|
#progress-area.hide
|
|
|
|
.progress
|
|
|
|
.progress-bar
|
2015-12-08 15:05:08 -05:00
|
|
|
|
2015-11-30 16:59:22 -05:00
|
|
|
#submit-form-area.text-center
|
|
|
|
p
|
2015-12-08 15:05:08 -05:00
|
|
|
span.spr(data-i18n="courses.total_students")
|
2015-11-30 16:59:22 -05:00
|
|
|
span#total-selected-span.spr
|
|
|
|
span#not-depleted-span
|
|
|
|
| (
|
2015-12-08 15:05:08 -05:00
|
|
|
span.spr(data-i18n="courses.licenses_remaining")
|
2015-11-30 16:59:22 -05:00
|
|
|
span#licenses-remaining-span
|
|
|
|
| )
|
2015-12-08 15:05:08 -05:00
|
|
|
span#depleted-span
|
2015-11-30 16:59:22 -05:00
|
|
|
| (
|
2015-12-08 15:05:08 -05:00
|
|
|
span(data-i18n="courses.insufficient_enrollments")
|
2015-11-30 16:59:22 -05:00
|
|
|
| )
|
|
|
|
|
|
|
|
p
|
2015-12-08 15:05:08 -05:00
|
|
|
button#activate-licenses-btn.btn.btn-success.text-uppercase(type="submit", data-i18n="courses.enroll_students")
|
|
|
|
|
2015-11-30 16:59:22 -05:00
|
|
|
p
|
2015-12-08 15:05:08 -05:00
|
|
|
a#get-more-licenses-btn.btn.btn-info.text-uppercase(href="/courses/purchase", data-i18n="courses.get_enrollments")
|
|
|
|
|
2015-12-06 09:27:54 -05:00
|
|
|
block modal-footer-content
|