codecombat/app/templates/core/create-account-modal/segment-check-view.jade

71 lines
3.2 KiB
Text
Raw Normal View History

2016-06-07 17:51:41 -04:00
form.modal-body.segment-check
.modal-body-content
2016-06-30 18:32:58 -04:00
case view.signupState.get('path')
2016-06-07 17:51:41 -04:00
when 'student'
2016-06-30 18:32:58 -04:00
span(data-i18n="signup.enter_class_code")
2016-06-07 17:51:41 -04:00
.class-code-input-group.form-group
2016-06-30 18:32:58 -04:00
input.class-code-input(name="classCode" value=view.signupState.get('classCode'))
2016-06-07 17:51:41 -04:00
.render
2016-06-30 18:32:58 -04:00
unless _.isEmpty(view.signupState.get('classCode'))
2016-06-07 17:51:41 -04:00
if state.get('classCodeValid')
span.glyphicon.glyphicon-ok-circle.class-code-valid-icon
else
span.glyphicon.glyphicon-remove-circle.class-code-valid-icon
p.render
2016-06-30 18:32:58 -04:00
if _.isEmpty(view.signupState.get('classCode'))
span(data-i18n="signup.ask_teacher_1")
2016-06-07 17:51:41 -04:00
else if state.get('classCodeValid')
2016-06-30 18:32:58 -04:00
span.small(data-i18n="signup.about_to_join")
2016-06-07 17:51:41 -04:00
br
span.classroom-name= view.classroom.get('name')
br
span.teacher-name= view.classroom.owner.get('name')
else
2016-06-30 18:32:58 -04:00
span(data-i18n="signup.classroom_not_found")
if _.isEmpty(view.signupState.get('classCode')) || !state.get('classCodeValid')
2016-06-07 17:51:41 -04:00
br
2016-06-30 18:32:58 -04:00
span.spr(data-i18n="signup.ask_teacher_2")
2016-06-07 17:51:41 -04:00
a.individual-path-button
2016-06-30 18:32:58 -04:00
span(data-i18n="signup.ask_teacher_3")
span.spl(data-i18n="signup.ask_teacher_4")
2016-06-07 17:51:41 -04:00
when 'teacher'
// TODO
when 'individual'
.birthday-form-group.form-group
2016-06-30 18:32:58 -04:00
span(data-i18n="signup.enter_birthdate")
2016-06-07 17:51:41 -04:00
.input-border
select#birthday-month-input.input-large.form-control(name="birthdayMonth", style="width: 106px; float: left")
option(value='',data-i18n="calendar.month")
for name, index in ['january','february','march','april','may','june','july','august','september','october','november','december']
- var month = index + 1
2016-06-30 18:32:58 -04:00
option(data-i18n="calendar.#{name}" value=month, selected=(month == view.signupState.get('birthdayMonth')))
2016-06-07 17:51:41 -04:00
select#birthday-day-input.input-large.form-control(name="birthdayDay", style="width: 75px; float: left")
option(value='',data-i18n="calendar.day")
for day in _.range(1,32)
2016-06-30 18:32:58 -04:00
option(selected=(day == view.signupState.get('birthdayDay'))) #{day}
2016-07-11 14:51:12 -04:00
select#birthday-year-input.input-large.form-control(name="birthdayYear", style="width: 90px; float: left")
2016-06-07 17:51:41 -04:00
option(value='',data-i18n="calendar.year")
- var thisYear = new Date().getFullYear()
for year in _.range(thisYear, thisYear - 100, -1)
2016-06-30 18:32:58 -04:00
option(selected=(year == view.signupState.get('birthdayYear'))) #{year}
.parent_birthdate(data-i18n="signup.parent_use_birthdate")
2016-06-07 17:51:41 -04:00
default
2016-06-30 18:32:58 -04:00
p
span Sign-up error, please contact
=" "
a(href="mailto:support@codecombat.com") support@codecombat.com
| .
2016-06-07 17:51:41 -04:00
// In reverse order for tabbing purposes
.history-nav-buttons
2016-06-30 18:32:58 -04:00
//- disabled=!view.signupState.get('segmentCheckValid')
2016-06-07 17:51:41 -04:00
button.next-button.btn.btn-lg.btn-navy(type='submit')
2016-06-30 18:32:58 -04:00
span(data-i18n="about.next")
2016-06-07 17:51:41 -04:00
button.back-to-account-type.btn.btn-lg.btn-navy-alt(type='button')
2016-06-30 18:32:58 -04:00
span(data-i18n="common.back")
2016-06-07 17:51:41 -04:00