codecombat/app/templates/courses/classroom-settings-modal.jade

74 lines
3 KiB
Text
Raw Normal View History

2016-03-30 16:57:19 -04:00
extends /templates/core/modal-base-flat
block modal-header-content
2016-03-30 16:57:19 -04:00
if view.classroom.isNew()
h3.modal-title(data-i18n="courses.create_new_class")
2016-03-30 16:57:19 -04:00
else
h3.modal-title(data-i18n="courses.edit_settings1")
block modal-body-content
2016-03-30 16:57:19 -04:00
form
.form-group
label(data-i18n="courses.class_name")
2016-03-30 16:57:19 -04:00
input#name-input.form-control(name="name" type='text' value=view.classroom.get('name'))
.form-group
2016-03-30 16:57:19 -04:00
label
span(data-i18n="courses.description")
i.spl.text-muted(data-i18n="signup.optional")
textarea.form-control(name="description" rows=2)= view.classroom.get('description')
.form-group
label(data-i18n="choose_hero.programming_language")
2016-03-30 16:57:19 -04:00
- var aceConfig = view.classroom.get('aceConfig') || {};
- var languageDisabled = !!_.size(view.classroom.get('members'));
.help-block.small.text-navy(data-i18n="courses.language_cannot_change")
select#programming-language-select.form-control(name="language" value=aceConfig.language disabled=languageDisabled)
- var aceConfig = view.classroom.get('aceConfig') || {};
option(value="" data-i18n="courses.language_select")
option(value="python") Python
option(value="javascript") JavaScript
2016-03-30 16:57:19 -04:00
.form-group
label
span(data-i18n="courses.avg_student_exp_label")
i.spl.text-muted(data-i18n="signup.optional")
2016-03-30 16:57:19 -04:00
.help-block.small.text-navy(data-i18n="courses.avg_student_exp_desc")
select.form-control(name="averageStudentExp", value=view.classroom.get('averageStudentExp'))
option(value="" data-i18n="courses.avg_student_exp_select")
option(value="none" data-i18n="courses.avg_student_exp_none")
option(value="beginner" data-i18n="courses.avg_student_exp_beginner")
option(value="intermediate" data-i18n="courses.avg_student_exp_intermediate")
option(value="advanced" data-i18n="courses.avg_student_exp_advanced")
option(value="varied" data-i18n="courses.avg_student_exp_varied")
.form-group
label
span(data-i18n="courses.student_age_range_label")
i.spl.text-muted(data-i18n="signup.optional")
div
+ageRange("ageRangeMin")
span.spl.spr(data-i18n="courses.student_age_range_to")
+ageRange("ageRangeMax")
mixin ageRange(name)
select.age-range-select.form-control(name=name value=view.classroom.get(name))
option(value="") -
option(value="<6" data-i18n="courses.student_age_range_younger")
for i in _.range(6,18)
option(value=i)= i
option(value="18" data-i18n="courses.student_age_range_older")
block modal-footer-content
2016-03-30 16:57:19 -04:00
.text-center
if view.classroom.isNew()
button#save-settings-btn.btn.btn-primary.btn-lg(data-i18n="courses.create_class")
else
button#save-settings-btn.btn.btn-primary.btn-lg(data-i18n="common.save_changes")
if me.isAdmin()
hr
// DNT
h3 Admin Only
button#update-courses-btn.btn.btn-forest.btn-lg Update Courses