diff --git a/apps/src/code-studio/pd/application/teacher2021/Section1AboutYou.jsx b/apps/src/code-studio/pd/application/teacher2021/AboutYou.jsx similarity index 97% rename from apps/src/code-studio/pd/application/teacher2021/Section1AboutYou.jsx rename to apps/src/code-studio/pd/application/teacher2021/AboutYou.jsx index 8ed10500be564..686e10fa0fde9 100644 --- a/apps/src/code-studio/pd/application/teacher2021/Section1AboutYou.jsx +++ b/apps/src/code-studio/pd/application/teacher2021/AboutYou.jsx @@ -30,20 +30,20 @@ const CS_TEACHERS_URL = 'https://code.org/educate/community'; const INTERNATIONAL = 'Other country'; const US = 'United States'; -export default class Section1AboutYou extends LabeledFormComponent { +export default class AboutYou extends LabeledFormComponent { static propTypes = { ...LabeledFormComponent.propTypes, accountEmail: PropTypes.string.isRequired }; - static labels = PageLabels.section1AboutYou; + static labels = PageLabels.aboutYou; static associatedFields = [ // Gender Identity and Race are things we want rendered in Section 1 in the detail view // but we want to ask in section 5. So they need to be removed here. // Also remove a whole mess of fields (from school to principal to role) which we have // moved to Section 3, and therefore don't want to validate here in Section 1. - ..._.difference(Object.keys(PageLabels.section1AboutYou), [ + ..._.difference(Object.keys(PageLabels.aboutYou), [ 'genderIdentity', 'race', 'school', @@ -178,7 +178,7 @@ export default class Section1AboutYou extends LabeledFormComponent { .

-

Section 1: {SectionHeaders.section1AboutYou}

+

Section 1: {SectionHeaders.aboutYou}

{this.radioButtonsFor('country')} diff --git a/apps/src/code-studio/pd/application/teacher2021/Section5AdditionalDemographicInformation.jsx b/apps/src/code-studio/pd/application/teacher2021/AdditionalDemographicInformation.jsx similarity index 82% rename from apps/src/code-studio/pd/application/teacher2021/Section5AdditionalDemographicInformation.jsx rename to apps/src/code-studio/pd/application/teacher2021/AdditionalDemographicInformation.jsx index 9c69482452e90..3f436d9ba3890 100644 --- a/apps/src/code-studio/pd/application/teacher2021/Section5AdditionalDemographicInformation.jsx +++ b/apps/src/code-studio/pd/application/teacher2021/AdditionalDemographicInformation.jsx @@ -9,11 +9,11 @@ import {FormGroup} from 'react-bootstrap'; import PrivacyDialog from '../PrivacyDialog'; import {PrivacyDialogMode} from '../../constants'; -export default class Section5AdditionalDemographicInformation extends LabeledFormComponent { - static labels = PageLabels.section5AdditionalDemographicInformation; +export default class AdditionalDemographicInformation extends LabeledFormComponent { + static labels = PageLabels.additionalDemographicInformation; static associatedFields = [ - ...Object.keys(PageLabels.section5AdditionalDemographicInformation) + ...Object.keys(PageLabels.additionalDemographicInformation) ]; state = { @@ -34,9 +34,7 @@ export default class Section5AdditionalDemographicInformation extends LabeledFor render() { return ( -

- Section 5: {SectionHeaders.section5AdditionalDemographicInformation} -

+

Section 5: {SectionHeaders.additionalDemographicInformation}

{this.radioButtonsFor('genderIdentity')} {this.checkBoxesFor('race')} {this.checkBoxesWithAdditionalTextFieldsFor( diff --git a/apps/src/code-studio/pd/application/teacher2021/Section2ChooseYourProgram.jsx b/apps/src/code-studio/pd/application/teacher2021/ChooseYourProgram.jsx similarity index 92% rename from apps/src/code-studio/pd/application/teacher2021/Section2ChooseYourProgram.jsx rename to apps/src/code-studio/pd/application/teacher2021/ChooseYourProgram.jsx index 685b8fe8f402e..31d939ddc26d3 100644 --- a/apps/src/code-studio/pd/application/teacher2021/Section2ChooseYourProgram.jsx +++ b/apps/src/code-studio/pd/application/teacher2021/ChooseYourProgram.jsx @@ -8,12 +8,10 @@ import { import {FormGroup, Row, Col} from 'react-bootstrap'; import {PROGRAM_CSD, PROGRAM_CSP} from './TeacherApplicationConstants'; -export default class Section2ChooseYourProgram extends LabeledFormComponent { - static labels = PageLabels.section2ChooseYourProgram; +export default class ChooseYourProgram extends LabeledFormComponent { + static labels = PageLabels.chooseYourProgram; - static associatedFields = [ - ...Object.keys(PageLabels.section2ChooseYourProgram) - ]; + static associatedFields = [...Object.keys(PageLabels.chooseYourProgram)]; getNameForSelectedProgram() { if (this.props.data.program === PROGRAM_CSD) { @@ -62,7 +60,7 @@ export default class Section2ChooseYourProgram extends LabeledFormComponent { return ( -

Section 3: {SectionHeaders.section2ChooseYourProgram}

+

Section 3: {SectionHeaders.chooseYourProgram}

{this.radioButtonsFor('program')} {this.props.data.program === PROGRAM_CSD && this.checkBoxesFor('csdWhichGrades')} @@ -93,7 +91,7 @@ export default class Section2ChooseYourProgram extends LabeledFormComponent { style: { width: '100px' }, - label: PageLabels.section2ChooseYourProgram.csHowManyMinutes.replace( + label: PageLabels.chooseYourProgram.csHowManyMinutes.replace( 'program', this.getNameForSelectedProgram() ), @@ -105,7 +103,7 @@ export default class Section2ChooseYourProgram extends LabeledFormComponent { style: { width: '100px' }, - label: PageLabels.section2ChooseYourProgram.csHowManyDaysPerWeek.replace( + label: PageLabels.chooseYourProgram.csHowManyDaysPerWeek.replace( 'program', this.getNameForSelectedProgram() ), @@ -117,7 +115,7 @@ export default class Section2ChooseYourProgram extends LabeledFormComponent { style: { width: '100px' }, - label: PageLabels.section2ChooseYourProgram.csHowManyWeeksPerYear.replace( + label: PageLabels.chooseYourProgram.csHowManyWeeksPerYear.replace( 'program', this.getNameForSelectedProgram() ), diff --git a/apps/src/code-studio/pd/application/teacher2021/Section4ProfessionalLearningProgramRequirements.jsx b/apps/src/code-studio/pd/application/teacher2021/ProfessionalLearningProgramRequirements.jsx similarity index 97% rename from apps/src/code-studio/pd/application/teacher2021/Section4ProfessionalLearningProgramRequirements.jsx rename to apps/src/code-studio/pd/application/teacher2021/ProfessionalLearningProgramRequirements.jsx index 1b0c81b38c009..083830332a6a0 100644 --- a/apps/src/code-studio/pd/application/teacher2021/Section4ProfessionalLearningProgramRequirements.jsx +++ b/apps/src/code-studio/pd/application/teacher2021/ProfessionalLearningProgramRequirements.jsx @@ -25,11 +25,11 @@ const styles = { } }; -export default class Section4SummerWorkshop extends LabeledFormComponent { - static labels = PageLabels.section4ProfessionalLearningProgramRequirements; +export default class SummerWorkshop extends LabeledFormComponent { + static labels = PageLabels.professionalLearningProgramRequirements; static associatedFields = [ - ...Object.keys(PageLabels.section4ProfessionalLearningProgramRequirements), + ...Object.keys(PageLabels.professionalLearningProgramRequirements), 'regionalPartnerId', 'regionalPartnerGroup', 'regionalPartnerWorkshopIds' @@ -342,8 +342,7 @@ export default class Section4SummerWorkshop extends LabeledFormComponent { return (

- Section 4:{' '} - {SectionHeaders.section4ProfessionalLearningProgramRequirements} + Section 4: {SectionHeaders.professionalLearningProgramRequirements}

diff --git a/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx b/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx index 07b3914d4ac3d..3f917a616a208 100644 --- a/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx +++ b/apps/src/code-studio/pd/application/teacher2021/Teacher2021Application.jsx @@ -1,11 +1,11 @@ import React from 'react'; import PropTypes from 'prop-types'; import FormController from '../../form_components/FormController'; -import Section1AboutYou from './Section1AboutYou'; -import Section2ChooseYourProgram from './Section2ChooseYourProgram'; -import Section3TeachingBackground from './Section3TeachingBackground'; -import Section4ProfessionalLearningProgramRequirements from './Section4ProfessionalLearningProgramRequirements'; -import Section5AdditionalDemographicInformation from './Section5AdditionalDemographicInformation'; +import AboutYou from './AboutYou'; +import TeachingBackground from './TeachingBackground'; +import ChooseYourProgram from './ChooseYourProgram'; +import ProfessionalLearningProgramRequirements from './ProfessionalLearningProgramRequirements'; +import AdditionalDemographicInformation from './AdditionalDemographicInformation'; import firehoseClient from '@cdo/apps/lib/util/firehose'; import queryString from 'query-string'; /* global ga */ @@ -62,11 +62,11 @@ export default class Teacher2021Application extends FormController { */ getPageComponents() { return [ - Section1AboutYou, - Section3TeachingBackground, - Section2ChooseYourProgram, - Section4ProfessionalLearningProgramRequirements, - Section5AdditionalDemographicInformation + AboutYou, + TeachingBackground, + ChooseYourProgram, + ProfessionalLearningProgramRequirements, + AdditionalDemographicInformation ]; } diff --git a/apps/src/code-studio/pd/application/teacher2021/Section3TeachingBackground.jsx b/apps/src/code-studio/pd/application/teacher2021/TeachingBackground.jsx similarity index 93% rename from apps/src/code-studio/pd/application/teacher2021/Section3TeachingBackground.jsx rename to apps/src/code-studio/pd/application/teacher2021/TeachingBackground.jsx index 5b37edaf64151..f8329490da961 100644 --- a/apps/src/code-studio/pd/application/teacher2021/Section3TeachingBackground.jsx +++ b/apps/src/code-studio/pd/application/teacher2021/TeachingBackground.jsx @@ -11,14 +11,14 @@ import SchoolAutocompleteDropdown from '@cdo/apps/templates/SchoolAutocompleteDr import {isEmail} from '@cdo/apps/util/formatValidation'; import {styles} from './TeacherApplicationConstants'; -export default class Section3TeachingBackground extends LabeledFormComponent { +export default class TeachingBackground extends LabeledFormComponent { static labels = { - ...PageLabels.section3TeachingBackground, - ...PageLabels.section1AboutYou + ...PageLabels.teachingBackground, + ...PageLabels.aboutYou }; static associatedFields = [ - ...Object.keys(PageLabels.section3TeachingBackground), + ...Object.keys(PageLabels.teachingBackground), 'school', 'schoolName', 'schoolDistrictName', @@ -47,7 +47,7 @@ export default class Section3TeachingBackground extends LabeledFormComponent { render() { return ( -

Section 2: {SectionHeaders.section3TeachingBackground}

+

Section 2: {SectionHeaders.teachingBackground}

Please provide your school and principal information below:

diff --git a/lib/cdo/shared_constants/pd/teacher1920_application_constants.rb b/lib/cdo/shared_constants/pd/teacher1920_application_constants.rb index dbc84fee72360..1be837b3dd95a 100644 --- a/lib/cdo/shared_constants/pd/teacher1920_application_constants.rb +++ b/lib/cdo/shared_constants/pd/teacher1920_application_constants.rb @@ -9,8 +9,8 @@ def self.clean_multiline(string) SECTION_HEADERS = { section_1_about_you: 'About You', - section_2_choose_your_program: 'Choose Your Program', - section_3_teaching_background: 'Teaching Background', + section_2_teaching_background: 'Teaching Background', + section_3_choose_your_program: 'Choose Your Program', section_4_professional_learning_program_requirements: 'Professional Learning Program Requirements', section_5_additional_demographic_information: 'Additional Demographic Information and submission', school_stats_and_principal_approval_section: 'Principal Approval and School Information' @@ -49,7 +49,15 @@ def self.clean_multiline(string) how_heard: 'How did you hear about this program?' } ), - section_2_choose_your_program: { + section_2_teaching_background: + {subjects_teaching: BASE_PAGE_LABELS[:section_2_your_school][:subjects_teaching].gsub('17-18', '18-19')}.merge( + BASE_PAGE_LABELS[:section_2_your_school].slice( + :taught_in_past, + :cs_opportunities_at_school, + :previous_yearlong_cdo_pd + ) + ), + section_3_choose_your_program: { program: clean_multiline( 'Which professional learning program would you like to join for the 2019-20 school year? Note: this application is only for Computer Science Discoveries and @@ -84,14 +92,6 @@ def self.clean_multiline(string) replace_existing: 'Will this course replace an existing computer science course in the master schedule? If yes, please list the course(s) that will be replaced.', replace_which_course: 'If yes, please describe the course it will be replacing and why:' }, - section_3_teaching_background: - {subjects_teaching: BASE_PAGE_LABELS[:section_2_your_school][:subjects_teaching].gsub('17-18', '18-19')}.merge( - BASE_PAGE_LABELS[:section_2_your_school].slice( - :taught_in_past, - :cs_opportunities_at_school, - :previous_yearlong_cdo_pd - ) - ), section_4_professional_learning_program_requirements: { committed: BASE_PAGE_LABELS[:section_4_summer_workshop][:committed], diff --git a/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb b/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb index d3732c5543f5a..f9ae35d34757a 100644 --- a/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb +++ b/lib/cdo/shared_constants/pd/teacher2021_application_constants.rb @@ -8,16 +8,16 @@ def self.clean_multiline(string) end SECTION_HEADERS = { - section_1_about_you: 'About You', - section_2_choose_your_program: 'Choose Your Program', - section_3_teaching_background: 'Teaching Background', - section_4_professional_learning_program_requirements: 'Professional Learning Program Requirements', - section_5_additional_demographic_information: 'Additional Demographic Information and submission', + about_you: 'About You', + teaching_background: 'Teaching Background', + choose_your_program: 'Choose Your Program', + professional_learning_program_requirements: 'Professional Learning Program Requirements', + additional_demographic_information: 'Additional Demographic Information and submission', school_stats_and_principal_approval_section: 'Principal Approval and School Information' } PAGE_LABELS = { - section_1_about_you: BASE_PAGE_LABELS[:section_1_about_you].slice( + about_you: BASE_PAGE_LABELS[:section_1_about_you].slice( :country, :first_name, :last_name, @@ -49,7 +49,11 @@ def self.clean_multiline(string) how_heard: 'How did you hear about this program?' } ), - section_2_choose_your_program: { + teaching_background: + BASE_PAGE_LABELS[:section_2_your_school].slice( + :previous_yearlong_cdo_pd + ), + choose_your_program: { program: clean_multiline( 'Which professional learning program would you like to join for the 2020-21 school year? Note: this application is only for Computer Science Discoveries and @@ -85,11 +89,7 @@ def self.clean_multiline(string) replace_existing: 'Will this course replace an existing computer science course in the master schedule? If yes, please list the course(s) that will be replaced.', replace_which_course: 'Which existing course or curriculum will it replace? Mark all that apply.' }, - section_3_teaching_background: - BASE_PAGE_LABELS[:section_2_your_school].slice( - :previous_yearlong_cdo_pd - ), - section_4_professional_learning_program_requirements: + professional_learning_program_requirements: { committed: BASE_PAGE_LABELS[:section_4_summer_workshop][:committed], able_to_attend_multiple: 'Your Regional Partner is hosting local summer workshop(s) at the following dates and locations. Please indicate which workshops you are able to attend. Select all that apply.', @@ -100,7 +100,7 @@ def self.clean_multiline(string) understand_fee: "By checking this box, you indicate that you understand there may be a fee for the professional learning program you attend.", scholarship_reasons: "Please provide any additional information you'd like to share about why your application should be considered for a scholarship." }, - section_5_additional_demographic_information: + additional_demographic_information: { gender_identity: 'Gender identity:', race: 'Race or ethnicity:', @@ -150,7 +150,7 @@ def self.clean_multiline(string) notes_5: "Notes 5", alternate_email: "Alternate email", school_type: "School type", - district_name: PAGE_LABELS[:section_1_about_you][:school_district_name], + district_name: PAGE_LABELS[:about_you][:school_district_name], school_city: "School city", school_state: "School state", school_zip_code: "School zip code", @@ -164,18 +164,18 @@ def self.clean_multiline(string) previous_yearlong_cdo_pd: "Have you participated in previous yearlong Code.org Professional Learning Programs?", able_to_attend_multiple: "Please indicate which workshops you are able to attend.", willing_to_travel: "How far would you be willing to travel to academic year workshops?", - how_heard: PAGE_LABELS[:section_5_additional_demographic_information][:how_heard] + " (Teacher's response)", + how_heard: PAGE_LABELS[:additional_demographic_information][:how_heard] + " (Teacher's response)", gender_identity: "Teacher's gender identity", race: "Teacher's race", principal_approval_url: "Principal Approval Form URL" }, principal: { - title: PAGE_LABELS[:section_1_about_you][:principal_title] + " (provided by principal)", - first_name: PAGE_LABELS[:section_1_about_you][:principal_first_name] + " (provided by principal)", - last_name: PAGE_LABELS[:section_1_about_you][:principal_last_name] + " (provided by principal)", - email: PAGE_LABELS[:section_1_about_you][:principal_email] + " (provided by principal)", - school_name: PAGE_LABELS[:section_1_about_you][:school_name] + " (provided by principal)", - district_name: PAGE_LABELS[:section_1_about_you][:school_district_name] + " (provided by principal)", + title: PAGE_LABELS[:about_you][:principal_title] + " (provided by principal)", + first_name: PAGE_LABELS[:about_you][:principal_first_name] + " (provided by principal)", + last_name: PAGE_LABELS[:about_you][:principal_last_name] + " (provided by principal)", + email: PAGE_LABELS[:about_you][:principal_email] + " (provided by principal)", + school_name: PAGE_LABELS[:about_you][:school_name] + " (provided by principal)", + district_name: PAGE_LABELS[:about_you][:school_district_name] + " (provided by principal)", do_you_approve: "Do you approve of this teacher participating in Code.org's 2020-21 Professional Learning Program?", plan_to_teach: "Is this teacher planning to teach this course in the 2020-21 school year?", total_student_enrollment: "Total student enrollment",