codecombat/app/templates/courses/activate-licenses-modal.jade
2015-12-06 06:27:56 -08:00

73 lines
2.2 KiB
Text

extends /templates/core/modal-base
block modal-header-content
.clearfix
.text-center
h2 Enroll Students in Paid Courses
p= view.classroom.get('name')
block modal-body-content
- var usedLic = view.prepaids.totalRedeemers();
- var totalLic = view.prepaids.totalMaxRedeemers();
- var remainingLic = totalLic - usedLic;
.text-center
p
strong.spr You have
strong.spr= remainingLic
strong unused paid enrollments
.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)
span.spr Use 1 paid enrollment for #{view.user.broadName()}
.radio
label
input(type="radio", name="targets" value="selection")
span.spr Use paid enrollments for the following students:
else
p Use paid enrollments for the following students:
.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()
if paid
span (
span already enrolled
span )
#error-alert.alert.alert-danger.hide
#progress-area.hide
.progress
.progress-bar
#submit-form-area.text-center
p
span.spr Total students:
span#total-selected-span.spr
span#not-depleted-span
| (
span.spr licenses remaining:
span#licenses-remaining-span
| )
span#depleted-span
| (
span insufficient paid enrollments
| )
p
button#activate-licenses-btn.btn.btn-success.text-uppercase(type="submit") Enroll Students
p
a#get-more-licenses-btn.btn.btn-info.text-uppercase(href="/courses/purchase") Get More Enrollments
block modal-footer-content