mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Add separate school field for teacher survey
This commit is contained in:
parent
a9f8a7b1be
commit
021ff541e4
5 changed files with 19 additions and 2 deletions
|
@ -660,7 +660,8 @@
|
|||
description_3: "page."
|
||||
description_4: "Please fill out this quick survey and we’ll email you setup instructions."
|
||||
email: "Email Address"
|
||||
school_city: "Name of School, City"
|
||||
school: "Name of School"
|
||||
location: "Name of City"
|
||||
age_students: "How old are your students?"
|
||||
under: "Under"
|
||||
other: "Other:"
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
.input-email-address
|
||||
width: 40%
|
||||
|
||||
.input-school
|
||||
width: 40%
|
||||
|
||||
.input-location
|
||||
width: 40%
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ block content
|
|||
th Created
|
||||
th Reviewed
|
||||
th Applicant
|
||||
th School
|
||||
th Location
|
||||
th Age
|
||||
th Students
|
||||
|
@ -36,6 +37,7 @@ block content
|
|||
span= trialRequest.get('reviewDate').substring(0, 10)
|
||||
td
|
||||
a(href="/user/#{trialRequest.get('applicant')}")= trialRequest.get('properties').email
|
||||
td= trialRequest.get('properties').school
|
||||
td= trialRequest.get('properties').location
|
||||
td= trialRequest.get('properties').age
|
||||
td= trialRequest.get('properties').numStudents
|
||||
|
|
|
@ -37,8 +37,12 @@ block content
|
|||
label.control-label(data-i18n="teachers_survey.email")
|
||||
br
|
||||
input.control-label.input-email-address(type='text', value=email)
|
||||
p.container-school
|
||||
label.control-label(data-i18n="teachers_survey.school")
|
||||
br
|
||||
input.control-label.input-school(type='text')
|
||||
p.container-location
|
||||
label.control-label(data-i18n="teachers_survey.school_city")
|
||||
label.control-label(data-i18n="teachers_survey.location")
|
||||
br
|
||||
input.control-label.input-location(type='text')
|
||||
p.container-age
|
||||
|
|
|
@ -34,6 +34,7 @@ module.exports = class TeachersFreeTrialView extends RootView
|
|||
|
||||
onClickSubmit: (e) ->
|
||||
email = $('.input-email-address').val()
|
||||
school = $('.input-school').val()
|
||||
location = $('.input-location').val()
|
||||
age = $('input[name=age]:checked').val()
|
||||
age = $('.input-age-other').val() if age is 'other'
|
||||
|
@ -42,6 +43,7 @@ module.exports = class TeachersFreeTrialView extends RootView
|
|||
|
||||
# Validate input
|
||||
$('.container-email-address').removeClass('has-error')
|
||||
$('.container-school').removeClass('has-error')
|
||||
$('.container-location').removeClass('has-error')
|
||||
$('.container-age').removeClass('has-error')
|
||||
$('.container-num-students').removeClass('has-error')
|
||||
|
@ -51,6 +53,10 @@ module.exports = class TeachersFreeTrialView extends RootView
|
|||
$('.container-email-address').addClass('has-error')
|
||||
$('.error-message').show()
|
||||
return
|
||||
unless school
|
||||
$('.container-school').addClass('has-error')
|
||||
$('.error-message').show()
|
||||
return
|
||||
unless location
|
||||
$('.container-location').addClass('has-error')
|
||||
$('.error-message').show()
|
||||
|
@ -73,6 +79,7 @@ module.exports = class TeachersFreeTrialView extends RootView
|
|||
type: 'subscription'
|
||||
properties:
|
||||
email: email
|
||||
school: school
|
||||
location: location
|
||||
age: age
|
||||
numStudents: numStudents
|
||||
|
|
Loading…
Reference in a new issue