This commit is contained in:
Lai Tuan 2015-06-25 23:58:12 +09:00
parent 270340a79f
commit 1453c132fe
2 changed files with 5 additions and 1 deletions

View file

@ -58,7 +58,7 @@ block content
input(type="radio", name="age", value="18+")
span.spl 18+
div
input(type="radio", name="age", value='other')
input.radio-other(type="radio", name="age", value='other')
span.spl.spr(data-i18n="teachers_survey.other")
input.spr.input-age-other(type='text')
p.container-num-students

View file

@ -11,6 +11,7 @@ module.exports = class TeachersFreeTrialView extends RootView
events:
'click .submit-button': 'onClickSubmit'
'click .input-age-other': 'onClickTextBox'
constructor: (options) ->
super options
@ -32,6 +33,9 @@ module.exports = class TeachersFreeTrialView extends RootView
@render?()
@supermodel.loadCollection(@existingRequests, 'own_trial_requests', {cache: false})
onClickTextBox: (e) ->
$('.radio-other').prop("checked", true)
onClickSubmit: (e) ->
email = $('.input-email-address').val()
school = $('.input-school').val()