mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-14 01:31:15 -05:00
Merge branch 'master' into production
This commit is contained in:
commit
1f33a15a32
11 changed files with 221 additions and 426 deletions
|
@ -62,6 +62,11 @@ module.exports.setErrorToProperty = setErrorToProperty = (el, property, message,
|
||||||
return console.error "#{property} not found in", el, "so couldn't show message:", message
|
return console.error "#{property} not found in", el, "so couldn't show message:", message
|
||||||
|
|
||||||
setErrorToField input, message, warning
|
setErrorToField input, message, warning
|
||||||
|
|
||||||
|
module.exports.scrollToFirstError = ($el=$('body')) ->
|
||||||
|
$first = $el.find('.has-error, .alert-danger, .error-help-block, .has-warning, .alert-warning, .warning-help-block').first()
|
||||||
|
$('body').nanoScroller({scroll: 'top'}) # normalizes offset().top value
|
||||||
|
$('body').nanoScroller({scrollTop: $first.offset().top - 20})
|
||||||
|
|
||||||
module.exports.clearFormAlerts = (el) ->
|
module.exports.clearFormAlerts = (el) ->
|
||||||
$('.has-error', el).removeClass('has-error')
|
$('.has-error', el).removeClass('has-error')
|
||||||
|
|
|
@ -82,7 +82,7 @@ module.exports = class LankBoss extends CocoClass
|
||||||
console.error 'Lank collision! Already have:', id if @lanks[id]
|
console.error 'Lank collision! Already have:', id if @lanks[id]
|
||||||
@lanks[id] = lank
|
@lanks[id] = lank
|
||||||
@lankArray.push lank
|
@lankArray.push lank
|
||||||
layer ?= @layerAdapters['Obstacle'] if lank.thang?.spriteName.search(/(dungeon|indoor|ice|classroom).wall/i) isnt -1
|
layer ?= @layerAdapters['Obstacle'] if lank.thang?.spriteName.search(/(dungeon|indoor|ice|classroom|vr).wall/i) isnt -1
|
||||||
layer ?= @layerForChild lank.sprite, lank
|
layer ?= @layerForChild lank.sprite, lank
|
||||||
layer.addLank lank
|
layer.addLank lank
|
||||||
layer.updateLayerOrder()
|
layer.updateLayerOrder()
|
||||||
|
@ -204,7 +204,7 @@ module.exports = class LankBoss extends CocoClass
|
||||||
cacheObstacles: (updatedObstacles=null) ->
|
cacheObstacles: (updatedObstacles=null) ->
|
||||||
return if @cachedObstacles and not updatedObstacles
|
return if @cachedObstacles and not updatedObstacles
|
||||||
lankArray = @lankArray
|
lankArray = @lankArray
|
||||||
wallLanks = (lank for lank in lankArray when lank.thangType?.get('name').search(/(dungeon|indoor|ice|classroom).wall/i) isnt -1)
|
wallLanks = (lank for lank in lankArray when lank.thangType?.get('name').search(/(dungeon|indoor|ice|classroom|vr).wall/i) isnt -1)
|
||||||
return if _.any (s.stillLoading for s in wallLanks)
|
return if _.any (s.stillLoading for s in wallLanks)
|
||||||
walls = (lank.thang for lank in wallLanks)
|
walls = (lank.thang for lank in wallLanks)
|
||||||
@world.calculateBounds()
|
@world.calculateBounds()
|
||||||
|
|
|
@ -591,37 +591,6 @@
|
||||||
more_info_1: "Our"
|
more_info_1: "Our"
|
||||||
more_info_2: "teachers forum"
|
more_info_2: "teachers forum"
|
||||||
more_info_3: "is a good place to connect with fellow educators who are using CodeCombat."
|
more_info_3: "is a good place to connect with fellow educators who are using CodeCombat."
|
||||||
|
|
||||||
teachers_survey:
|
|
||||||
title: "Teacher Survey"
|
|
||||||
must_be_logged: "You must be logged in first. Please create an account or log in from the menu above."
|
|
||||||
retrieving: "Retrieving information..."
|
|
||||||
being_reviewed_1: "Your application for a free trial is being"
|
|
||||||
being_reviewed_2: "reviewed."
|
|
||||||
approved_1: "Your application for a free trial was"
|
|
||||||
approved_2: "approved!"
|
|
||||||
approved_4: "You can now enroll your students on the"
|
|
||||||
approved_5: "courses"
|
|
||||||
approved_6: "page."
|
|
||||||
denied_1: "Your application for a free trial has been"
|
|
||||||
denied_2: "denied."
|
|
||||||
contact_1: "Please contact"
|
|
||||||
contact_2: "if you have further questions."
|
|
||||||
description_1: "We offer free trials to teachers. You will be given 2 free enrollments which can be used to enroll students in paid courses."
|
|
||||||
description_1b: "You can find more information on our"
|
|
||||||
description_2: "teachers"
|
|
||||||
description_3: "page."
|
|
||||||
description_4: "Please fill out this quick survey and we’ll email you setup instructions."
|
|
||||||
email: "Email Address"
|
|
||||||
school: "Name of School"
|
|
||||||
location: "Name of City"
|
|
||||||
age_students: "How old are your students?"
|
|
||||||
under: "Under"
|
|
||||||
other: "Other:"
|
|
||||||
amount_students: "How many students do you teach?"
|
|
||||||
hear_about: "How did you hear about CodeCombat?"
|
|
||||||
fill_fields: "Please fill out all fields."
|
|
||||||
thanks: "Thanks! We'll send you setup instructions shortly."
|
|
||||||
|
|
||||||
teachers_quote:
|
teachers_quote:
|
||||||
name: "Quote Form"
|
name: "Quote Form"
|
||||||
|
|
|
@ -396,7 +396,7 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
|
||||||
prompt_title: "Niet genoeg edelstenen"
|
prompt_title: "Niet genoeg edelstenen"
|
||||||
prompt_body: "Wil je meer krijgen?"
|
prompt_body: "Wil je meer krijgen?"
|
||||||
prompt_button: "Naar de winkel"
|
prompt_button: "Naar de winkel"
|
||||||
# recovered: "Previous gems purchase recovered. Please refresh the page."
|
recovered: "Edelstenen aankoop hersteld. Ververs de pagina alstublieft."
|
||||||
# price: "x{{gems}} / mo"
|
# price: "x{{gems}} / mo"
|
||||||
|
|
||||||
subscribe:
|
subscribe:
|
||||||
|
@ -445,13 +445,13 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
|
||||||
subscription_required_to_play: "Je hebt een abonnement nodig om dit level te spelen."
|
subscription_required_to_play: "Je hebt een abonnement nodig om dit level te spelen."
|
||||||
unlock_help_videos: "Abonneer om toegang te krijgen tot alle instructievideos."
|
unlock_help_videos: "Abonneer om toegang te krijgen tot alle instructievideos."
|
||||||
personal_sub: "Persoonlijk Abonnement" # Accounts Subscription View below
|
personal_sub: "Persoonlijk Abonnement" # Accounts Subscription View below
|
||||||
# loading_info: "Loading subscription information..."
|
loading_info: "Inschrijvingsinformatie laden..."
|
||||||
# managed_by: "Managed by"
|
managed_by: "beheert door"
|
||||||
# will_be_cancelled: "Will be cancelled on"
|
will_be_cancelled: "Wordt gestopt op"
|
||||||
currently_free: "Je hebt momenteel een gratis account"
|
currently_free: "Je hebt momenteel een gratis account"
|
||||||
# currently_free_until: "You currently have a subscription until"
|
currently_free_until: "Je inschrijving loopt tot"
|
||||||
# was_free_until: "You had a free subscription until"
|
was_free_until: "Je hebt een gratis inschrijving tot"
|
||||||
# managed_subs: "Managed Subscriptions"
|
managed_subs: "beheerde inschrijving"
|
||||||
subscribing: "Inschrijven..."
|
subscribing: "Inschrijven..."
|
||||||
current_recipients: "Huidige ontvangers"
|
current_recipients: "Huidige ontvangers"
|
||||||
unsubscribing: "Uitschrijven..." # {change}
|
unsubscribing: "Uitschrijven..." # {change}
|
||||||
|
@ -699,8 +699,8 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
|
||||||
continue_script: "Sla huidige script over."
|
continue_script: "Sla huidige script over."
|
||||||
skip_scripts: "Sla alle scripts over die overgeslagen kunnen worden."
|
skip_scripts: "Sla alle scripts over die overgeslagen kunnen worden."
|
||||||
toggle_playback: "switch speel/pause."
|
toggle_playback: "switch speel/pause."
|
||||||
# scrub_playback: "Scrub back and forward through time."
|
scrub_playback: "reis door de tijd."
|
||||||
# single_scrub_playback: "Scrub back and forward through time by a single frame."
|
single_scrub_playback: "reis per frame door de tijd."
|
||||||
# scrub_execution: "Scrub through current spell execution."
|
# scrub_execution: "Scrub through current spell execution."
|
||||||
toggle_debug: "Toggle debug display."
|
toggle_debug: "Toggle debug display."
|
||||||
toggle_grid: "Toggle rooster weergave."
|
toggle_grid: "Toggle rooster weergave."
|
||||||
|
@ -774,8 +774,8 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
|
||||||
last_played: "Laatst gespeeld"
|
last_played: "Laatst gespeeld"
|
||||||
# leagues_explanation: "Play in a league against other clan members in these multiplayer arena instances."
|
# leagues_explanation: "Play in a league against other clan members in these multiplayer arena instances."
|
||||||
track_concepts1: "Traject concepten"
|
track_concepts1: "Traject concepten"
|
||||||
# track_concepts2a: "learned by each student"
|
track_concepts2a: "geleerd door elke leerling"
|
||||||
# track_concepts2b: "learned by each member"
|
track_concepts2b: "geleerd door elk lid"
|
||||||
# track_concepts3a: "Track levels completed for each student"
|
# track_concepts3a: "Track levels completed for each student"
|
||||||
# track_concepts3b: "Track levels completed for each member"
|
# track_concepts3b: "Track levels completed for each member"
|
||||||
track_concepts4a: "Zie jouw leerlingen'"
|
track_concepts4a: "Zie jouw leerlingen'"
|
||||||
|
@ -865,152 +865,152 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
|
||||||
topics: "Onderwerpen"
|
topics: "Onderwerpen"
|
||||||
hours_content: "uren inhoud:"
|
hours_content: "uren inhoud:"
|
||||||
get_free: "Ontvang een GRATIS cursus"
|
get_free: "Ontvang een GRATIS cursus"
|
||||||
# enroll_paid: "Enroll Students in Paid Courses"
|
enroll_paid: "Schrijf leerlingen in voor bepaalde cursussen"
|
||||||
you_have1: "U heeft"
|
you_have1: "U heeft"
|
||||||
# you_have2: "unused paid enrollments"
|
you_have2: "ongebruikte betaalde inschrijvingen"
|
||||||
# use_one: "Use 1 paid enrollment for"
|
use_one: "gebruik een reeds betaalde inschrijving voor"
|
||||||
# use_multiple: "Use paid enrollments for the following students:"
|
use_multiple: "gebruik reeds betaalde inschrijvingen voor:"
|
||||||
# already_enrolled: "already enrolled"
|
already_enrolled: "al ingeschreven"
|
||||||
# licenses_remaining: "licenses remaining:"
|
licenses_remaining: "licenties over:"
|
||||||
# insufficient_enrollments: "insufficient paid enrollments"
|
insufficient_enrollments: "onvoldoende betaalde inschrijvingen"
|
||||||
# enroll_students: "Enroll Students"
|
enroll_students: "schrijf leerlingen in"
|
||||||
# get_enrollments: "Get More Enrollments"
|
get_enrollments: "krijg meer inschrijvingen"
|
||||||
# change_language: "Change Course Language"
|
change_language: "Verander cursustaal"
|
||||||
# keep_using: "Keep Using"
|
keep_using: "Blijf Gebruiken"
|
||||||
# switch_to: "Switch To"
|
switch_to: "Verander naar"
|
||||||
# greetings: "Greetings!"
|
greetings: "Groeten"
|
||||||
# learn_p: "Learn Python"
|
learn_p: "Leer Python"
|
||||||
# learn_j: "Learn JavaScript"
|
learn_j: "Leer JavaScript"
|
||||||
# language_cannot_change: "Language cannot be changed once students join a class."
|
language_cannot_change: "Taal kan niet worden veranderd als leerlingen zijn ingeschreven voor de klas."
|
||||||
# back_classrooms: "Back to my classrooms"
|
back_classrooms: "terug naar mijn klaslokalen"
|
||||||
# back_courses: "Back to my courses"
|
back_courses: "Terug naar mijn cursussen"
|
||||||
# edit_details: "Edit class details"
|
edit_details: "bewerk klasgegevens"
|
||||||
# enrolled_courses: "enrolled in paid courses:"
|
enrolled_courses: "ingeschreven voor betaalde cursussen:"
|
||||||
# purchase_enrollments: "Purchase Enrollments"
|
purchase_enrollments: "Koop inschrijvingen"
|
||||||
# remove_student: "remove student"
|
remove_student: "verwijder leerling"
|
||||||
# assign: "Assign"
|
assign: "Toewijzen"
|
||||||
# to_assign: "to assign paid courses."
|
to_assign: "betaalde cursussen toewijzen."
|
||||||
# teacher: "Teacher"
|
teacher: "Leerkracht"
|
||||||
# complete: "Complete"
|
complete: "voltoooien"
|
||||||
# none: "None"
|
none: "Geen"
|
||||||
# save: "Save"
|
save: "Opslaan"
|
||||||
# play_campaign_title: "Play the Campaign"
|
play_campaign_title: "Speel de campagne"
|
||||||
# play_campaign_description: "You’re ready to take the next step! Explore hundreds of challenging levels, learn advanced programming skills, and compete in multiplayer arenas!"
|
play_campaign_description: "Je bent klaar voor de volgende stap! Onderzoek honderden uitdagende levels, leer geavanceerde programmeervaardigheden en neem het op tegen anderen in de arena's!"
|
||||||
# create_account_title: "Create an Account"
|
create_account_title: "Maak een account"
|
||||||
# create_account_description: "Sign up for a FREE CodeCombat account and gain access to more levels, more programming skills, and more fun!"
|
create_account_description: "Schrijf je in voor een GRATIS CodeCombat account en krijg toegang tot meer levels, meer programmeervaardigheden, en veel plezier!"
|
||||||
# preview_campaign_title: "Preview Campaign"
|
preview_campaign_title: "Campagne demo"
|
||||||
# preview_campaign_description: "Take a sneak peek at all that CodeCombat has to offer before signing up for your FREE account."
|
preview_campaign_description: "Spiek even naar alles wat CodeCombat aanbied, voor je je inschrijft voor een gratis account."
|
||||||
# arena: "Arena"
|
arena: "Arena"
|
||||||
# arena_soon_title: "Arena Coming Soon"
|
arena_soon_title: "Arena komt binnenkort"
|
||||||
# arena_soon_description: "We are working on a multiplayer arena for classrooms at the end of"
|
arena_soon_description: "We werken aan een multiplayer arena voor klaslokalen aan het eind van"
|
||||||
# not_enrolled1: "Not enrolled"
|
not_enrolled1: "Niet ingeschreven"
|
||||||
# not_enrolled2: "Ask your teacher to enroll you in the next course."
|
not_enrolled2: "Vraag je juf of meester om je in te schrijven voor de volgende cursus."
|
||||||
# next_course: "Next Course"
|
next_course: "Volgende cursus."
|
||||||
# coming_soon1: "Coming soon"
|
coming_soon1: "Komt binnenkort"
|
||||||
# coming_soon2: "We are hard at work making more courses for you!"
|
coming_soon2: "We werken hard aan nieuwe cursussen, voor jou!"
|
||||||
# available_levels: "Available Levels"
|
available_levels: "Beschikbare Levels"
|
||||||
# welcome_to_courses: "Adventurers, welcome to Courses!"
|
welcome_to_courses: "Avonturiers, Welkom bij de cursus!"
|
||||||
# ready_to_play: "Ready to play?"
|
ready_to_play: "Klaar om te spelen?"
|
||||||
# start_new_game: "Start New Game"
|
start_new_game: "Start Nieuw spel"
|
||||||
# play_now_learn_header: "Play now to learn"
|
play_now_learn_header: "Speel nu en leer"
|
||||||
# play_now_learn_1: "basic syntax to control your character"
|
play_now_learn_1: "basiszinnen om je karakter te besturen"
|
||||||
# play_now_learn_2: "while loops to solve pesky puzzles"
|
# play_now_learn_2: "while loops to solve pesky puzzles"
|
||||||
# play_now_learn_3: "strings & variables to customize actions"
|
# play_now_learn_3: "strings & variables to customize actions"
|
||||||
# play_now_learn_4: "how to defeat an ogre (important life skills!)"
|
# play_now_learn_4: "how to defeat an ogre (important life skills!)"
|
||||||
# welcome_to_page: "Welcome to your Courses page!"
|
welcome_to_page: "Welkom op jhe cursus-pagina!"
|
||||||
# completed_hoc: "Amazing! You've completed the Hour of Code course!"
|
completed_hoc: "Geweldig! Je hebt de Codeuur-cursus af!"
|
||||||
# ready_for_more_header: "Ready for more? Play the campaign mode!"
|
ready_for_more_header: "Wil je meer? Speel de campagne-mode!"
|
||||||
# ready_for_more_1: "Use gems to unlock new items!"
|
ready_for_more_1: "Gebruik edelstenen om nieuwe items te openen!"
|
||||||
# ready_for_more_2: "Play through brand new worlds and challenges"
|
ready_for_more_2: "Speel nieuwe werelden en uitdagingen"
|
||||||
# ready_for_more_3: "Learn even more programming!"
|
ready_for_more_3: "Leer zelfs meer programmeren!"
|
||||||
# saved_games: "Saved Games"
|
saved_games: "Opgeslagen spellen"
|
||||||
# hoc: "Hour of Code"
|
hoc: "codeuur"
|
||||||
# my_classes: "My Classes"
|
my_classes: "Mijn klassen"
|
||||||
# class_added: "Class successfully added!"
|
class_added: "Klas succesvol toegevoegd!"
|
||||||
# view_class: "view class"
|
view_class: "Bekijk klas"
|
||||||
# view_levels: "view levels"
|
view_levels: "bekijk levels"
|
||||||
# join_class: "Join A Class"
|
join_class: "doe mee met een klas"
|
||||||
# ask_teacher_for_code: "Ask your teacher if you have a CodeCombat class code! If so, enter it below:"
|
ask_teacher_for_code: "Vraag je juf/meester Of je een CodeCombat klassencode hebt! Als dat zo is, vul het hieronder in:"
|
||||||
# enter_c_code: "<Enter Class Code>"
|
enter_c_code: "<voer klassencode in>"
|
||||||
# join: "Join"
|
join: "Doe mee"
|
||||||
# joining: "Joining class"
|
joining: "Doe mee met klas"
|
||||||
# course_complete: "Course Complete"
|
course_complete: "Cursus afgerond"
|
||||||
# play_arena: "Play Arena"
|
play_arena: "Speel Arena"
|
||||||
# start: "Start"
|
start: "Start"
|
||||||
# last_level: "Last Level"
|
last_level: "Laatste Level"
|
||||||
# welcome_to_hoc: "Adventurers, welcome to our Hour of Code!"
|
welcome_to_hoc: "Avonturiers, Welkom bij codeuur!"
|
||||||
# logged_in_as: "Logged in as:"
|
logged_in_as: "Ingelogd als:"
|
||||||
# not_you: "Not you?"
|
not_you: "Ben je dit niet?"
|
||||||
# welcome_back: "Hi adventurer, welcome back!"
|
welcome_back: "Hallo avonturier, welkom terug!"
|
||||||
# continue_playing: "Continue Playing"
|
continue_playing: "Doorgaan met spelen"
|
||||||
# more_options: "More options:"
|
more_options: "Meer opties:"
|
||||||
# option1_header: "Option 1: Invite students via email"
|
option1_header: "Optie 1: Nodig leerlingen uit via mail"
|
||||||
# option1_body: "Students will automatically be sent an invitation to join this class, and will need to create an account with a username and password."
|
option1_body: "Leerlingen krijgen automatisch een uitnodiging om met de klas mee te doen, en de leerlingen moeten een account maken met gebruikersnaam en wachtwoord."
|
||||||
# option2_header: "Option 2: Send URL to your students"
|
option2_header: "Optie 2: Stuur leerlingen een link"
|
||||||
# option2_body: "Students will be asked to enter an email address, username and password to create an account."
|
option2_body: "Leerlingen wordt gevraagd een account te maken met hun e-mailadres, gebruikersnaam en een wachtwoord."
|
||||||
# option3_header: "Option 3: Direct students to codecombat.com/courses"
|
option3_header: "Optie 3: Stuur leerlingen naar codecombat.com/courses"
|
||||||
# option3_body: "Give students the following passcode to enter along with an email address, username and password when they create an account."
|
option3_body: "Geef leerlingen de volgende pincode welke ze samen met een emailadres, gebruikersnaam en wachtwoord moeten invullen, bij het aanmaken van een account."
|
||||||
# thank_you_pref: "Thank you for your purchase! You can now assign"
|
thank_you_pref: "Bedankt voor je aankoop! Je kunt nu meer leerlingen"
|
||||||
# thank_you_suff: "more students to paid courses."
|
thank_you_suff: "aan betaalde cursussen toevoegen."
|
||||||
# return_to_class: "Return to classroom"
|
return_to_class: "Terug naar het klaslokaal"
|
||||||
# return_to_course_man: "Return to course management."
|
return_to_course_man: "Terug naar cusrsubeheer."
|
||||||
# students_not_enrolled: "students not enrolled"
|
students_not_enrolled: "leerlingen niet ingeschreven"
|
||||||
# total_all_classes: "Total Across All Classes"
|
total_all_classes: "Totaal over alle klassen"
|
||||||
# how_many_enrollments: "How many additional paid enrollments do you need?"
|
how_many_enrollments: "Hoeveel extra inschrijvingen heb je nodig?"
|
||||||
# each_student_access: "Each student in a class will get access to Courses 2-4 once they are enrolled in paid courses. You may assign each course to each student individually."
|
each_student_access: "Wanneer een leerling is ingechreven voor een betaalde cursus krijgen ze toegang tot cursus 2-4. Je kunt elke cursus apart toewijzen aan elke student."
|
||||||
# purchase_now: "Purchase Now"
|
purchase_now: "Koop nu"
|
||||||
# enrollments: "enrollments"
|
enrollments: "inschrijvingen"
|
||||||
# remove_student1: "Remove Student"
|
remove_student1: "Verwijder leerling"
|
||||||
# are_you_sure: "Are you sure you want to remove this student from this class?"
|
are_you_sure: "Weet je zeker dat je de leerling uit de klas wil halen?"
|
||||||
# remove_description1: "Student will lose access to this classroom and assigned classes. Progress and gameplay is NOT lost, and the student can be added back to the classroom at any time."
|
remove_description1: "De toegang tot dit klaslokaalen de toegewezen klassen wordt geblokkeerd. Voortgang wordt NIET verwijderd, en de leerling kan altijd weer worden toegevoegd."
|
||||||
# remove_description2: "The activated paid license will not be returned."
|
remove_description2: "De geactiveerde betaalde licenties worden niet teruggegeven."
|
||||||
# keep_student: "Keep Student"
|
keep_student: "bewaar leerling"
|
||||||
# removing_user: "Removing user"
|
removing_user: "Verwijder gebruiker"
|
||||||
# to_join_ask: "To join a class, ask your teacher for an unlock code."
|
to_join_ask: "Om met de klas mee te doen, Moet je je juf/meester om de code vragen."
|
||||||
# join_this_class: "Join Class"
|
join_this_class: "Doe mee met de klas"
|
||||||
# enter_here: "<enter unlock code here>"
|
enter_here: "<Voer klassencode in>"
|
||||||
# successfully_joined: "Successfully joined"
|
successfully_joined: "Je doet nu mee"
|
||||||
# click_to_start: "Click here to start taking"
|
click_to_start: "Klik hier om te beginnen met"
|
||||||
# my_courses: "My Courses"
|
my_courses: "Mijn cursussen"
|
||||||
# classroom: "Classroom"
|
classroom: "klaslokaal"
|
||||||
# use_school_email: "use your school email if you have one"
|
use_school_email: "Gebruik je schoolmail, als je er een hebt"
|
||||||
# unique_name: "a unique name no one has chosen"
|
unique_name: "een unieke naam die nog niemand heeft genomen"
|
||||||
# pick_something: "pick something you can remember"
|
pick_something: "kies iets dat je kunt onthouden"
|
||||||
# class_code: "Class Code"
|
class_code: "Klassencode"
|
||||||
# optional_ask: "optional - ask your teacher to give you one!"
|
optional_ask: "Als je wilt - Vraag je juf/meester om je een te geven!"
|
||||||
# optional_school: "optional - what school do you go to?"
|
optional_school: "Als je wilt - Naar welke school ga je?"
|
||||||
# start_playing: "Start Playing"
|
start_playing: "Start met spelen"
|
||||||
# skip_this: "Skip this, I'll create an account later!"
|
skip_this: "Sla dit over! Ik maak later een account"
|
||||||
# welcome: "Welcome"
|
welcome: "Welkom"
|
||||||
# getting_started: "Getting Started with Courses"
|
getting_started: "Introductie voor de cursussen"
|
||||||
# download_getting_started: "Download Getting Started Guide [PDF]"
|
download_getting_started: "Download de introductiehandleiding [PDF]"
|
||||||
# getting_started_1: "Create a new class by clicking the green 'Create New Class' button below."
|
getting_started_1: "Maak een nieuwe kjlas door te drukken op de groune 'Maak nieuwe klas'-klop hieronder."
|
||||||
# getting_started_2: "Once you've created a class, click the blue 'Add Students' button."
|
getting_started_2: "Wanneer je een klas hebt gemaakt, klik dan op de 'Voeg leerlingen toe'-knop."
|
||||||
# getting_started_3: "You'll see student's progress below as they sign up and join your class."
|
getting_started_3: "Je ziet dan de voortgang van de leerlingen, wanneer ze zich inschrijven en aanmelden voor uw klas."
|
||||||
# additional_resources: "Additional Resources"
|
additional_resources: "Extra bronnen"
|
||||||
# additional_resources_1_pref: "Download/print our"
|
additional_resources_1_pref: "Download/print onze"
|
||||||
# additional_resources_1_mid: "Course 1 Teacher's Guide"
|
additional_resources_1_mid: "Cursus 1 Leerkrachtengids"
|
||||||
# additional_resources_1_suff: "explanations and solutions to each level."
|
additional_resources_1_suff: "uitleg en oplossingen voor elke level."
|
||||||
# additional_resources_2_pref: "Complete our"
|
additional_resources_2_pref: "Finish onze"
|
||||||
# additional_resources_2_suff: "to get two free enrollments for the rest of our paid courses."
|
additional_resources_2_suff: "Om twee gratis inschrijvingen te krijgen voor onze overige betaalde cursussen."
|
||||||
# additional_resources_3_pref: "Visit our"
|
additional_resources_3_pref: "Bezoek onze"
|
||||||
# additional_resources_3_mid: "Teacher Forums"
|
additional_resources_3_mid: "Leerkrachtforums"
|
||||||
# additional_resources_3_suff: "to connect to fellow educators who are using CodeCombat."
|
additional_resources_3_suff: "Om contact te leggen met andere leerkrachten die CodeCombat gebruiken."
|
||||||
# additional_resources_4_pref: "Check out our"
|
additional_resources_4_pref: "Bekijk onze"
|
||||||
# additional_resources_4_mid: "Schools Page"
|
additional_resources_4_mid: "Scholenpagina"
|
||||||
# additional_resources_4_suff: "to learn more about CodeCombat's classroom offerings."
|
additional_resources_4_suff: "Om meer te leren over CodeCombat's klaslokaalaanbiedingen."
|
||||||
# your_classes: "Your Classes"
|
your_classes: "Uw klassen"
|
||||||
# no_classes: "No classes yet!"
|
no_classes: "Nog geen klassen!"
|
||||||
# create_new_class1: "create new class"
|
create_new_class1: "Maak nieuwe klas"
|
||||||
# available_courses: "Available Courses"
|
available_courses: "Beschikbare cursussen"
|
||||||
# unused_enrollments: "Unused enrollments available:"
|
unused_enrollments: "Ongebruikte inschrijvingen beschikbaar:"
|
||||||
# students_access: "All students get access to Introduction to Computer Science for free. One enrollment per student is required to assign them to paid CodeCombat courses. A single student does not need multiple enrollments to access all paid courses."
|
students_access: "Elke leerling krijgt gratis toegang tot de introductie op informatica. Een inschrijving per student is nodig om ze toegang te geven tot betaalde cursussen. een leerling heeft niet meerdere inschrijvingen nodig voor meerdere betaalde cursussen."
|
||||||
# active_courses: "active courses"
|
active_courses: "actieve cursussen"
|
||||||
# no_students: "No students yet!"
|
no_students: "Nog geen leerlingen!"
|
||||||
# add_students1: "add students"
|
add_students1: "leerlingen toevoegen"
|
||||||
# view_edit: "view/edit"
|
view_edit: "bekijk/bewerk"
|
||||||
# students_enrolled: "students enrolled"
|
students_enrolled: "ingeschreven leerlingen"
|
||||||
# length: "Length:"
|
length: "Lengte:"
|
||||||
|
|
||||||
classes:
|
classes:
|
||||||
archmage_title: "Tovenaar"
|
archmage_title: "Tovenaar"
|
||||||
|
@ -1241,7 +1241,7 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
|
||||||
fight: "Aanvallen!"
|
fight: "Aanvallen!"
|
||||||
watch_victory: "Aanschouw je overwinning!"
|
watch_victory: "Aanschouw je overwinning!"
|
||||||
defeat_the: "Versla de"
|
defeat_the: "Versla de"
|
||||||
# watch_battle: "Watch the battle"
|
watch_battle: "Bekijk het gevecht"
|
||||||
tournament_started: ", begonnen"
|
tournament_started: ", begonnen"
|
||||||
tournament_ends: "Toernooi eindigt"
|
tournament_ends: "Toernooi eindigt"
|
||||||
tournament_ended: "Toernooi geeindigd"
|
tournament_ended: "Toernooi geeindigd"
|
||||||
|
@ -1290,7 +1290,7 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
|
||||||
|
|
||||||
account:
|
account:
|
||||||
payments: "Betalingen"
|
payments: "Betalingen"
|
||||||
# prepaid_codes: "Prepaid Codes"
|
prepaid_codes: "Prepaidcodes"
|
||||||
purchased: "Gekocht"
|
purchased: "Gekocht"
|
||||||
subscription: "abonnement"
|
subscription: "abonnement"
|
||||||
invoices: "Facturen"
|
invoices: "Facturen"
|
||||||
|
@ -1299,7 +1299,7 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
|
||||||
paid_on: "Betaald op"
|
paid_on: "Betaald op"
|
||||||
service: "Service"
|
service: "Service"
|
||||||
price: "Prijs"
|
price: "Prijs"
|
||||||
# gems: "Gems"
|
gems: "Edelstenen"
|
||||||
active: "Actief"
|
active: "Actief"
|
||||||
subscribed: "Ingeschreven"
|
subscribed: "Ingeschreven"
|
||||||
unsubscribed: "Uitgeschreven"
|
unsubscribed: "Uitgeschreven"
|
||||||
|
@ -1324,23 +1324,23 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
|
||||||
purchase_code: "koop een prepaidcode"
|
purchase_code: "koop een prepaidcode"
|
||||||
# purchase_code1: "Subscription Codes can be redeemed to add premium subscription time to one or more CodeCombat accounts."
|
# purchase_code1: "Subscription Codes can be redeemed to add premium subscription time to one or more CodeCombat accounts."
|
||||||
# purchase_code2: "Each CodeCombat account can only redeem a particular Subscription Code once."
|
# purchase_code2: "Each CodeCombat account can only redeem a particular Subscription Code once."
|
||||||
# purchase_code3: "Subscription Code months will be added to the end of any existing subscription on the account."
|
# purchase_code3: "Subscription Code months will be added to the end of any existing subscription on the account."0
|
||||||
# users: "Users"
|
users: "Gebruikers"
|
||||||
# months: "Months"
|
months: "Maanden"
|
||||||
purchase_total: "Totaal"
|
purchase_total: "Totaal"
|
||||||
purchase_button: "Verzend betaling"
|
purchase_button: "Verzend betaling"
|
||||||
your_codes: "Je codes:" # {change}
|
your_codes: "Je codes:" # {change}
|
||||||
redeem_codes: "Prepaidcode inwisselen"
|
redeem_codes: "Prepaidcode inwisselen"
|
||||||
# prepaid_code: "Prepaid Code"
|
prepaid_code: "Prepaidcode"
|
||||||
# lookup_code: "Lookup prepaid code"
|
lookup_code: "Prepaidcode opzoeken"
|
||||||
# apply_account: "Apply to your account"
|
# apply_account: "Apply to your account"
|
||||||
# copy_link: "You can copy the code's link and send it to someone."
|
copy_link: "je kunt de link van de code kopieren en naar iemand verzenden."
|
||||||
# quantity: "Quantity"
|
quantity: "Hoeveelheid"
|
||||||
# redeemed: "Redeemed"
|
# redeemed: "Redeemed"
|
||||||
# no_codes: "No codes yet!"
|
no_codes: "Nog geen codes!"
|
||||||
# you_can1: "You can"
|
you_can1: "Je kunt"
|
||||||
# you_can2: "purchase a prepaid code"
|
you_can2: "een prepaidcode kopen"
|
||||||
# you_can3: "that can be applied to your own account or given to others."
|
you_can3: "die je voor jke eigen account kunt gebruiken of aan anderen kunt geven."
|
||||||
|
|
||||||
loading_error:
|
loading_error:
|
||||||
could_not_load: "Fout bij het laden van de server"
|
could_not_load: "Fout bij het laden van de server"
|
||||||
|
@ -1406,16 +1406,16 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
|
||||||
campaigns: "Campagnes"
|
campaigns: "Campagnes"
|
||||||
poll: "Stemming"
|
poll: "Stemming"
|
||||||
user_polls_record: "Stemgeschiedenis"
|
user_polls_record: "Stemgeschiedenis"
|
||||||
# course: "Course"
|
course: "Cursus"
|
||||||
# courses: "Courses"
|
courses: "Cursussen"
|
||||||
# course_instance: "Course Instance"
|
# course_instance: "Course Instance"
|
||||||
# course_instances: "Course Instances"
|
# course_instances: "Course Instances"
|
||||||
# classroom: "Classroom"
|
classroom: "Klaslokaal"
|
||||||
# classrooms: "Classrooms"
|
classrooms: "Klaslokalen"
|
||||||
# clan: "Clan"
|
# clan: "Clan"
|
||||||
# clans: "Clans"
|
# clans: "Clans"
|
||||||
# members: "Members"
|
members: "Leden"
|
||||||
# users: "Users"
|
users: "Gebruikers"
|
||||||
|
|
||||||
concepts:
|
concepts:
|
||||||
advanced_strings: "geavanceerde Strings"
|
advanced_strings: "geavanceerde Strings"
|
||||||
|
@ -1516,8 +1516,8 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
|
||||||
nutshell_title: "In een notendop"
|
nutshell_title: "In een notendop"
|
||||||
nutshell_description: "Alle middelen die wij aanbieden in de Level Editor zijn gratis te gebruiken om levels aan te maken. Wij behouden ons echter het recht voor om levels die gemaakt zijn op codecombat.com te beperken, en hier in de toekomst geld voor te vragen, moest dat ooit gebeuren."
|
nutshell_description: "Alle middelen die wij aanbieden in de Level Editor zijn gratis te gebruiken om levels aan te maken. Wij behouden ons echter het recht voor om levels die gemaakt zijn op codecombat.com te beperken, en hier in de toekomst geld voor te vragen, moest dat ooit gebeuren."
|
||||||
canonical: "De Engelse versie van dit document is de definitieve en kanonieke versie. Bij verschillen tussen vertalingen heeft de Engelse versie voorrang."
|
canonical: "De Engelse versie van dit document is de definitieve en kanonieke versie. Bij verschillen tussen vertalingen heeft de Engelse versie voorrang."
|
||||||
# third_party_title: "Third Party Services"
|
third_party_title: "Derde partijen"
|
||||||
# third_party_description: "CodeCombat uses the following third party services (among others):"
|
third_party_description: "CodeCombat gebruikt onder andere de volgende diensten van derden:"
|
||||||
|
|
||||||
ladder_prizes:
|
ladder_prizes:
|
||||||
title: "Tournamentprijzen" # This section was for an old tournament and doesn't need new translations now.
|
title: "Tournamentprijzen" # This section was for an old tournament and doesn't need new translations now.
|
||||||
|
@ -1540,11 +1540,11 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
|
||||||
oreilly: "ebook van je keuze"
|
oreilly: "ebook van je keuze"
|
||||||
|
|
||||||
admin:
|
admin:
|
||||||
# av_espionage: "Espionage" # Really not important to translate /admin controls.
|
av_espionage: "spionage" # Really not important to translate /admin controls.
|
||||||
# av_espionage_placeholder: "Email or username"
|
av_espionage_placeholder: "Email of gebruikersnaam"
|
||||||
# av_usersearch: "User Search"
|
av_usersearch: "Zoek gebruiker"
|
||||||
# av_usersearch_placeholder: "Email, username, name, whatever"
|
av_usersearch_placeholder: "Email, gebruikersnaam, naam, whatever"
|
||||||
# av_usersearch_search: "Search"
|
av_usersearch_search: "Zoeken"
|
||||||
av_title: "Administrator panels"
|
av_title: "Administrator panels"
|
||||||
av_entities_sub_title: "Entiteiten"
|
av_entities_sub_title: "Entiteiten"
|
||||||
av_entities_users_url: "Gebruikers"
|
av_entities_users_url: "Gebruikers"
|
||||||
|
|
|
@ -4,44 +4,49 @@ ThangComponentSchema = require './thang_component'
|
||||||
defaultTasks = [
|
defaultTasks = [
|
||||||
'Name the level.'
|
'Name the level.'
|
||||||
'Create a Referee stub, if needed.'
|
'Create a Referee stub, if needed.'
|
||||||
|
'Do basic set decoration.'
|
||||||
|
'Publish.'
|
||||||
|
|
||||||
'Build the level.'
|
'Build the level.'
|
||||||
'Set up goals.'
|
'Set up goals.'
|
||||||
|
'Write the sample code.'
|
||||||
|
'Make sure the level ends promptly on success and failure.'
|
||||||
|
|
||||||
'Choose the Existence System lifespan and frame rate.'
|
'Choose the Existence System lifespan and frame rate.'
|
||||||
'Choose the UI System paths and coordinate hover if needed.'
|
'Choose the UI System paths and coordinate hover if needed.'
|
||||||
'Choose the AI System pathfinding and Vision System line of sight.'
|
'Choose the AI System pathfinding and Vision System line of sight.'
|
||||||
'Write the sample code.'
|
|
||||||
|
|
||||||
'Do basic set decoration.'
|
|
||||||
'Adjust script camera bounds.'
|
'Adjust script camera bounds.'
|
||||||
'Choose music file in Introduction script.'
|
'Choose music file in Introduction script.'
|
||||||
'Choose autoplay in Introduction script.'
|
'Choose autoplay in Introduction script.'
|
||||||
|
|
||||||
'Add to a campaign.'
|
'Add Clojure/Lua/CoffeeScript.'
|
||||||
'Publish.'
|
|
||||||
'Choose level options like required/restricted gear.'
|
'Write the description.'
|
||||||
'Create achievements, including unlocking next level.'
|
'Write the guide.'
|
||||||
|
|
||||||
|
'Write a loading tip, if needed.'
|
||||||
|
'Add programming concepts covered.'
|
||||||
|
'Mark whether it requires a subscription.'
|
||||||
'Choose leaderboard score types.'
|
'Choose leaderboard score types.'
|
||||||
|
|
||||||
|
'Do thorough set decoration.'
|
||||||
'Playtest with a slow/tough hero.'
|
'Playtest with a slow/tough hero.'
|
||||||
'Playtest with a fast/weak hero.'
|
'Playtest with a fast/weak hero.'
|
||||||
'Playtest with a couple random seeds.'
|
'Playtest with a couple random seeds.'
|
||||||
'Make sure the level ends promptly on success and failure.'
|
|
||||||
'Remove/simplify unnecessary doodad collision.'
|
'Remove/simplify unnecessary doodad collision.'
|
||||||
|
|
||||||
|
'Add to a campaign.'
|
||||||
|
'Choose level options like required/restricted gear.'
|
||||||
|
'Create achievements, including unlocking next level.'
|
||||||
|
|
||||||
|
'Click the Populate i18n button.'
|
||||||
|
'Add i18n field for the sample code comments.'
|
||||||
'Release to adventurers via MailChimp.'
|
'Release to adventurers via MailChimp.'
|
||||||
|
|
||||||
'Write the description.'
|
|
||||||
'Add i18n field for the sample code comments.'
|
|
||||||
'Add Clojure/Lua/CoffeeScript.'
|
|
||||||
'Write the guide.'
|
|
||||||
'Write a loading tip, if needed.'
|
|
||||||
'Click the Populate i18n button.'
|
|
||||||
'Add programming concepts covered.'
|
|
||||||
|
|
||||||
'Mark whether it requires a subscription.'
|
|
||||||
'Release to everyone via MailChimp.'
|
'Release to everyone via MailChimp.'
|
||||||
|
|
||||||
'Check completion/engagement/problem analytics.'
|
'Check completion/engagement/problem analytics.'
|
||||||
'Do thorough set decoration.'
|
|
||||||
'Add a walkthrough video.'
|
'Add a walkthrough video.'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
#teachers-free-trial-view
|
|
||||||
|
|
||||||
.input-school
|
|
||||||
width: 40%
|
|
||||||
|
|
||||||
.input-location
|
|
||||||
width: 40%
|
|
||||||
|
|
||||||
.input-heard-about
|
|
||||||
width: 100%
|
|
||||||
|
|
||||||
.logged-out-blurb
|
|
||||||
font-size: 18px
|
|
||||||
|
|
||||||
.thanks-submit
|
|
||||||
display: none
|
|
||||||
|
|
||||||
.email-address
|
|
||||||
margin-right: 12px
|
|
||||||
|
|
||||||
.error-message
|
|
||||||
display: none
|
|
||||||
color: red
|
|
|
@ -89,5 +89,5 @@ block content
|
||||||
mixin trial-and-questions
|
mixin trial-and-questions
|
||||||
h3(data-i18n="courses.questions")
|
h3(data-i18n="courses.questions")
|
||||||
p
|
p
|
||||||
span.spr(data-i18n="teachers_survey.contact_1")
|
span.spr Please contact
|
||||||
a(href='mailto:team@codecombat.com') team@codecombat.com
|
a(href='mailto:team@codecombat.com') team@codecombat.com
|
||||||
|
|
|
@ -14,7 +14,7 @@ block content
|
||||||
.col-sm-4
|
.col-sm-4
|
||||||
.form-group
|
.form-group
|
||||||
label.control-label(data-i18n="general.email")
|
label.control-label(data-i18n="general.email")
|
||||||
input.form-control(name="email")
|
input.form-control(name="email" type="email")
|
||||||
|
|
||||||
.row
|
.row
|
||||||
.col-sm-offset-2.col-sm-4
|
.col-sm-offset-2.col-sm-4
|
||||||
|
|
|
@ -1,79 +0,0 @@
|
||||||
extends /templates/base
|
|
||||||
|
|
||||||
block content
|
|
||||||
|
|
||||||
h2(data-i18n="teachers_survey.title")
|
|
||||||
|
|
||||||
- var existingRequest = view.existingRequests.at(0)
|
|
||||||
if me.isAnonymous()
|
|
||||||
p.logged-out-blurb(data-i18n="teachers_survey.must_be_logged")
|
|
||||||
else if view.fetchingData
|
|
||||||
h4(data-i18n="teachers_survey.retrieving")
|
|
||||||
else if existingRequest
|
|
||||||
if existingRequest.get('status') === 'submitted'
|
|
||||||
p
|
|
||||||
span.spr(data-i18n="teachers_survey.being_reviewed_1")
|
|
||||||
strong(data-i18n="teachers_survey.being_reviewed_2")
|
|
||||||
else if existingRequest.get('status') === 'approved'
|
|
||||||
p
|
|
||||||
span.spr(data-i18n="teachers_survey.approved_1")
|
|
||||||
strong.spr(data-i18n="teachers_survey.approved_2")
|
|
||||||
span.spr(data-i18n="teachers_survey.approved_4")
|
|
||||||
a(href='/courses/teachers', data-i18n="teachers_survey.approved_5")
|
|
||||||
span.spl(data-i18n="teachers_survey.approved_6")
|
|
||||||
else
|
|
||||||
p
|
|
||||||
span.spr(data-i18n="teachers_survey.denied_1")
|
|
||||||
strong(data-i18n="teachers_survey.denied_2")
|
|
||||||
p
|
|
||||||
span.spr(data-i18n="teachers_survey.contact_1")
|
|
||||||
a(href='mailto:team@codecombat.com') team@codecombat.com
|
|
||||||
span.spl(data-i18n="teachers_survey.contact_2")
|
|
||||||
else
|
|
||||||
p(data-i18n="teachers_survey.description_1")
|
|
||||||
p
|
|
||||||
span.spr(data-i18n="teachers_survey.description_1b")
|
|
||||||
a(href='/teachers', data-i18n="teachers_survey.description_2")
|
|
||||||
span.spl(data-i18n="teachers_survey.description_3")
|
|
||||||
p(data-i18n="teachers_survey.description_4")
|
|
||||||
p.container-email-address
|
|
||||||
label.control-label(data-i18n="teachers_survey.email")
|
|
||||||
br
|
|
||||||
span.email-address= view.email
|
|
||||||
a(href='/account/settings') Change
|
|
||||||
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.location")
|
|
||||||
br
|
|
||||||
input.control-label.input-location(type='text')
|
|
||||||
p.container-age
|
|
||||||
label.control-label(data-i18n="teachers_survey.age_students")
|
|
||||||
div
|
|
||||||
input(type="radio", name="age", value="Under 14")
|
|
||||||
span.spl(data-i18n="teachers_survey.under")
|
|
||||||
span.spl 14
|
|
||||||
div
|
|
||||||
input(type="radio", name="age", value="14-17")
|
|
||||||
span.spl 14-17
|
|
||||||
div
|
|
||||||
input(type="radio", name="age", value="18+")
|
|
||||||
span.spl 18+
|
|
||||||
div
|
|
||||||
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
|
|
||||||
label.control-label(data-i18n="teachers_survey.amount_students")
|
|
||||||
br
|
|
||||||
input.control-label.input-num-students(type='text')
|
|
||||||
p.container-heard-about
|
|
||||||
label.control-label(data-i18n="teachers_survey.hear_about")
|
|
||||||
br
|
|
||||||
textarea.control-label.input-heard-about(rows=4)
|
|
||||||
p.error-message(data-i18n="teachers_survey.fill_fields")
|
|
||||||
p
|
|
||||||
button.btn.btn-default.submit-button(data-i18n="play_level.tome_submit_button")
|
|
||||||
p.thanks-submit(data-i18n="teachers_survey.thanks")
|
|
|
@ -53,12 +53,18 @@ module.exports = class RequestQuoteView extends RootView
|
||||||
attrs.educationLevel.push(@$('#other-education-level-input').val())
|
attrs.educationLevel.push(@$('#other-education-level-input').val())
|
||||||
forms.clearFormAlerts(form)
|
forms.clearFormAlerts(form)
|
||||||
result = tv4.validateMultiple(attrs, formSchema)
|
result = tv4.validateMultiple(attrs, formSchema)
|
||||||
|
error = true
|
||||||
if not result.valid
|
if not result.valid
|
||||||
return forms.applyErrorsToForm(form, result.errors)
|
forms.applyErrorsToForm(form, result.errors)
|
||||||
if not /^.+@.+\..+$/.test(attrs.email)
|
else if not /^.+@.+\..+$/.test(attrs.email)
|
||||||
return forms.setErrorToProperty(form, 'email', 'Invalid email.')
|
forms.setErrorToProperty(form, 'email', 'Invalid email.')
|
||||||
if not _.size(attrs.educationLevel)
|
else if not _.size(attrs.educationLevel)
|
||||||
return forms.setErrorToProperty(form, 'educationLevel', 'Check at least one.')
|
return forms.setErrorToProperty(form, 'educationLevel', 'Check at least one.')
|
||||||
|
else
|
||||||
|
error = false
|
||||||
|
if error
|
||||||
|
forms.scrollToFirstError()
|
||||||
|
return
|
||||||
@trialRequest = new TrialRequest({
|
@trialRequest = new TrialRequest({
|
||||||
type: 'course'
|
type: 'course'
|
||||||
properties: attrs
|
properties: attrs
|
||||||
|
|
|
@ -1,88 +0,0 @@
|
||||||
RootView = require 'views/core/RootView'
|
|
||||||
template = require 'templates/teachers-free-trial'
|
|
||||||
CocoCollection = require 'collections/CocoCollection'
|
|
||||||
TrialRequest = require 'models/TrialRequest'
|
|
||||||
|
|
||||||
# TODO: distinguish between this type of existing trial requests and others
|
|
||||||
|
|
||||||
module.exports = class TeachersFreeTrialView extends RootView
|
|
||||||
id: 'teachers-free-trial-view'
|
|
||||||
template: template
|
|
||||||
logoutRedirectURL: false
|
|
||||||
|
|
||||||
events:
|
|
||||||
'click .submit-button': 'onClickSubmit'
|
|
||||||
'click .input-age-other': 'onClickTextBox'
|
|
||||||
|
|
||||||
constructor: (options) ->
|
|
||||||
super options
|
|
||||||
@email = me.get('email')
|
|
||||||
@refreshData()
|
|
||||||
|
|
||||||
refreshData: ->
|
|
||||||
@fetchingData = true
|
|
||||||
@existingRequests = new CocoCollection([], { url: '/db/trial.request/-/own', model: TrialRequest, comparator: '_id' })
|
|
||||||
@listenToOnce @existingRequests, 'sync', =>
|
|
||||||
@fetchingData = false
|
|
||||||
@render?()
|
|
||||||
existingRequest = @existingRequests.at(0)
|
|
||||||
if existingRequest?.get('status') isnt 'submitted' and existingRequest?.get('status') isnt 'approved'
|
|
||||||
window.tracker?.trackEvent 'View Trial Request', category: 'Teachers', label: 'View Trial Request', ['Mixpanel']
|
|
||||||
@supermodel.loadCollection(@existingRequests, 'own_trial_requests', {cache: false})
|
|
||||||
|
|
||||||
onClickTextBox: (e) ->
|
|
||||||
$('.radio-other').prop("checked", true)
|
|
||||||
|
|
||||||
onClickSubmit: (e) ->
|
|
||||||
school = $('.input-school').val()
|
|
||||||
location = $('.input-location').val()
|
|
||||||
age = $('input[name=age]:checked').val()
|
|
||||||
age = $('.input-age-other').val() if age is 'other'
|
|
||||||
numStudents = $('.input-num-students').val()
|
|
||||||
heardAbout = $('.input-heard-about').val()
|
|
||||||
|
|
||||||
# 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')
|
|
||||||
$('.container-heard-about').removeClass('has-error')
|
|
||||||
$('.error-message').hide()
|
|
||||||
unless school
|
|
||||||
$('.container-school').addClass('has-error')
|
|
||||||
$('.error-message').show()
|
|
||||||
return
|
|
||||||
unless location
|
|
||||||
$('.container-location').addClass('has-error')
|
|
||||||
$('.error-message').show()
|
|
||||||
return
|
|
||||||
unless age
|
|
||||||
$('.container-age').addClass('has-error')
|
|
||||||
$('.error-message').show()
|
|
||||||
return
|
|
||||||
unless numStudents
|
|
||||||
$('.container-num-students').addClass('has-error')
|
|
||||||
$('.error-message').show()
|
|
||||||
return
|
|
||||||
unless heardAbout
|
|
||||||
$('.container-heard-about').addClass('has-error')
|
|
||||||
$('.error-message').show()
|
|
||||||
return
|
|
||||||
|
|
||||||
# Save trial request
|
|
||||||
trialRequest = new TrialRequest
|
|
||||||
type: 'course'
|
|
||||||
properties:
|
|
||||||
email: @email
|
|
||||||
school: school
|
|
||||||
location: location
|
|
||||||
age: age
|
|
||||||
numStudents: numStudents
|
|
||||||
heardAbout: heardAbout
|
|
||||||
trialRequest.save {},
|
|
||||||
error: (model, response, options) =>
|
|
||||||
console.error 'Error saving trial request', response
|
|
||||||
success: (model, response, options) =>
|
|
||||||
@refreshData()
|
|
||||||
window.tracker?.trackEvent 'Submit Trial Request', category: 'Teachers', label: 'Trial Request', ['Mixpanel']
|
|
Loading…
Reference in a new issue