Affects Version/s: Quest-CPS07
Fix Version/s: Quest-CPS07
This issue covers reworking of the UI and processing for both the High School Information and Other School forms in the "School Information" section. The old behavior was to load the data for any existing "schools" into 1 or more repeated blocks of form fields - and then to process add/edit/update from a single form submission. The new approach separated Add, Edit and Delete actions both in the UI and the processing logic. This issue describes the details for High School, but the exact same modifications should be applied to the Other School form.
The basic data model has not changed:
- Each school is represented by a contact record - type = Organization
- Student contact records are joined to one or more schools via a relationship record (relationship_type = 8)
- If a student "deletes" a school on this form, only the relationship is deleted - not the school's Organization contact record.
- Existing logic should be retained for using CEEB code key lookup, matching to/updating existing school records, populating relationship fields and custom fields for school type, etc.
The form new layout can be viewed in this mockup: http://www.questbridge.org/app_staging/cps_07/high_school.html. The screen has two sections:
- A "selector" listing any existing student->school relationships sorted by Start Date DESC - with action links to Edit or Delete the school. The selector is only displayed if there are 1 or more school relationships to list. (Schools are included regardless of whether their End Date is in the past.)
- A form for Adding or Editing a School. This form is only displayed if:
- There are NO school relationships created yet (generally, first time through this form/section)
- User has clicked "Add Another High School" link
- User has clicked "Edit" action link from selector for an existing school
- User has clicked the "Save and Add Another" form submit button
The page will have TWO submit buttons (so we'll need to override default buttons).
- Save and Continue : saves the current form values and redirects to next form (Other School Info)
- Save and Add Another : saves the current form values (if in Add or Edit mode) and reloads the current page with the updated selector and the form in add mode (fields are empty)