codecombat/app/templates/courses/activate-licenses-modal.jade
2016-04-04 15:19:27 -07:00

54 lines
1.8 KiB
Text

extends /templates/core/modal-base-flat
block modal-header-content
.clearfix
.text-center
h1(data-i18n="courses.enroll_students")
h2(data-i18n="courses.grants_lifetime_access")
if view.classroom
p= view.classroom.get('name')
block modal-body-content
.text-center
span(data-i18n='teacher.show_students_from')
span.spr :
select
each classroom in view.classrooms.models
option(selected=(classroom.id === view.classroom.id), value=classroom.id)
= classroom.get('name')
//- option(selected=!view.classroom, value='all-classrooms' data-i18n='teacher.all_students')
form.form
span(data-i18n="teacher.enroll_the_following_students")
span :
.well.form-group
for user in view.users.models
.checkbox
label
- var paid = user.get('coursePrepaidID')
- var selected = (view.selectedUsers.get(user.id) ? true : false)
input(type="checkbox", disabled=paid, checked=selected, data-user-id=user.id, name='user')
span.spr= user.broadName()
if paid
span (
span(data-i18n="courses.already_enrolled")
span )
#error-alert.alert.alert-danger.hide
#submit-form-area.text-center
p.small-details
span.spr(data-i18n="courses.enrollment_credits_available")
span#total-available= view.prepaids.totalAvailable()
p
button#activate-licenses-btn.btn.btn-lg.btn-primary(type="submit")
span.spr(data-i18n="courses.enroll")
| (
span#total-selected-span
| )
span.spl(data-i18n="courses.students1")
p
a#get-more-licenses-btn.btn.btn-lg.btn-primary-alt(href="/teachers/enrollments", data-i18n="courses.get_enrollments")
block modal-footer-content