class IOIEHealthSafetySecurityDocument(Interface):
    mode(title='hidden')
    title = schema.TextLine(
        title=_(u'Title'),
        required=False,
        default=_(u'will be auto-generated on save'),
    )
    file = field.NamedFile(
        title=_(u'Health, Safety, Security Document'),
        required=True,
    )
class IOIEParticipantEmailTemplate(IOIEProgramEmailTemplate):
    transition = schema.Choice(
        title=_(u'Transition Name'),
        description=_(u'Transition that it will send an email on.'),
        vocabulary=
        'uwosh.oie.studyabroadstudent.vocabularies.participant_transition',  # noqa
        required=True,
    )

    send_to_participant = schema.Bool(
        title=_(u'Send Email To Participant/Application on Transition'),
        description=
        _(u'Should the participant/applicant recieve an email when their application goes through this transition?'
          ),  # noqa
    )
Пример #3
0
class IOIECountry(Interface):

    dexteritytextindexer.searchable('timezone_url')
    timezone_url = schema.URI(
        title=_(u'Time Zone URL'),
        required=False,
    )
    dexteritytextindexer.searchable('cdc_info_url')
    cdc_info_url = schema.URI(
        title=_(u'Centers for Disease Control Country Information URL'),
        description=_(u''),
        required=False,
    )
    dexteritytextindexer.searchable('state_dept_info_url')
    state_dept_info_url = schema.URI(
        title=_(u'US State Department Country Information URL'),
        description=_(u''),
        required=False,
    )
Пример #4
0
class IOIETransition(Interface):
    mode(title='hidden')
    title = schema.TextLine(
        title=_(u'Transition Name'),
        required=False,
        default=_(u'will be auto-generated on save'),
    )

    transitionDate = schema.Date(
        title=_(u'Transition Date'),
        required=True,
    )

    dexteritytextindexer.searchable('destinationCity')
    destinationCity = schema.TextLine(
        title=_(u'Destination City'),
        required=True,
    )

    dexteritytextindexer.searchable('destinationCountry')
    destinationCountry = schema.Choice(
        title=_(u'Destination Country'),
        required=True,
        source=RegistryValueVocabulary('oiestudyabroadstudent.countries'),
    )

    transitionType = schema.Choice(
        title=_(u'Transition Type'),
        required=True,
        source=RegistryValueVocabulary(
            'oiestudyabroadstudent.transition_type',
        ),
    )

    accommodation = schema.Choice(
        title=_(u'Accommodation'),
        source=RegistryValueVocabulary('oiestudyabroadstudent.accommodation'),
    )

    accommodationRoomSizes = schema.List(
        title=_(u'Room Size(s)'),
        value_type=schema.Choice(
            source=RegistryValueVocabulary(
                'oiestudyabroadstudent.room_size',
            ),
        ),
    )
Пример #5
0
class IOIEAirline(Interface):

    dexteritytextindexer.searchable('luggage_general')
    luggage_general = schema.URI(
        title=_(u'General luggage'),
        description=_(u'website address (URL)'),
        required=False,
    )

    dexteritytextindexer.searchable('luggage_carryon')
    luggage_carryon = schema.URI(
        title=_(u'Carry on luggage'),
        description=_(u'website address (URL)'),
        required=False,
    )

    dexteritytextindexer.searchable('luggage_checked')
    luggage_checked = schema.URI(
        title=_(u'Checked luggage'),
        description=_(u'website address (URL)'),
        required=False,
    )
class IOIEStudyAbroadParticipant(Interface):
    dexteritytextindexer.searchable('title')
    omitted('title')
    title = schema.TextLine(
        title=_(u'Title'),
        required=False,
        readonly=True,
        default=_(u'will be auto-generated'),
    )

    #######################################################
    model.fieldset(
        'participant_name',
        label=_(u'Name'),
        fields=[
            'firstName',
            'middleName',
            'lastName',
        ],
    )

    dexteritytextindexer.searchable('firstName')
    firstName = schema.TextLine(
        title=_(u'First Name'),
        required=True,
    )

    dexteritytextindexer.searchable('middleName')
    middleName = schema.TextLine(
        title=_(u'Middle Name'),
        required=False,
    )

    dexteritytextindexer.searchable('lastName')
    lastName = schema.TextLine(
        title=_(u'Last Name'),
        required=True,
    )

    #######################################################
    model.fieldset(
        'progress',
        label=_(u'Progress'),
        fields=[
            'seatNumber',
            'waitlistNumber',
        ],
    )

    seatNumber = schema.TextLine(
        title=_(u'Seat Number'),
        description=_(u'auto generate using STEP II date/time stamp and min/max participant fields from "program development" workflow'), # noqa : E501
        #  TODO (BD) - verify this functionality  # noqa : T000
        # required=False,
    )

    waitlistNumber = schema.TextLine(
        title=_(u'Waitlist Number'),
        description=_(u'auto generate using STEP II date/time stamp and min/max participant fields from "program development" workflow'), # noqa : E501
        #  TODO (BD) - verify this functionality  # noqa : T000
        # required=False,
    )

    #######################################################
    model.fieldset(
        'interest',
        label=_(u'Express Interest'),
        fields=[
            'email',
            'programName',
            'programName2',
            'programName3',
        ],
    )

    dexteritytextindexer.searchable('email')
    email = schema.TextLine(
        title=_(u'Email Address'),
        description=_(
            u'UW Oshkosh students must use a @uwosh.edu email address.  Acceptable email addresses for other applicants include school and company addresses.'),  # noqa : E501
        constraint=validate_email,
        # TODO - write test_validate_email  # noqa : T000
        required=True,
    )

    dexteritytextindexer.searchable('programName')
    programName = schema.Choice(
        title=_(u'Program Name (first choice)'),
        description=_(u'The courses listed for this program choice will appear in your Courses tab; you must indicate there which courses you wish to enroll in.'),  # noqa : E501
        vocabulary='uwosh.oie.studyabroadstudent.vocabularies.newprograms',
        required=True,
    )

    dexteritytextindexer.searchable('programName2')
    programName2 = schema.Choice(
        title=_(u'Program Name (second choice)'),
        vocabulary='uwosh.oie.studyabroadstudent.vocabularies.newprograms',
        required=False,
    )

    dexteritytextindexer.searchable('programName3')
    programName3 = schema.Choice(
        title=_(u'Program Name (third choice)'),
        vocabulary='uwosh.oie.studyabroadstudent.vocabularies.newprograms',
        required=False,
    )

    #######################################################
    model.fieldset(
        'step1',
        label=_(u'Step 1'),
        fields=['studentID'],
    )

    dexteritytextindexer.searchable('studentID')
    studentID = schema.TextLine(
        title=_(u'UW Oshkosh Student ID'),
        description=_(u'Do not include the initial "W" in the UW Oshkosh ID.  If you do not have a UW Oshkosh ID (current or past), leave this blank.'),  # noqa : E501
        required=False,
        constraint=validate_student_id,
        # TODO - write test_validate_student_id  # noqa : T000
    )

    #######################################################
    model.fieldset(
        'contact',
        label=_(u'Step1: Contact Information'),
        fields=[
            'mainPhone',
            'otherPhone',
            'otherContactService',
            'otherContactID',
            'localAddr',
            'localAddrApt',
            'localCity',
            'localState',
            'localZip',
            'homeAddr1',
            'homeAddrApt',
            'homeCity',
            'homeState',
            'homeZip',
            'homeCountry',
        ],
    )

    mainPhone = schema.TextLine(
        title=_(u'Main phone'),
        description=_(u'Include area code (and country code if the phone does not have a U.S. phone number).'),  # noqa : E501
        required=True,
    )

    otherPhone = schema.TextLine(
        title=_(u'Other phone'),
        description=_(u'Include area code (and country code if the phone does not have a U.S. phone number).'),  # noqa : E501
        required=False,
    )

    widget(
        'otherContactService',
        onchange=u'javascript:otherContactServiceChanged(event)',
    )
    otherContactService = schema.Choice(
        title=_(u'Other Contact Service'),
        description=_(
            u'Select the service you use most often, '
            "or select 'No value' if you don't use any of these services.",
        ),
        required=False,
        vocabulary=socialmediaservice,
    )

    otherContactID = schema.TextLine(
        title=_(u'Other contact service username or ID'),
        description=_(u'Enter your username or ID for the service you chose above.'),  # noqa : E501
        required=False,
    )

    localAddr = schema.TextLine(
        title=_(u'Local Address: Street'),
        required=True,
    )

    localAddrApt = schema.TextLine(
        title=_(u'Local Address: Apartment Number'),
        required=False,
    )

    localCity = schema.TextLine(
        title=_(u'Local Address: City'),
        required=True,
    )

    localState = schema.TextLine(
        title=_(u'Local Address: State'),
        default=_(u'WI'),
        required=True,
    )

    localZip = schema.TextLine(
        title=_(u'Local Address: Zip Code'),
        default=_(u'54901'),
        required=True,
    )

    homeAddr1 = schema.TextLine(
        title=_(u'Home Address: Street'),
        required=True,
    )

    homeAddrApt = schema.TextLine(
        title=_(u'Home Address: Apartment Number'),
        required=False,
    )

    homeCity = schema.TextLine(
        title=_(u'Home Address: City'),
        description=_(u''),
        required=True,
    )

    homeState = schema.TextLine(
        title=_(u'Home Address: State/Province/Department'),
        description=_(u''),
        required=True,
    )

    homeZip = schema.TextLine(
        title=_(u'Home Address: Zip or Postal Code'),
        description=_(u''),
        required=True,
    )

    homeCountry = schema.Choice(
        title=_(u'Home Address: Country'),
        source=RegistryValueVocabulary('oiestudyabroadstudent.countries'),
        required=True,
    )

    #######################################################
    model.fieldset(
        'emergency_contact',
        label=_(u'Emergency Contact'),
        fields=[
            'emerg1fullname',
            'emerg1relationship',
            'emerg1mail_personal',
            'emerg1mail_work',
            'emerg1phone_main',
            'emerg1phone_other',
            'emerg2fullname',
            'emerg2relationship',
            'emerg2mail_personal',
            'emerg2mail_work',
            'emerg2phone_main',
            'emerg2phone_other',
            'emerg3fullname',
            'emerg3relationship',
            'emerg3mail_personal',
            'emerg3mail_work',
            'emerg3phone_main',
            'emerg3phone_other',
            'emerg4fullname',
            'emerg4relationship',
            'emerg4mail_personal',
            'emerg4mail_work',
            'emerg4phone_main',
            'emerg4phone_other',
        ],
    )

    widget(
        'emerg1fullname',
        onchange=u'javascript:emergencyFullNameChanged(event)',
    )
    emerg1fullname = schema.TextLine(
        title=_(u'1 Full Name'),
        required=False,
    )

    emerg1relationship = schema.Choice(
        title=_(u'1 Relationship to You'),
        required=False,
        vocabulary=contactrelationship,
    )

    emerg1mail_personal = schema.TextLine(
        title=_(u'1 Main Email'),
        description=_(u'Strongly recommended.  By typing in an email address here, you permit the UWO OIE to send non-emergency messages intended to update contacts about significant unanticipated events that have occurred or may occur and which have involved or may involve an increase in program risk.'),  # noqa : E501
        required=False,
        # write_permission="UWOshOIE: Modify revisable fields",
    )

    emerg1mail_work = schema.TextLine(
        title=_(u'1 Other Email'),
        description=_(u'Strongly recommended.  By typing in an email address here, you permit the UWO OIE to send non-emergency messages intended to update contacts about significant unanticipated events that have occurred or may occur and which have involved or may involve an increase in program risk.'),  # noqa : E501
        required=False,
        # write_permission="UWOshOIE: Modify revisable fields",
    )

    emerg1phone_main = schema.TextLine(
        title=_(u'1 Main Phone'),
        description=_(u'Strongly recommended.  Include area code (and country code if the phone does not have a U.S. phone number).'),  # noqa : E501
        required=False,
    )

    emerg1phone_other = schema.TextLine(
        title=_(u'1 Other Phone'),
        description=_(u'Include area code (and country code if the phone does not have a U.S. phone number).'),  # noqa : E501
        required=False,
    )

    ###############

    widget('emerg2fullname', onchange=u'javascript:fullNameChanged(event)')
    emerg2fullname = schema.TextLine(
        title=_(u'2 Full Name'),
        required=False,
    )

    emerg2relationship = schema.Choice(
        title=_(u'2 Relationship to You'),
        required=False,
        vocabulary=contactrelationship,
    )

    emerg2mail_personal = schema.TextLine(
        title=_(u'2 Main Email'),
        description=_(u'Strongly recommended.  By typing in an email address here, you permit the UWO OIE to send non-emergency messages intended to update contacts about significant unanticipated events that have occurred or may occur and which have involved or may involve an increase in program risk.'),  # noqa : E501
        required=False,
        # write_permission="UWOshOIE: Modify revisable fields",
    )

    emerg2mail_work = schema.TextLine(
        title=_(u'2 Other Email'),
        description=_(u'Strongly recommended.  By typing in an email address here, you permit the UWO OIE to send non-emergency messages intended to update contacts about significant unanticipated events that have occurred or may occur and which have involved or may involve an increase in program risk.'),  # noqa : E501
        required=False,
        # write_permission="UWOshOIE: Modify revisable fields",
    )

    emerg2phone_main = schema.TextLine(
        title=_(u'2 Main Phone'),
        description=_(u'Strongly recommended.  Include area code (and country code if the phone does not have a U.S. phone number).'),  # noqa : E501
        required=False,
    )

    emerg2phone_other = schema.TextLine(
        title=_(u'2 Other Phone'),
        description=_(u'Include area code (and country code if the phone does not have a U.S. phone number).'),  # noqa : E501
        required=False,
    )

    #############

    widget('emerg3fullname', onchange=u'javascript:fullNameChanged(event)')
    emerg3fullname = schema.TextLine(
        title=_(u'3 Full Name'),
        required=False,
    )

    emerg3relationship = schema.Choice(
        title=_(u'3 Relationship to You'),
        required=False,
        vocabulary=contactrelationship,
    )

    emerg3mail_personal = schema.TextLine(
        title=_(u'3 Main Email'),
        description=_(u'Strongly recommended.  By typing in an email address here, you permit the UWO OIE to send non-emergency messages intended to update contacts about significant unanticipated events that have occurred or may occur and which have involved or may involve an increase in program risk.'),  # noqa : E501
        required=False,
        # write_permission="UWOshOIE: Modify revisable fields",
    )

    emerg3mail_work = schema.TextLine(
        title=_(u'3 Other Email'),
        description=_(u'Strongly recommended.  By typing in an email address here, you permit the UWO OIE to send non-emergency messages intended to update contacts about significant unanticipated events that have occurred or may occur and which have involved or may involve an increase in program risk.'),  # noqa : E501
        required=False,
        # write_permission="UWOshOIE: Modify revisable fields",
    )

    emerg3phone_main = schema.TextLine(
        title=_(u'3 Main Phone'),
        description=_(u'Strongly recommended.  Include area code (and country code if the phone does not have a U.S. phone number).'),  # noqa : E501
        required=False,
    )

    emerg3phone_other = schema.TextLine(
        title=_(u'3 Other Phone'),
        description=_(u'Include area code (and country code if the phone does not have a U.S. phone number).'),  # noqa : E501
        required=False,
    )

    #############

    widget('emerg4fullname', onchange=u'javascript:fullNameChanged(event)')
    emerg4fullname = schema.TextLine(
        title=_(u'4 Full Name'),
        required=False,
    )

    emerg4relationship = schema.Choice(
        title=_(u'4 Relationship to You'),
        required=False,
        vocabulary=contactrelationship,
    )

    emerg4mail_personal = schema.TextLine(
        title=_(u'4 Main Email'),
        description=_(u'Strongly recommended.  By typing in an email address here, you permit the UWO OIE to send non-emergency messages intended to update contacts about significant unanticipated events that have occurred or may occur and which have involved or may involve an increase in program risk.'),  # noqa : E501
        required=False,
        # write_permission="UWOshOIE: Modify revisable fields",
    )

    emerg4mail_work = schema.TextLine(
        title=_(u'4 Other Email'),
        description=_(u'Strongly recommended.  By typing in an email address here, you permit the UWO OIE to send non-emergency messages intended to update contacts about significant unanticipated events that have occurred or may occur and which have involved or may involve an increase in program risk.'),  # noqa : E501
        required=False,
        # write_permission="UWOshOIE: Modify revisable fields",
    )

    emerg4phone_main = schema.TextLine(
        title=_(u'4 Main Phone'),
        description=_(u'Strongly recommended.  Include area code (and country code if the phone does not have a U.S. phone number).'),  # noqa : E501
        required=False,
    )

    emerg4phone_other = schema.TextLine(
        title=_(u'4 Other Phone'),
        description=_(u'Include area code (and country code if the phone does not have a U.S. phone number).'),  # noqa : E501
        required=False,
    )

    #######################################################
    model.fieldset(
        'demographics',
        label=_(u'Demographics'),
        fields=[
            'ethnicity',
            'ethnicityOther',
            'stateResidency',
            'countrycitizenship',
            'immigrationStatus',
            'countryBirth',
            'dateOfBirth',
        ],
    )

    ethnicity = schema.Choice(
        title=_(u'Ethnicity'),
        description=_(u''),
        source=RegistryValueVocabulary('oiestudyabroadstudent.ethnicities'),
        required=False,
    )

    ethnicityOther = schema.TextLine(
        title=_(u'Ethnicity: Other'),
        description=_(u'Enter your ethnicity only if you selected "other" above.'),  # noqa : E501
        required=False,
    )

    stateResidency = schema.Choice(
        title=_(u'State of Residency'),
        description=_(u''),
        source=RegistryValueVocabulary(
            'oiestudyabroadstudent.us_states_territories',
        ),
        required=True,
    )

    countrycitizenship = schema.Choice(
        title=_(u'Country of Citizenship'),
        source=RegistryValueVocabulary('oiestudyabroadstudent.countries'),
        required=True,
    )

    immigrationStatus = schema.Choice(
        title=_(u'Immigration Status'),
        source=RegistryValueVocabulary(
            'oiestudyabroadstudent.immigration_status',
        ),
        required=True,
    )

    countryBirth = schema.Choice(
        title=_(u'Country of Birth'),
        source=RegistryValueVocabulary('oiestudyabroadstudent.countries'),
        required=True,
    )

    dateOfBirth = schema.Date(
        title=_(u'Date of Birth'),
        required=True,
    )

########################################################
    model.fieldset(
        'education',
        label=_(u'Education'),
        fields=[
            'educationLevel',
            'universityEnrolledUWO',
            'universityEnrolledOther',
            'major1',
            'major2',
            'minor1',
            'minor2',
            'graduationYear',
            'graduationMonth',
        ],
    )

    educationLevel = schema.Choice(
        title=_(u'Current Education Level'),
        source=RegistryValueVocabulary(
            'oiestudyabroadstudent.education_level',
        ),
        required=False,
    )

    universityEnrolledUWO = schema.Choice(
        title=_(u'Are you enrolled at UW Oshkosh?'),
        description=_(u''),
        vocabulary=yes_no_vocabulary,
        required=True,
    )

    universityEnrolledOther = schema.TextLine(
        title=_(u'If "School" is "OTHER"'),
        description=_(u'Type the official name of the school you are attending now only if you chose "No" above.'),  # noqa : E501
        required=False,
    )

    major1 = schema.Choice(
        title=_(u'First Major'),
        description=_(u'This must match the intended major on your STAR report.'),  # noqa : E501
        required=False,
        source=RegistryValueVocabulary('oiestudyabroadstudent.majors'),
    )

    major2 = schema.Choice(
        title=_(u'Second Major'),
        description=_(u'This must match the intended major on your STAR report.  If you don\'t have a second major, leave this blank.'),  # noqa : E501
        required=False,
        source=RegistryValueVocabulary('oiestudyabroadstudent.majors'),
    )

    minor1 = schema.TextLine(
        title=_(u'First Minor'),
        description=_(u'This must match the intended minor on your STAR report.  If you don\'t have a minor, leave this blank.'),  # noqa : E501
        required=False,
    )

    minor2 = schema.TextLine(
        title=_(u'Second Minor'),
        description=_(u'This must match the intended minor on your STAR report.  If you don\'t have a minor, leave this blank.'),  # noqa : E501
        required=False,
    )

    graduationYear = schema.Int(
        title=_(u'Graduation: Anticipated Year'),
        description=_(u'Enter the full 4-digit year.'),
        min=2018,
        max=2100,
        required=False,
    )

    graduationMonth = schema.Choice(
        title=_(u'Graduation: Anticipated Month'),
        description=_(u'Select the month that corresponds to your official graduation date.'),  # noqa : E501
        vocabulary=graduation_month_vocabulary,
        required=False,
    )

    #######################################################
    model.fieldset(
        'courses',
        label=_(u'Study Away Courses'),
        fields=['courses'],
    )

    courses = schema.List(
        title=_(u'Course Selection'),
        description=_(u'Request enrollment in study away courses.  Your selection must match advertised course options.'),  # noqa : E501
        value_type=schema.Choice(
            source=RegistryValueVocabulary(
                'oiestudyabroadstudent.course_subject_and_number',
            ),
        ),
    )

    #######################################################
    model.fieldset(
        'date',
        label=_(u'Dates'),
        fields=[
            'interviewDate',
            'prePostTravelClassDates',
            'orientationDeadline',
            'paymentDeadlines',
            'departureDate',
            'airportTransferDeparture',
            'departureModeOfTransportation',
            'returnDepartureDate',
            'returnModeOfTransportation',
            'airportTransferReturn',
            'requestToDeviateFromProgramDates',
                ],
    )

    interviewDate = schema.Date(
        title=_(u'Interview Date'),
        description=_(
            u'Contact the Program Liaison to schedule an interview.  Make your interview appointment and type your interview date here prior to submiting this application.  The actual interview date may or may not need to occur prior to the STEP II application deadline.  This will be determined by the Program Liaison.'),  # noqa : E501
        required=False,
    )

    prePostTravelClassDates = schema.Choice(
        title=_(u'Confirm Attendance at Pre- & Post-travel Program-specific Sessions'),  # noqa : E501
        description=_(
            u'Select ''Yes'' to confirm that you will attend all advertised pre- or post-travel sessions.  Select ''No'' if you have a conflict on one or more dates.'),  # noqa : E501
        vocabulary=yes_no_vocabulary,
        required=True,
        # TODO insert date from program object; Displays only if there are dates in "Pretravel Class & Orientation Dates" or "Post-travel Class Dates" in the MGMT PORTAL.  # noqa : E501
    )

    orientationDeadline = schema.Choice(
        title=_(u'Orientation Submission Deadline'),
        description=_(
            u'I understand that the Office of International Education deadline for submission of orientation materials is a final deadline.  I understand and agree that all Office of International Education orientation requirements must be completed by this date.  If I forsee conflicts with this date, I will complete requirements in advance of this date.  If not completed by this date, I understand and agree that the Office of International Education will begin the process of removing me from my program and that the Withdrawal & Refund Policy will apply.'),  # noqa : E501
        vocabulary=yes_no_vocabulary,
        required=True,
    )

    paymentDeadlines = schema.Choice(
        title=_(u'Payment Deadlines'),
        description=_(
            u'I understand that the payment deadlines are final deadlines and that it is my responsibility to record these dates in my calendar.  I understand that all payments must be made in full by the deadlines, or I must submit the "Notice of Financial Aid Award for Study Abroad/Away" form if making my payments using financial aid, a scholarship that I have already received, veterans benefits or an outside loan.  If not submitted by this date, I understand that the Office of International Education will begin the process of removing me from my program and that the Withdrawal & Refund Policy will apply.'),  # noqa : E501
        vocabulary=yes_no_vocabulary,
        required=True,
    )

    departureDate = schema.Date(
        title=_(u'Program Departure Date'),
        description=_(u'will appear only when "transfer provided" is selected on the "program workflow"'),  # noqa : E501
        required=False,
        # TODO insert date from program object when in transfer provided state  # noqa : E501
    )

    airportTransferDeparture = schema.Choice(
        title=_(u'Confirm Departure from Oshkosh (or alternative city)'),
        description=_(u''),
        vocabulary=departure_transfer_vocabulary,
        required=False,
        # TODO this should appear only when "transfer provided" is selected  # noqa : E501
        #  on the "program workflow"
    )

    departureModeOfTransportation = schema.Choice(
        title=_(u'Confirm Flight'),
        description=_(u''),
        vocabulary=departure_mode_transportation_vocabulary,
        required=False,
        # TODO this should appear only when "transfer provided" is selected  # noqa : E501
        #  on the "program workflow"
    )

    returnDepartureDate = schema.Date(
        title=_(u'Program Return Date'),
        description=_(u'will appear only when "transfer provided" is selected on the "program workflow"'),  # noqa : E501
        required=False,
        # TODO insert date from program object when in transfer provided state  # noqa : E501
    )

    returnModeOfTransportation = schema.Choice(
        title=_(u'Return-Mode of Transportation'),
        description=_(u'Choose one'),
        vocabulary=return_mode_transportation_vocabulary,
        required=False,
        # TODO this should appear only when "transfer provided" is selected  # noqa : E501
        #  on the "program workflow"
    )

    airportTransferReturn = schema.Choice(
        title=_(u'Confirm Return to Oshkosh (or alternative city)'),
        description=_(u''),
        vocabulary=return_transfer_vocabulary,
        required=False,
        # TODO this should appear only when "transfer provided" is selected  # noqa : E501
        #  on the "program workflow"
    )

    requestToDeviateFromProgramDates = schema.Choice(
        title=_(u'Request to Deviate from Program Dates'),
        description=_(u'Select ''Yes'' once you have printed, read, signed and uploaded this PDF'),  # noqa : E501
        vocabulary=yes_no_vocabulary,
        required=False,
        # TODO need link to the PDF document  # noqa : E501
        # currently 'https://www.uwosh.edu/oie/away/documents/deviationletter.pdf/view'  # noqa : E501
    )

    #######################################################
    model.fieldset(
        'financial_aid',
        label=_(u'Financial Aid'),
        fields=[],
    )

    #######################################################
    model.fieldset(
        'shortanswerquestions',
        label=_(u'Short Answer Questions'),
        fields=[
            'applicant_question_text1',
            'applicant_question_answer1',
            'applicant_question_text2',
            'applicant_question_answer2',
            'applicant_question_text3',
            'applicant_question_answer3',
            'applicant_question_text4',
            'applicant_question_answer4',
            'applicant_question_text5',
            'applicant_question_answer5',
        ],
    )

    applicant_question_text1 = schema.Text(
        title=u'Applicant Question 1',
        description=u'',
        default=u'If this help text appears, you may skip this question. This program does not require a response.',  # noqa : E501
        required=False,
    )

    applicant_question_answer1 = schema.Text(
        title=u'Answer 1',
        description=u'If a question appears under Applicant Question 1 above, type your response here.',  # noqa : E501
        required=False,
    )

    applicant_question_text2 = schema.Text(
        title=u'Applicant Question 2',
        description=u'',
        default=u'If this help text appears, you may skip this question. This program does not require a response.',  # noqa : E501
        required=False,
    )

    applicant_question_answer2 = schema.Text(
        title=u'Answer 2',
        description=u'If a question appears under Applicant Question 2 above, type your response here.',  # noqa : E501
        required=False,
    )

    applicant_question_text3 = schema.Text(
        title=u'Applicant Question 3',
        description=u'',
        default=u'If this help text appears, you may skip this question. This program does not require a response.',  # noqa : E501
        required=False,
    )
    applicant_question_answer3 = schema.Text(
        title=u'Answer 3',
        description=u'If a question appears under Applicant Question 3 above, type your response here.',  # noqa : E501
        required=False,
    )

    applicant_question_text4 = schema.Text(
        title=u'Applicant Question 4',
        description=u'',
        default=u'If this help text appears, you may skip this question. This program does not require a response.',  # noqa : E501
        required=False,
    )

    applicant_question_answer4 = schema.Text(
        title=u'Answer 4',
        description=u'If a question appears under Applicant Question 4 above, type your response here.',  # noqa : E501
        required=False,
    )
    applicant_question_text5 = schema.Text(
        title=u'Applicant Question 5',
        description=u'',
        default=u'If this help text appears, you may skip this question. This program does not require a response.',  # noqa : E501
        required=False,
    )

    applicant_question_answer5 = schema.Text(
        title=u'Answer 5',
        description=u'If a question appears under Applicant Question 5 above, type your response here.',  # noqa : E501
        required=False,
    )
    #######################################################

    model.fieldset(
        'background',
        label=_(u'Background'),
        description=_(u'If you are required to apply for advance permission (a visa) to enter one or more of your host countries, your visa application may require you to disclose citations, convictions and/or arrests in a criminal record.'),  # noqa : E501
        fields=[],
    )
    #######################################################

    model.fieldset(
        'release',
        label=_(u'Release'),
        fields=[
            'UWOshkoshRelease',
            'certification',
        ],
    )
    #######################################################

    model.fieldset(
        'forms',
        label=_(u'STEP II Forms'),
        description=_(u'To complete STEP II, print relevant documents, clearly print your responses, sign forms by hand where indicated, and follow instructions below.  Signatures cannot be typed.'),  # noqa : E501
        fields=[
            'applicationFeeOK',
            'disciplinary_clearance_form_link',
            'disciplinary_clearance_form_uploaded_file',
            'specialStudentFormOK',
            'state_of_wisconsin_need_based_travel_grant_form_link',
            'state_of_wisconsin_need_based_travel_grant_form_uploaded_file',
            'special_student_form_for_undergraduate_admissions_form_link',
            'special_student_form_for_undergraduate_admissions_uploaded_file',
            'transcriptsOK',
            'UWOshkoshStatementOK',
            'UWSystemStatementOK',
            'withdrawalRefund',
            'cumulativeGPA',
        ],
    )

    disciplinary_clearance_form_link = RichText(
        title=u'Disciplinary Clearance Form',
        description=u'Download this PDF, fill it out, and upload it below',
        required=False,
        defaultFactory=get_url_disciplinary_clearance_form,
    )

    disciplinary_clearance_form_uploaded_file = field.NamedFile(
        title=u'Disciplinary Clearance Form',
        description=u'Upload your filled-out copy of the form',
        required=False,
    )

    state_of_wisconsin_need_based_travel_grant_form_link = RichText(
        title=u'State of Wisconsin Need-based Travel Grant Form',
        description=u'Download this PDF, fill it out, and upload it below',
        required=False,
        defaultFactory=get_url_special_student_form,
    )

    state_of_wisconsin_need_based_travel_grant_form_uploaded_file = \
        field.NamedFile(
            title=u'State of Wisconsin Need-based Travel Grant Submission',
            description=u'Upload your completed form.',
            required=False,
        )

    special_student_form_for_undergraduate_admissions_form_link = RichText(
        title=u'Special/Non-degree Registration-Undergraduate Level',
        description=u'Download this form, fill it out, and upload it below.',
        required=False,
        defaultFactory=get_url_special_student_form_for_undergraduate_admissions_form,  # noqa : E501
        # TODO appears when "Special/Non-Degree Registration-Graduate Level"  # noqa : E501
        #  is checked "yes" in the MGMT PORTAL
        #   AND
        #   "Current Education Level" is NOT "graduate school"
        #   AND
        #   the course request in the PART PORTAL includes at least one course
        #   numbered 500-799.
        #   OR
        #   appears when "Special/Non-Degree Registration-Graduate Level" is
        #   checked "yes" in the MGMT PORTAL
        #   AND
        #   "Current Education Level" IS "graduate school"
        #   AND
        #   the course request in the PART PORTAL includes at least one course
        #   numbered 100-499.
    )

    special_student_form_for_undergraduate_admissions_uploaded_file = \
        field.NamedFile(
            title=u'Special/Non-degree Registration-Undergraduate Level Submission',  # noqa : E501
            description=u'Upload your completed form.',
            required=False,
        )

    cumulativeGPA = schema.Float(
        title=_(u'Cumulative GPA'),
        description=_(u'Type the applicant''s CURRENT CUMULATIVE GPA exactly as it appears on the unofficial transcript.'),  # noqa : E501
        required=False,
    )

    #######################################################
    model.fieldset(
        'stepiii_documentation',
        label=_(u'Documentation'),
        description=_(u'Step 3 Documentation'),
        fields=[
            'transferCreditForm_link',
            'transferCreditSubmission',
            'transferCreditVerified',
        ],
    )

    #######################################################
    model.fieldset(
        'stepiii_identification',
        label=_(u'Step 3 Identification'),
        description=_(u'Complete the following using information from your unexpired passport (required for international travel) or with your unexpired driver\'s license (for domestic travel only).'),  # noqa : E501
        fields=[
            'travelDocLast',
            'travelDocFirst',
            'travelDocMiddle',
            'travelDocSex',
            'travelDocNumber',
            'travelDocExpiration',
            'passportReceipt',
            'passportOK',
            'driversLicenseReceipt',
            'driversLicenseReceiptVerified',
            'photoPaperOfficial',
            'photoPaperOfficialVerified',
            'photoDigitalOfficial',
            'photoDigitalOfficialVerified',
            'photoPaper',
            'photoPaperVerified',
            'photoDigital',
            'photoDigitalVerified',
        ],
    )

    #######################################################
    model.fieldset(
        'stepiii_fecop',
        label=_(u'STEP 3 FECOP'),
        description=_(u'Financial'),
        fields=[
            'fecop_label',
            'fecop_link',
            'fecopSubmission',
            'fecopVerified',
        ],
    )

    #######################################################
    model.fieldset(
        'stepiii_lifestyle',
        label=_(u'STEP 3 Lifestyle'),
        fields=[
            'isVegetarian',
            'smokingPreferred',
        ],
    )

    #######################################################
    model.fieldset(
        'stepiii_health',
        label=_(u'STEP 3 Health'),
        fields=[
            'medicalReadStatement',
            'medicalHealthProblems_whatCondition',
            'medicalHealthProblems_stable',
            'medicalHealthProblems',
            'healthConditionsSurgeriesYesNo',
            'healthConditionsSurgeriesDetails',
            'medicalHealthProblems_underCare',
            'wheelchair',
            'assistiveDevice',
            'assistiveDeviceOnFlight',
            'assistiveDeviceList',
            'hasDifficultyWalking',
            'maxWalkingDistance',
            'stairsMax',
            'walkingClimbingDescription',
            'sight',
            'healthPhysicalAdditionalInfoYesNo',
            'additionalNeeds',
            'medicalRegistered',
            'medicalRegistered_office',
            'medicalRegistered_accommodations',
            'medicalHealthProblems_additionalInfo',
            'medicalMentalProblems_enoughMedication',
            'medicalMentalProblems_stable',
            'medicalAccessOK',
            'healthMeetingNotes',
        ],
    )

    # healthConfirmation_label = schema.TextLine(
    #     title=_(u'I understand and agree'),
    # )

    #######################################################
    model.fieldset(
        'stepiii_allergies_and_medication',
        label=_(u'STEP 3 Allergies & Medications'),
        fields=[
            'allergiesYesNo',
            'foodAllergies',
            'medications_label',
            'medicalHealthProblems_takenMedication',
            'medicalHealthProblems_willingToPrescribe',
            'medicalHealthProblems_medications',
            'medicationsStorage',
        ],
    )

    #######################################################
    model.fieldset(
        'stepiii_roommate',
        label=_(u'STEP III Roommate'),
        description=_(u'If you are not traveling with a UW Oshkosh student group, do not list a roommate choice.  If you are traveling on a group program, list your first and second choice roommates here.  Any roommate you request must list you on his/her application in return.'),  # noqa : E501
        fields=[
            'roommateName1',
            'roommateName2',
        ],
    )
Пример #7
0
class IOIEProgramLeader(Interface):
    """The On-site Program Leader is responsible for providing leadership
    for the group and for overseeing group health and safety.  The On-site
    Program Leader may also teach one or more of the program courses.
    """

    # TODO "There may be only one Program Leader.  Most of the data fields  # noqa
    #   associated with the Program Leader are the same fields used for the
    #   Program Liaison and Program Co-leader/s.  Can the same fields be
    #   used for all three leadership roles?

    # TODO The Program Leader may also be the Program Liaison or one of  # noqa
    #   the Program Co-leaders.

    # TODO Some of these fields also need to be matched to "participant"  # noqa
    #   fields so that we can pull a roster that includes all participants,
    #   leaders and co-leaders. "
    dexteritytextindexer.searchable('title')
    mode(title='hidden')
    title = schema.TextLine(
        title=_(u'Full Name'),
        required=False,
        default=_(u'will be auto-generated on save'),
    )
    dexteritytextindexer.searchable('first_name')
    first_name = schema.TextLine(
        title=_(u'First Name'),
        required=True,
    )
    dexteritytextindexer.searchable('middle_name')
    middle_name = schema.TextLine(
        title=_(u'Middle Name'),
        required=False,
    )
    dexteritytextindexer.searchable('last_name')
    last_name = schema.TextLine(
        title=_(u'Last Name'),
        required=True,
    )
    dexteritytextindexer.searchable('job_title')
    job_title = schema.TextLine(
        title=_(u'Job Title'),
        required=True,
    )
    dexteritytextindexer.searchable('empid')
    empid = schema.TextLine(
        title=_(u'Employee ID'),
        required=True,
    )
    dexteritytextindexer.searchable('office_phone')
    office_phone = schema.TextLine(
        title=_(u'Office Phone'),
        description=_(
            u'Please include country code (if outside US) and area code'
        ),  # noqa
        required=True,
    )
    dexteritytextindexer.searchable('mobile_phone_us')
    mobile_phone_us = schema.TextLine(
        title=_(u'Mobile Phone (US)'),
        description=_(
            u'Please include country code (if outside US) and area code'
        ),  # noqa
        required=True,
    )
    dexteritytextindexer.searchable('mobile_phone_int')
    mobile_phone_int = schema.TextLine(
        title=_(u'Mobile Phone (abroad)'),
        description=_(
            u'Please include country code (if outside US) and area code'
        ),  # noqa
        required=True,
    )
    dexteritytextindexer.searchable('email')
    email = schema.TextLine(
        title=_(u'Email'),
        required=True,
        constraint=validate_email,
    )
    dexteritytextindexer.searchable('other_service')
    other_service = schema.Choice(
        title=_(u'e.g., Line, Skype, Viber, WeChat, WhatsApp'),
        required=False,
        vocabulary=socialmediaservice,
    )
    dexteritytextindexer.searchable('other_username')
    other_username = schema.TextLine(
        title=_(u'username or ID for the above service'),
        required=False,
    )
    dexteritytextindexer.searchable('office_building')
    office_building = schema.Choice(
        title=_(u'Office Building'),
        required=True,
        source=RegistryValueVocabulary('oiestudyabroadstudent.building'),
    )
    dexteritytextindexer.searchable('office_room')
    office_room = schema.TextLine(
        title=_(u'Office Room'),
        required=True,
    )
    dexteritytextindexer.searchable('college_or_unit')
    college_or_unit = schema.Choice(
        title=_(u'College or Unit'),
        description=_(u''),
        required=True,
        source=RegistryValueVocabulary(
            'oiestudyabroadstudent.college_or_unit'),  # noqa
    )
    role_and_responsibility = field.NamedFile(
        title=_('Role & Responsibility'),
        description=_(
            u'Upload a signed Program Liaison Role & Responsibilities form'
        ),  # noqa
    )
    dexteritytextindexer.searchable('emergency_contact_name')
    emergency_contact_name = schema.TextLine(
        title=_(u'Emergency Contact Name'),
        required=True,
    )
    dexteritytextindexer.searchable('emergency_contact_relationship')
    emergency_contact_relationship = schema.TextLine(
        title=_(u'Emergency Contact Relationship to You'),
        required=True,
    )
    dexteritytextindexer.searchable('emergency_contact_mobile_phone')
    emergency_contact_mobile_phone = schema.TextLine(
        title=_(u'Emergency Contact Mobile Phone'),
        description=_(
            u'Please include country code (if outside US) and area code'
        ),  # noqa
        required=True,
    )
    dexteritytextindexer.searchable('emergency_contact_other_phone')
    emergency_contact_other_phone = schema.TextLine(
        title=_(u'Emergency Contact Other Phone'),
        description=_(
            u'Please include country code (if outside US) and area code'
        ),  # noqa
        required=True,
    )
    dexteritytextindexer.searchable('emergency_contact_email')
    emergency_contact_email = schema.TextLine(
        title=_(u'Emergency Contact Email'),
        required=True,
        constraint=validate_email,
    )

    #######################################################
    # TODO move JavaScript over for compensation fields  # noqa
    # this appears to be the contents of programedit.js
    # which is currently set to load on the program rather than leader type
    model.fieldset(
        'compensation',
        label=_(u'Compensation'),
        fields=[
            'load_or_overload', 'replacement_costs', 'paid_by',
            'rate_or_lump_sum', 'lump_sum_amount', 'will_base_salary_change',
            'salary_form_type'
        ],
    )
    load_or_overload = schema.Choice(
        title=_(u'Load or Overload'),
        description=_(
            u'Choose whether payment is part of load or is overload'),  # noqa
        required=True,
        vocabulary=load_or_overload,
    )
    replacement_costs = schema.Choice(
        title=_(u'Replacement Costs'),
        description=_(u'Are replacement costs due to the College?'),
        required=False,
        vocabulary=replacement_costs,
    )
    paid_by = schema.Choice(
        title=_(u'Costs are paid by'),
        description=_(u'Choose who pays'),
        required=False,
        vocabulary=paid_by,
    )
    rate_or_lump_sum = schema.Choice(
        title=_(u'Payment Rate or Lump Sum'),
        description=_(u'Choose a payment rate or lump sum'),
        required=False,
        vocabulary=rate_or_lump_sum,
    )
    lump_sum_amount = schema.TextLine(
        title=_(u'Lump sum amount'),
        description=_(u'Enter the lump sum to be paid'),
        required=False,
    )
    will_base_salary_change = schema.Choice(
        title=_(
            u'Will this person'
            's base salary change prior to the date on which this program is scheduled to end?'
        ),  # noqa
        description=_(
            u'If you check '
            'no'
            ' and the base salary changes, any compensation due for this program will be calculated using the current base salary.'
        ),  # noqa
        vocabulary=yes_no_vocabulary,
    )
    salary_form_type = schema.Choice(
        title=_(u'Salary Form Type'),
        vocabulary=salary_form,
        # TODO Applicant should not see this field.  This is for OIE.  It  # noqa
        #   would be better to put this on the "Program Finances" tab, but this
        #   field is specific to each Program Leader rather than to the
        #   program.
    )
    #######################################################
    model.fieldset(
        'Marketing Material',
        label=_(u'Marketing Material'),
        fields=[
            'number_study_abroad_away_fair_flyers',
            'number_study_abroad_away_fair_posters',
            'number_study_abroad_away_fair_brochures'
        ],
    )
    number_study_abroad_away_fair_flyers = schema.Int(
        title=_(u'Number of Study Abroad/Away Fair Flyers'),
        description=
        _(u'Indicate the number (max: 999) of flyers, posters and brochures to be sent to you at the beginning of each semester. OIE can respond to additional requests for materials at any time'
          ),  # noqa
        min=0,
        max=999,
        default=0,
    )
    number_study_abroad_away_fair_posters = schema.Int(
        title=_(u'Number of Study Abroad/Away Fair Posters'),
        description=
        _(u'Indicate the number (max: 99) of posters, posters and brochures to be sent to you at the beginning of each semester. OIE can respond to additional requests for materials at any time'
          ),  # noqa
        min=0,
        max=99,
        default=0,
    )
    number_study_abroad_away_fair_brochures = schema.Int(
        title=_(u'Number of Study Abroad/Away Fair Brochures'),
        description=
        _(u'Indicate the number (max: 999) of brochures, posters and brochures to be sent to you at the beginning of each semester. OIE can respond to additional requests for materials at any time'
          ),  # noqa
        min=0,
        max=999,
        default=0,
    )
    #######################################################
    # TODO Either "passport" or "driver's license" should appear in place  # noqa
    #   of "See Comment" depending on the list of "countries" associated
    #   with the applicant's program.  (If the document name can't be
    #   generated based on other data in the system, add this text below
    #   "Travel Document": Complete the following using information from
    #   your unexpired passport (required for international travel) or with
    #   your unexpired driver's license (for domestic travel only). Can we
    #   use the same data fields as are used for the Participants in the
    #   "applicant" portal?
    model.fieldset(
        'Travel Document',
        label=_(u'Travel Document'),
        fields=[
            'travel_document_last_name', 'travel_document_first_name',
            'travel_document_middle_name', 'date_of_birth', 'gender',
            'document_number', 'document_expiry_date'
        ],
    )
    travel_document_first_name = schema.TextLine(
        title=_(u'Travel Document: First Name'),
        description=
        _(u'If you are flying to your destination, the name on your airline ticket must match the name on your ID exactly.  Type your first name exactly as it Appears on the ID.  IF MULTIPLE FIRST NAMES APPEAR ON THE ID, type all first names that appear on the ID in this field.  If typed incorrectly, you will be responsible for any name change fee charged by the airline or by the travel agency.'
          ),  # noqa
        required=True,
    )
    travel_document_middle_name = schema.TextLine(
        title=_(u'Travel Document: Middle Name'),
        description=
        _(u'If you are flying to your destination, the name on your airline ticket must match the name on your ID exactly.  IF YOUR MIDDLE NAME APPEARS ON YOUR ID, you must type your middle name in this field exactly as it appears on the ID.  IF YOUR MIDDLE INITIAL APPEARS ON YOUR ID, you must type only your middle initial in this field.  IF MULTIPLE MIDDLE NAMES APPEAR ON YOUR ID, you must type all middle names that appear on your ID in this field.  IF YOUR MIDDLE NAME DOES NOT APPEAR ON YOUR ID, do not include your middle name in this field.  If typed incorrectly, you will be responsible for any name change fee charged by the airline or by the travel agency.'
          ),  # noqa
        required=False,
    )
    travel_document_last_name = schema.TextLine(
        title=_(u'Travel Document: Last Name'),
        description=
        _(u'If you are flying to your destination, the name on your airline ticket must match the name on your ID exactly.  Type your last name exactly as it Appears on the ID.  IF MULTIPLE LAST NAMES APPEAR ON THE ID, type all last names that appear on the ID in this field.  If typed incorrectly, you will be responsible for any name change fee charged by the airline or by the travel agency.  '
          ),  # noqa
        required=True,
    )
    date_of_birth = schema.Date(
        title=_(u'Travel Document: Date of Birth'),
        required=True,
    )
    gender = schema.Choice(
        title=_(u'Travel Document: Gender (Sex)'),
        description=_(
            u'Select the sex that is listed on your travel document.'),  # noqa
        source=RegistryValueVocabulary('oiestudyabroadstudent.genders'),
        required=True,
    )
    document_number = schema.TextLine(
        title=_(u'Travel Document: Document Number'),
        description=_(u''),
        required=True,
    )
    document_expiry_date = schema.Date(
        title=_(u'Travel Document: Expiry Date'),
        description=
        _(u'You may not enter details for a document that is expired or for a document that will expire prior to the final travel return date for your program.'
          ),  # noqa
        required=True,
    )
    #######################################################
    # TODO this fieldset should be hidden from the person adding their Leader profile.  Who is allowed to see it?  # noqa
    model.fieldset(
        'Office Use Only',
        label=_(u'Office Use Only'),
        fields=[
            'orientation_completed_date', 'cash_advance_request',
            'cash_advance_distribution', 'hr_review_ok',
            'administrative_services_review_ok', 'equal_opportunity_review_ok'
        ],
    )
    orientation_completed_date = schema.Date(
        title=_(u'Program Leader Orientation Completed'),
        description=_(u'Confirm attendance at orientation'),
        required=False,
    )
    cash_advance_request = field.NamedFile(
        title=_(u'Cash Advance Request'),
        description=_(u'Upload the signed Cash Advance Form'),
        required=False,
    )
    cash_advance_distribution = schema.Date(
        title=_(u'Cash Advance Distribution'),
        description=
        _(u'Enter the date on which the cash advance was distributed to the Program Leader/Program Co-leader'
          ),  # noqa
        required=False,
    )
    hr_review_ok = schema.Choice(
        title=_(u'HR Review'),
        description=_(
            u'There are no actions pending that may affect the Provost'
            's decision to approve this applicant as a Leader or Co-leader for a study abroad/away program'
        ),  # noqa
        vocabulary=yes_no_vocabulary,
        required=False,
        # TODO Or, is this its own workflow?  # noqa
    )
    administrative_services_review_ok = schema.Choice(
        title=_(u'Administrative Services Review'),
        description=_(
            u'This applicant does not have any past due travel or cash advances'
        ),  # noqa
        vocabulary=yes_no_vocabulary,
        required=False,
        # TODO Or, is this its own workflow?  # noqa
    )
    equal_opportunity_review_ok = schema.Choice(
        title=_(u'Office of Equal Opportunity & Access Review'),
        description=_(
            u'There are no actions pending that may affect the Provost'
            's decision to approve this applicant as a Leader or Co-leader for a study abroad/away program.'
        ),  # noqa
        vocabulary=yes_no_vocabulary,
        required=False,
        # TODO Or, is this its own workflow?  # noqa
    )
MAX_LENGTH = 250

yes_no_vocabulary = SimpleVocabulary([
    SimpleTerm(value='Yes'),
    SimpleTerm(value='No'),
], )

yes_no_na_vocabulary = SimpleVocabulary([
    SimpleTerm(value='n/a'),
    SimpleTerm(value='Yes'),
    SimpleTerm(value='No'),
], )

month_vocabulary = SimpleVocabulary([
    SimpleTerm(value=u'01', title=_(u'January')),
    SimpleTerm(value=u'02', title=_(u'February')),
    SimpleTerm(value=u'03', title=_(u'March')),
    SimpleTerm(value=u'04', title=_(u'April')),
    SimpleTerm(value=u'05', title=_(u'May')),
    SimpleTerm(value=u'06', title=_(u'June')),
    SimpleTerm(value=u'07', title=_(u'July')),
    SimpleTerm(value=u'08', title=_(u'August')),
    SimpleTerm(value=u'09', title=_(u'September')),
    SimpleTerm(value=u'10', title=_(u'October')),
    SimpleTerm(value=u'11', title=_(u'November')),
    SimpleTerm(value=u'12', title=_(u'December'))
], )

graduation_month_vocabulary = SimpleVocabulary([
    SimpleTerm(value=u'05', title=_(u'May')),
Пример #9
0
class IOIECourse(Interface):
    mode(title='hidden')
    title = schema.TextLine(
        title=_(u'Course Title'),
        required=False,
        default=_(u'will be auto-generated on save'),
    )
    course = schema.Choice(
        title=_(u'UW Oshkosh Course Subject & Number'),
        description=_(
            u'Add all courses associated with your program, including courses '
            u'that will be taught partially at UW Oshkosh and partially while '
            u'away on the program.  Do not include courses that will be '
            u'taught entirely at UWO, even when these courses are offered '
            u'in preparation for the program away.  Contact the OIE to add '
            u'a course ([email protected]).'),
        source=RegistryValueVocabulary(
            'oiestudyabroadstudent.course_subject_and_number'),  # noqa
    )
    credits_earned = schema.Int(
        title=_(u'UW Oshkosh Credits Earned'),
        description=_(
            u'Enter the number of credits that participants will earn for '
            u'each individual course.  If you are offering a course that can '
            u'be taught for a range of credits on your program (e.g. 3-5 '
            u'credits), you must enter the course into this system multiple '
            u'times, giving the course a different credit value each time '
            u'that you enter it.'),
    )
    class_start_date = schema.Date(
        title=_(u'Class Start Date'),
        # TODO Auto-generate the first day of the term in which this program  # noqa
        #  runs from the calendar?????  Maybe this isn't possible.
    )
    class_end_date = schema.Date(
        title=_(u'Class End Date'),
        # TODO If the "PeopleSoft Class End Date" is AFTER the Official  # noqa
        #  Graduation Date, prompt the coursebuilder to complete the
        #  "Course End Date Extension Form".
    )
    min_credits = schema.Int(
        title=_(u'Course Prerequisites: minimum number of credits'),
        description=_(
            u'If this course requires a minimum number of completed credits '
            u'prior to the course start date, indicate this here'),
        min=0,
        max=999,
    )
    gpa = schema.Int(
        title=_(u'Course Prerequisites: GPA'),
        description=_(u'If this course requires a minimum GPA prior to the '
                      u'course start date, indicate this here.'),
        min=0,
        max=999,
    )
    completed_courses = schema.Text(
        title=_(u'Course Prerequisites: completed courses'),
        description=_(
            u'If this course requires that other courses be completed, or '
            u'that a particular grade be earned in an earlier course, prior '
            u'to the course start date, indicate this here.'),
    )
    program_of_study = schema.Choice(
        title=_(u'Course Prerequisites: program of study'),
        description=_(
            u'If this course requires admission to a particular program of '
            u'study prior to the course start date, indicate this here.'),
        source=RegistryValueVocabulary(
            'oiestudyabroadstudent.program_of_study', ),
    )
    instruction_provided_by_host = schema.Choice(
        title=_(u'Instruction Provided by Host?'),
        description=_(
            u'Select the name of the person who will teach the course, if the '
            u'course is to be taught by a UW Oshkosh professor.  Select '
            u'"host" when instruction is provided by a partner.  Do not '
            u'select the name of the "instructor-of-record" at UW Oshkosh '
            u'when instruction is provided by a partner.'),
        vocabulary=yes_no_vocabulary,
    )
    instruction_provided_by = schema.Choice(
        title=_(u'Instruction Provided by (if not host)'),
        description=_(
            u'Select the name of the person who will teach the course, if the '
            u'course is to be taught by a UW Oshkosh professor.  Select '
            u'"host" when instruction is provided by a partner.  Do not '
            u'select the name of the "instructor-of-record" at UW Oshkosh '
            u'when instruction is provided by a partner.'),
        vocabulary='uwosh.oie.studyabroadstudent.vocabularies.program_leader',
        required=False,
    )
    course_enrollment_at = schema.Choice(
        title=_(u'Course Enrollment at'),
        description=_(
            u'Indicate the institution at which program participants will be '
            u'enrolled for each individual course.'),
        source=RegistryValueVocabulary(
            'oiestudyabroadstudent.enrollment_institution', ),
        required=True,
    )
    foreign_institution = schema.Choice(
        title=_(u'Foreign Institution Name'),
        description=_(u''),
        vocabulary=
        'uwosh.oie.studyabroadstudent.vocabularies.cooperatingpartner',  # noqa
        required=True,
        # TODO Oshkosh must be the first option on this dropdown list  # noqa
    )
    foreign_course_number = schema.Text(
        title=_(u'Foreign Course Number'),
        description=_(u''),
    )
    foreign_course_credits = schema.Int(
        title=_(u'Foreign Course Number of Credits'),
        description=_(u'max: 2 digits'),
        min=0,
        max=99,
    )
    foreign_course_review_date = schema.Date(
        title=_(u'Foreign Course Date of Most Recent Review'),
        description=_(u''),
    )
    foreign_course_reviewer_info = schema.TextLine(
        title=_(u'Foreign Course Reviewer Name, Title & College'),
        description=_(u''),
    )
    foreign_course_syllabus = field.NamedFile(
        title=_(u'Foreign Course Syllabus'),
        description=_(u'Upload the syllabus that corresponds to the most '
                      u'recent date of review'),
    )
    foreign_course_builder_email = schema.TextLine(
        title=_(u'PeopleSoft Course Builder'),
        description=_(
            u'Enter the email address of the person in your department who '
            u'will build your course/s in PeopleSoft.  If instruction is '
            u'provided by the host institution, with no concurrent '
            u'enrollment at UWO, enter [email protected] into the email address '
            u'field.'),
        constraint=validate_email,
        # TODO "A message should be generated to the course builder email  # noqa
        #  addresses associated with each course.  Course builders should have
        #  access to all ""Course Subject & Number"" related fields and must
        #  have permission to edit greyed out fields in this section only.
        # TODO Course builders may request instructions on how to build study  # noqa
        #  abroad/away sections in PeopleSoft by emailing [email protected].
        #  Course builders enter the data requested below; Financial Services
        #  uses this data to properly set tuition & fees for each course."
    )
    ps_course_id = schema.Int(
        title=_(u'PeopleSoft Course ID'),
        min=0,
    )
    ps_class_id = schema.Int(
        title=_(u'PeopleSoft Class Number'),
        min=0,
    )
    ps_section_id = schema.Int(
        title=_(u'PeopleSoft Course Section Number'),
        min=0,
    )
    ps_section_letter = schema.TextLine(
        title=_(u'PeopleSoft Course Section Letter'),
        # TODO dropdown?  # noqa
    )
    ps_grade_by_date = schema.Date(
        title=_(u'PeopleSoft "grade by" date'),
        # TODO Autogenerate the "PeopleSoft 'grade by' date" by adding 5  # noqa
        #  calendar days to the "PeopleSoft Class End Date".
    )
    tuition_and_fees = schema.Choice(
        title=_(u'Tuition & Fees'),
        vocabulary='oiestudyabroadstudent.tuition_and_fees',
    )
    ext_studies_graded = schema.Choice(
        title=_(u'External Studies Courses'),
        description=_(
            u'Confirm that any External Studies Courses have been graded.'
        ),  # noqa
        vocabulary=yes_no_vocabulary,
        # TODO This field must be associated with each Ext Studies Course  # noqa
        #  listed in "Course Subject & Number".
    )
class IOIEProgramEmailTemplate(Interface):
    mode(title='hidden')
    title = schema.TextLine(
        title=_(u'Template Title'),
        required=True,
        default=_(u'will be auto-generated on save'),
    )
    transition = schema.Choice(
        title=_(u'Transition Name'),
        description=_(u'Transition that it will send an email on.'),
        vocabulary=
        'uwosh.oie.studyabroadstudent.vocabularies.program_transition',  # noqa
        required=True,
    )
    sendEmail = schema.Bool(
        title=_(u'Send Email on Transition'),
        description=_(u'Choose whether to send an email on this transition'),
    )
    sendEmailOnFailure = schema.Bool(
        title=_(u'Send Email on Transition Failure Only?'),
        description=_(u'Choose whether to send an email on transition '
                      u'failure only.'),
    )
    ccUsers = schema.TextLine(
        title=_(u'CC email addresses'),
        description=_(u'Enter each full email address, separated by a comma '
                      u'if there is more than one'),
        default=_(u'*****@*****.**'),
    )
    emailText = RichText(
        title=_(u'Email Text'),
        description=_(u'Text that will display in the email body.'),
        default_mime_type='text/html',
        allowed_mime_types=('text/plain', 'text/html'),
        required=True,
    )
    send_to_actor = schema.Bool(
        title=_(u'Send Email To the user who triggered this transition'),
        description=_(
            u'Should the user who triggered this transition recieve an email?'
        ),  # noqa
    )
    send_to_program_leader = schema.Bool(
        title=_(u'Send Email To Program Leader on Transition'),
        description=
        _(u'Should the program leader recieve an email when their application goes through this transition?'
          ),  # noqa
    )
Пример #11
0
class IOIEContact(Interface):
    dexteritytextindexer.searchable('title')
    mode(title='hidden')
    title = schema.TextLine(
        title=_(u'Full Name'),
        required=False,
        default=_(u'will be auto-generated on save'),
    )
    dexteritytextindexer.searchable('first_name')
    first_name = schema.TextLine(
        title=_(u'First Name'),
        required=True,
    )
    dexteritytextindexer.searchable('middle_name')
    middle_name = schema.TextLine(
        title=_(u'Middle Name'),
        required=False,
    )
    dexteritytextindexer.searchable('last_name')
    last_name = schema.TextLine(
        title=_(u'Last Name'),
        required=True,
    )
    dexteritytextindexer.searchable('job_title')
    job_title = schema.TextLine(
        title=_(u'Job Title'),
        required=False,
    )
    dexteritytextindexer.searchable('phone')
    phone = schema.TextLine(
        title=_(u'Phone'),
        description=_(
            u'Please include country code (if outside US) and area code'
        ),  # noqa
        required=False,
    )
    dexteritytextindexer.searchable('mobile_phone')
    mobile_phone = schema.TextLine(
        title=_(u'Mobile Phone'),
        description=_(
            u'Please include country code (if outside US) and area code'
        ),  # noqa
        required=False,
    )
    dexteritytextindexer.searchable('email')
    email = schema.TextLine(
        title=_(u'Email'),
        required=False,
        constraint=validate_email,
    )
    dexteritytextindexer.searchable('other_service')
    other_service = schema.Choice(
        title=_(u'e.g., Line, Skype, Viber, WeChat, WhatsApp'),
        required=False,
        vocabulary=socialmediaservice,
    )
    dexteritytextindexer.searchable('other_username')
    other_username = schema.TextLine(
        title=_(u'username or ID for the above service'),
        required=False,
    )
Пример #12
0
class IOIECalendarYear(Interface):

    title = schema.TextLine(
        title=_('Calendar Year'),
        required=True,
    )

    first_day_of_spring_semester_classes = schema.Date(
        title=u'First day of Spring Semester Classes',
        required=True,
        defaultFactory=date_default_value,
    )

    last_day_of_spring_semester_classes = schema.Date(
        title=u'Last day of Spring Semester Classes',
        required=True,
        defaultFactory=date_default_value,
    )

    first_day_of_spring_interim_classes = schema.Date(
        title=u'First day of Spring Interim Classes',
        required=True,
        defaultFactory=date_default_value,
    )

    last_day_of_spring_interim_classes = schema.Date(
        title=u'Last day of Spring Interim Classes',
        required=True,
        defaultFactory=date_default_value,
    )

    official_spring_graduation_date = schema.Date(
        title=u'Official spring graduation date',
        required=True,
        defaultFactory=date_default_value,
    )

    first_day_of_summer_i_classes = schema.Date(
        title=u'First day of Summer I Classes',
        required=True,
        defaultFactory=date_default_value,
    )

    last_day_of_summer_i_classes = schema.Date(
        title=u'Last day of Summer I Classes',
        required=True,
        defaultFactory=date_default_value,
    )

    first_day_of_summer_ii_classes = schema.Date(
        title=u'First day of Summer II Classes',
        required=True,
        defaultFactory=date_default_value,
    )

    last_day_of_summer_ii_classes = schema.Date(
        title=u'Last day of Summer II Classes',
        required=True,
        defaultFactory=date_default_value,
    )

    official_summer_graduation_date = schema.Date(
        title=u'Official Summer Graduation Date',
        required=True,
        defaultFactory=date_default_value,
    )

    first_day_of_fall_semester_classes = schema.Date(
        title=u'First day of Fall Semester Classes',
        required=True,
        defaultFactory=date_default_value,
    )

    last_day_of_fall_semester_classes = schema.Date(
        title=u'Last day of Fall Semester Classes',
        required=True,
        defaultFactory=date_default_value,
    )

    first_day_of_winter_interim_classes = schema.Date(
        title=u'First day of Winter Interim Classes',
        required=True,
        defaultFactory=date_default_value,
    )

    last_day_of_winter_interim_classes = schema.Date(
        title=u'Last day of Winter Interim Classes',
        required=True,
        defaultFactory=date_default_value,
    )

    official_fall_graduation_date = schema.Date(
        title=u'Official Fall Graduation Date',
        required=True,
        defaultFactory=date_default_value,
    )

    summer_request_for_proposals_deadline_date = schema.Date(
        title=u'Summer Request for Proposals Deadline',
        required=True,
        defaultFactory=date_default_value,
    )
    fall_semester_request_for_proposals_deadline_date = schema.Date(
        title=u'Fall Semester Request for Proposals Deadline',
        required=True,
        defaultFactory=date_default_value,
    )
    fall_interim_request_for_proposals_deadline_date = schema.Date(
        title=u'Fall Interim Request for Proposals Deadline',
        required=True,
        defaultFactory=date_default_value,
    )
    spring_semester_request_for_proposals_deadline_date = schema.Date(
        title=u'Spring Semester Request for Proposals Deadline',
        required=True,
        defaultFactory=date_default_value,
    )
    spring_break_request_for_proposals_deadline_date = schema.Date(
        title=u'Spring Break Request for Proposals Deadline',
        required=True,
        defaultFactory=date_default_value,
    )
    spring_interim_request_for_proposals_deadline_date = schema.Date(
        title=u'Spring Interim Request for Proposals Deadline',
        required=True,
        defaultFactory=date_default_value,
    )

    summer_application_deadline = schema.Date(
        title=u'Summer Application Deadline',
        required=True,
        defaultFactory=date_default_value,
    )

    fall_semester_application_deadline = schema.Date(
        title=u'Fall Semester Application Deadline',
        required=True,
        defaultFactory=date_default_value,
    )

    fall_interim_application_deadline = schema.Date(
        title=u'Fall Interim Application Deadline',
        required=True,
        defaultFactory=date_default_value,
    )

    spring_semester_application_deadline = schema.Date(
        title=u'Spring Semester Application Deadline',
        required=True,
        defaultFactory=date_default_value,
    )

    spring_break_application_deadline = schema.Date(
        title=u'Spring Break Application Deadline',
        required=True,
        defaultFactory=date_default_value,
    )

    spring_interim_application_deadline = schema.Date(
        title=u'Spring Interim Application Deadline',
        required=True,
        defaultFactory=date_default_value,
    )

    spring_interim_summer_fall_semester_participant_orientation_deadline = \
        schema.Datetime(
            title=u'Spring Interim, Summer & Fall Semester Participant Orientation Deadline',  # noqa
            required=True,
            defaultFactory=datetime_default_value,
        )

    spring_interim_summer_fall_semester_in_person_orientation = \
        schema.Datetime(
            title=u'Spring Interim, Summer & Fall Semester In-person Orientation',  # noqa
            required=True,
            defaultFactory=datetime_default_value,
        )

    winter_interim_spring_semester_participant_orientation_deadline = \
        schema.Datetime(
            title=u'Winter Interim & Spring Semester Participant Orientation Deadline',  # noqa
            required=True,
            defaultFactory=datetime_default_value,
        )

    winter_interim_spring_semester_in_person_orientation = schema.Datetime(
        title=u'Winter Interim & Spring Semester In-person Orientation',
        required=True,
        defaultFactory=datetime_default_value,
    )

    spring_interim_summer_fall_semester_payment_deadline_1 = schema.Date(
        title=u'Spring Interim, Summer & Fall Semester Payment Deadline 1',
        required=True,
        defaultFactory=date_default_value,
    )

    spring_interim_payment_deadline_2 = schema.Date(
        title=u'Spring Interim Payment Deadline 2',
        required=True,
        defaultFactory=date_default_value,
    )

    summer_payment_deadline_2 = schema.Date(
        title=u'Summer Payment Deadline 2',
        required=True,
        defaultFactory=date_default_value,
    )

    fall_semester_payment_deadline_2 = schema.Date(
        title=u'Fall Semester Payment Deadline 2',
        required=True,
        defaultFactory=date_default_value,
    )

    winter_interim_spring_payment_deadline_1 = schema.Date(
        title=u'Winter Interim & Spring Semester Payment Deadline 1',
        required=True,
        defaultFactory=date_default_value,
    )

    winter_interim_spring_payment_deadline_2 = schema.Date(
        title=u'Winter Interim & Spring Semester Payment Deadline 2',
        required=True,
        defaultFactory=date_default_value,
    )

    request_for_proposals_due_date = schema.Date(
        title=u'Request for Proposals Due Date',
        required=True,
        defaultFactory=date_default_value,
    )

    model.fieldset(
        'step_application_deadlines_fi_fieldset',
        label=_(u'STEP Application Deadlines (Fall Interim)'),
        fields=[
            'step_1_and_2_application_deadline_fi',
            'step_3_application_deadline_fi',
            'step_4_application_deadline_fi',
        ],
    )
    model.fieldset(
        'step_application_deadlines_ss_fieldset',
        label=_(u'STEP Application Deadlines (Spring)'),
        fields=[
            'step_1_and_2_application_deadline_ss',
            'step_3_application_deadline_ss',
            'step_4_application_deadline_ss',
        ],
    )
    model.fieldset(
        'step_application_deadlines_sb_fieldset',
        label=_(u'STEP Application Deadlines (Spring Break)'),
        fields=[
            'step_1_and_2_application_deadline_sb',
            'step_3_application_deadline_sb',
            'step_4_application_deadline_sb',
        ],
    )
    model.fieldset(
        'step_application_deadlines_si_fieldset',
        label=_(u'STEP Application Deadlines (Spring Interim)'),
        fields=[
            'step_1_and_2_application_deadline_si',
            'step_3_application_deadline_si',
            'step_4_application_deadline_si',
        ],
    )
    model.fieldset(
        'step_application_deadlines_s_fieldset',
        label=_(u'STEP Application Deadlines (Summer)'),
        fields=[
            'step_1_and_2_application_deadline_s',
            'step_3_application_deadline_s',
            'step_4_application_deadline_s',
        ],
    )
    model.fieldset(
        'step_application_deadlines_f_fieldset',
        label=_(u'STEP Application Deadlines (Fall)'),
        fields=[
            'step_1_and_2_application_deadline_f',
            'step_3_application_deadline_f',
            'step_4_application_deadline_f',
        ],
    )

    # Fall Interim
    step_1_and_2_application_deadline_fi = schema.Date(
        title=_(u'STEPs I & II Application Deadline'),
        description=_(u'The STEPs I & II application deadline must be the OIE default student application date, or a date that is two weeks prior to the contracted date to release airline tickets, whichever is earlier.  Alternatively, the Program Liaison may identify an even earlier deadline, provided OIE can provide sufficient staffing in the week leading up to the proposed deadline.  Default student application deadlines are: Last Friday in February (summer & fall semester programs); 2nd Friday in September (fall interim programs); last Friday in September (spring semester programs); 1st Friday of Spring Semester (spring interim programs).'),  # noqa
        required=False,
    )
    step_3_application_deadline_fi = schema.Date(
        title=_(u'STEP III Application Deadline'),
        description=_(u'The STEP III application deadline must be the OIE default student application date, or a date that is one week prior to the contracted date to release airline tickets, whichever is earlier.  Alternatively, the Program Liaison may identify an even earlier deadline, provided OIE can provide sufficient staffing in the week leading up to the proposed deadline.  Default student application deadlines are: 1st Friday in March (summer & fall semester programs); 3rd Friday in September (fall interim programs); 1st Friday in October (spring semester programs); 2nd Friday of Spring Semester (spring interim programs).'),  # noqa
        required=False,
    )
    step_4_application_deadline_fi = schema.Date(
        title=_(u'STEP IV Application Deadline'),
        description=_(u'The STEP IV application deadline must take into consideration external deadlines and processing time in the OIE from the point of receiving completed application documents, and the anticipated dates on which documents can be sent to external partners and received by them.'),  # noqa
        required=False,
    )

    # Spring Semester
    step_1_and_2_application_deadline_ss = schema.Date(
        title=_(u'STEPs I & II Application Deadline'),
        description=_(u'The STEPs I & II application deadline must be the OIE default student application date, or a date that is two weeks prior to the contracted date to release airline tickets, whichever is earlier.  Alternatively, the Program Liaison may identify an even earlier deadline, provided OIE can provide sufficient staffing in the week leading up to the proposed deadline.  Default student application deadlines are: Last Friday in February (summer & fall semester programs); 2nd Friday in September (fall interim programs); last Friday in September (spring semester programs); 1st Friday of Spring Semester (spring interim programs).'),  # noqa
        required=False,
    )
    step_3_application_deadline_ss = schema.Date(
        title=_(u'STEP III Application Deadline'),
        description=_(u'The STEP III application deadline must be the OIE default student application date, or a date that is one week prior to the contracted date to release airline tickets, whichever is earlier.  Alternatively, the Program Liaison may identify an even earlier deadline, provided OIE can provide sufficient staffing in the week leading up to the proposed deadline.  Default student application deadlines are: 1st Friday in March (summer & fall semester programs); 3rd Friday in September (fall interim programs); 1st Friday in October (spring semester programs); 2nd Friday of Spring Semester (spring interim programs).'),  # noqa
        required=False,
    )
    step_4_application_deadline_ss = schema.Date(
        title=_(u'STEP IV Application Deadline'),
        description=_(u'The STEP IV application deadline must take into consideration external deadlines and processing time in the OIE from the point of receiving completed application documents, and the anticipated dates on which documents can be sent to external partners and received by them.'),  # noqa
        required=False,
    )

    # Spring Break
    step_1_and_2_application_deadline_sb = schema.Date(
        title=_(u'STEPs I & II Application Deadline'),
        description=_(u'The STEPs I & II application deadline must be the OIE default student application date, or a date that is two weeks prior to the contracted date to release airline tickets, whichever is earlier.  Alternatively, the Program Liaison may identify an even earlier deadline, provided OIE can provide sufficient staffing in the week leading up to the proposed deadline.  Default student application deadlines are: Last Friday in February (summer & fall semester programs); 2nd Friday in September (fall interim programs); last Friday in September (spring semester programs); 1st Friday of Spring Semester (spring interim programs).'),  # noqa
        required=False,
    )
    step_3_application_deadline_sb = schema.Date(
        title=_(u'STEP III Application Deadline'),
        description=_(u'The STEP III application deadline must be the OIE default student application date, or a date that is one week prior to the contracted date to release airline tickets, whichever is earlier.  Alternatively, the Program Liaison may identify an even earlier deadline, provided OIE can provide sufficient staffing in the week leading up to the proposed deadline.  Default student application deadlines are: 1st Friday in March (summer & fall semester programs); 3rd Friday in September (fall interim programs); 1st Friday in October (spring semester programs); 2nd Friday of Spring Semester (spring interim programs).'),  # noqa
        required=False,
    )
    step_4_application_deadline_sb = schema.Date(
        title=_(u'STEP IV Application Deadline'),
        description=_(u'The STEP IV application deadline must take into consideration external deadlines and processing time in the OIE from the point of receiving completed application documents, and the anticipated dates on which documents can be sent to external partners and received by them.'),  # noqa
        required=False,
    )

    # Spring Interim
    step_1_and_2_application_deadline_si = schema.Date(
        title=_(u'STEPs I & II Application Deadline'),
        description=_(u'The STEPs I & II application deadline must be the OIE default student application date, or a date that is two weeks prior to the contracted date to release airline tickets, whichever is earlier.  Alternatively, the Program Liaison may identify an even earlier deadline, provided OIE can provide sufficient staffing in the week leading up to the proposed deadline.  Default student application deadlines are: Last Friday in February (summer & fall semester programs); 2nd Friday in September (fall interim programs); last Friday in September (spring semester programs); 1st Friday of Spring Semester (spring interim programs).'),  # noqa
        required=False,
    )
    step_3_application_deadline_si = schema.Date(
        title=_(u'STEP III Application Deadline'),
        description=_(u'The STEP III application deadline must be the OIE default student application date, or a date that is one week prior to the contracted date to release airline tickets, whichever is earlier.  Alternatively, the Program Liaison may identify an even earlier deadline, provided OIE can provide sufficient staffing in the week leading up to the proposed deadline.  Default student application deadlines are: 1st Friday in March (summer & fall semester programs); 3rd Friday in September (fall interim programs); 1st Friday in October (spring semester programs); 2nd Friday of Spring Semester (spring interim programs).'),  # noqa
        required=False,
    )
    step_4_application_deadline_si = schema.Date(
        title=_(u'STEP IV Application Deadline'),
        description=_(u'The STEP IV application deadline must take into consideration external deadlines and processing time in the OIE from the point of receiving completed application documents, and the anticipated dates on which documents can be sent to external partners and received by them.'),  # noqa
        required=False,
    )

    # Summer
    step_1_and_2_application_deadline_s = schema.Date(
        title=_(u'STEPs I & II Application Deadline'),
        description=_(u'The STEPs I & II application deadline must be the OIE default student application date, or a date that is two weeks prior to the contracted date to release airline tickets, whichever is earlier.  Alternatively, the Program Liaison may identify an even earlier deadline, provided OIE can provide sufficient staffing in the week leading up to the proposed deadline.  Default student application deadlines are: Last Friday in February (summer & fall semester programs); 2nd Friday in September (fall interim programs); last Friday in September (spring semester programs); 1st Friday of Spring Semester (spring interim programs).'),  # noqa
        required=False,
    )
    step_3_application_deadline_s = schema.Date(
        title=_(u'STEP III Application Deadline'),
        description=_(u'The STEP III application deadline must be the OIE default student application date, or a date that is one week prior to the contracted date to release airline tickets, whichever is earlier.  Alternatively, the Program Liaison may identify an even earlier deadline, provided OIE can provide sufficient staffing in the week leading up to the proposed deadline.  Default student application deadlines are: 1st Friday in March (summer & fall semester programs); 3rd Friday in September (fall interim programs); 1st Friday in October (spring semester programs); 2nd Friday of Spring Semester (spring interim programs).'),  # noqa
        required=False,
    )
    step_4_application_deadline_s = schema.Date(
        title=_(u'STEP IV Application Deadline'),
        description=_(u'The STEP IV application deadline must take into consideration external deadlines and processing time in the OIE from the point of receiving completed application documents, and the anticipated dates on which documents can be sent to external partners and received by them.'),  # noqa
        required=False,
    )

    # Fall Semester
    step_1_and_2_application_deadline_f = schema.Date(
        title=_(u'STEPs I & II Application Deadline'),
        description=_(u'The STEPs I & II application deadline must be the OIE default student application date, or a date that is two weeks prior to the contracted date to release airline tickets, whichever is earlier.  Alternatively, the Program Liaison may identify an even earlier deadline, provided OIE can provide sufficient staffing in the week leading up to the proposed deadline.  Default student application deadlines are: Last Friday in February (summer & fall semester programs); 2nd Friday in September (fall interim programs); last Friday in September (spring semester programs); 1st Friday of Spring Semester (spring interim programs).'),  # noqa
        required=False,
    )

    step_3_application_deadline_f = schema.Date(
        title=_(u'STEP III Application Deadline'),
        description=_(u'The STEP III application deadline must be the OIE default student application date, or a date that is one week prior to the contracted date to release airline tickets, whichever is earlier.  Alternatively, the Program Liaison may identify an even earlier deadline, provided OIE can provide sufficient staffing in the week leading up to the proposed deadline.  Default student application deadlines are: 1st Friday in March (summer & fall semester programs); 3rd Friday in September (fall interim programs); 1st Friday in October (spring semester programs); 2nd Friday of Spring Semester (spring interim programs).'),  # noqa
        required=False,
    )

    step_4_application_deadline_f = schema.Date(
        title=_(u'STEP IV Application Deadline'),
        description=_(u'The STEP IV application deadline must take into consideration external deadlines and processing time in the OIE from the point of receiving completed application documents, and the anticipated dates on which documents can be sent to external partners and received by them.'),  # noqa
        required=False,
    )
class IOIECooperatingPartner(Interface):

    widget(
        'primary_contact',
        RelatedItemsFieldWidget,
        pattern_options={
            'selectableTypes': ['OIEContact'],
        },
    )
    primary_contact = RelationChoice(
        title=_('Primary Contact'),
        vocabulary='plone.app.vocabularies.Catalog',
        required=True,
    )

    dexteritytextindexer.searchable('website')
    website = schema.URI(
        title=_(u'Partner Web Address'),
        required=True,
    )
    dexteritytextindexer.searchable('hq_address_1')
    hq_address_1 = schema.TextLine(
        title=_(u'Address 1'),
        description=_(
            u'must be a real address, not a post office box or similar'
        ),  # noqa
        required=True,
    )
    dexteritytextindexer.searchable('hq_address_2')
    hq_address_2 = schema.TextLine(
        title=_(u'Address 2'),
        description=_(
            u'must be a real address, not a post office box or similar'
        ),  # noqa
        required=False,
    )
    dexteritytextindexer.searchable('hq_city')
    hq_city = schema.TextLine(
        title=_(u'City'),
        description=_(u''),
        required=True,
    )
    dexteritytextindexer.searchable('hq_state')
    hq_state = schema.TextLine(
        title=_(u'State'),
        description=_(u'(or province or equivalent)'),
        required=True,
    )
    dexteritytextindexer.searchable('hq_mailing_code')
    hq_mailing_code = schema.TextLine(
        title=_(u'Mailing Code'),
        description=_(u'Zip or Postal Code or equivalent'),
        required=True,
    )
    dexteritytextindexer.searchable('hq_country')
    hq_country = schema.TextLine(
        title=_(u'Country'),
        description=_(u''),
        required=True,
    )
    dexteritytextindexer.searchable('telephone')
    telephone = schema.TextLine(
        title=_(u'Telephone'),
        description=_(
            u'Please include country code (if outside US) and area code'
        ),  # noqa
        required=True,
    )
    dexteritytextindexer.searchable('mobile')
    mobile = schema.TextLine(
        title=_(u'Mobile Phone'),
        description=_(
            u'Please include country code (if outside US) and area code'
        ),  # noqa
        required=True,
    )
    dexteritytextindexer.searchable('email')
    email = schema.TextLine(
        title=_(u'Email'),
        constraint=validate_email,
        required=True,
    )
    dexteritytextindexer.searchable('other_service')
    other_service = schema.Choice(
        title=_(u'e.g., Line, Skype, Viber, WeChat, WhatsApp'),
        required=False,
        vocabulary=socialmediaservice,
    )
    dexteritytextindexer.searchable('other_username')
    other_username = schema.TextLine(
        title=_(u'username or ID for the above service'),
        required=False,
    )
Пример #14
0
class IOIELiaison(Interface):
    """The Liaison to the OIE communicates decisions related to program
development and delivery to the Program Manager in the OIE and
communicates program changes and updates to his/her unit administration.
There is only one Liaison per program;  all decision-making at the
unit level must be communicated to the OIE through the designated
liaison. The Liaison may also include the OIE Program Manager and/or
other OIE staff in conversations or seek input when appropriate.
The Liaison may also serve as the On-site Program Leader and may
also teach one or more of the program courses.
"""
    dexteritytextindexer.searchable('title')

    mode(title='hidden')
    title = schema.TextLine(
        title=_(u'Full Name'),
        required=False,
        default=_(u'will be auto-generated on save'),
    )
    dexteritytextindexer.searchable('first_name')
    first_name = schema.TextLine(
        title=_(u'First Name'),
        required=True,
    )
    dexteritytextindexer.searchable('middle_name')
    middle_name = schema.TextLine(
        title=_(u'Middle Name'),
        required=False,
    )
    dexteritytextindexer.searchable('last_name')
    last_name = schema.TextLine(
        title=_(u'Last Name'),
        required=True,
    )
    dexteritytextindexer.searchable('job_title')
    job_title = schema.TextLine(
        title=_(u'Job Title'),
        required=True,
    )
    dexteritytextindexer.searchable('office_phone')
    office_phone = schema.TextLine(
        title=_(u'Office Phone'),
        description=_(
            u'Please include country code (if outside US) and area code', ),
        required=True,
    )
    dexteritytextindexer.searchable('mobile_phone_us')
    mobile_phone_us = schema.TextLine(
        title=_(u'Mobile Phone (US)'),
        description=_(
            u'Please include country code (if outside US) and area code', ),
        required=True,
    )
    dexteritytextindexer.searchable('email')
    email = schema.TextLine(
        title=_(u'Email'),
        required=True,
        constraint=validate_email,
    )
    dexteritytextindexer.searchable('other_service')
    other_service = schema.Choice(
        title=_(u'e.g., Line, Skype, Viber, WeChat, WhatsApp'),
        required=False,
        vocabulary=socialmediaservice,
    )
    dexteritytextindexer.searchable('other_username')
    other_username = schema.TextLine(
        title=_(u'username or ID for the above service'),
        required=False,
    )
    dexteritytextindexer.searchable('office_building')
    office_building = schema.Choice(
        title=_(u'Office Building'),
        required=True,
        source=RegistryValueVocabulary('oiestudyabroadstudent.building'),
    )
    dexteritytextindexer.searchable('office_room')
    office_room = schema.TextLine(
        title=_(u'Office Room'),
        required=True,
    )
    dexteritytextindexer.searchable('college_or_unit')
    college_or_unit = schema.Choice(
        title=_(u'College or Unit'),
        description=_(u''),
        required=True,
        source=RegistryValueVocabulary(
            'oiestudyabroadstudent.college_or_unit', ),
    )
    role_and_responsibility = field.NamedFile(
        title=_('Role & Responsibility'),
        description=_(
            u'Upload a signed Program Liaison Role & Responsibilities form', ),
    )
    #######################################################
    model.fieldset(
        'Marketing Material',
        label=_(u'Marketing Material'),
        fields=[
            'number_study_abroad_away_fair_flyers',
            'number_study_abroad_away_fair_posters',
            'number_study_abroad_away_fair_brochures'
        ],
    )
    number_study_abroad_away_fair_flyers = schema.Int(
        title=_(u'Number of Study Abroad/Away Fair Flyers'),
        description=
        _(u'Indicate the number (max: 999) of flyers to be sent to you at the beginning of each semester. OIE can respond to additional requests for materials at any time'
          ),  # noqa
        min=0,
        max=999,
    )
    number_study_abroad_away_fair_posters = schema.Int(
        title=_(u'Number of Study Abroad/Away Fair Posters'),
        description=
        _(u'Indicate the number (max: 99) of posters to be sent to you at the beginning of each semester. OIE can respond to additional requests for materials at any time'
          ),  # noqa
        min=0,
        max=99,
    )
    number_study_abroad_away_fair_brochures = schema.Int(
        title=_(u'Number of Study Abroad/Away Fair Brochures'),
        description=
        _(u'Indicate the number (max: 999) of brochures to be sent to you at the beginning of each semester. OIE can respond to additional requests for materials at any time'
          ),  # noqa
        min=0,
        max=999,
    )