<section class="form-wrapper">
    <h2>You are applying for:</h2>
    <h3>Accounting (Joint Honours)</h3>
    <p>
        <a href="https://registration.derby.ac.uk/psp/HPRDOLA2/EMPLOYEE/EMPL/h/?tab=UD_OLA_COURSE_SELECTION&PGR=Y002&PN1=AG" class="button-blue button-large" role="button" tabindex="0" data-scroll>
        Start application
    <i class="button-icon uod-icons uod-icons-external-link"></i><span class="button-overlay"><span>
                        Start application
            <i class="button-icon uod-icons uod-icons-external-link"></i></span></span></a> </p>
    <form id="apply-online-form">
        <h3>or change course</h3>
        <div class="form-group field-required">
            <label for="courseTypes">Course type<span class="required">*</span></label>
            <div>
                <select class="form-control" id="courseTypes" name="courseTypes" required>
			<option value="">-- Please choose --</option>
															<option value="undergraduate" selected>Undergraduate</option>
															<option value="postgraduate">Postgraduate</option>
															<option value="professional">Professional</option>
															<option value="short-course">Short course</option>
															<option value="online">Online</option>
					</select>
            </div>
        </div>
        <div class="apply-online-course-list preselected" id="undergraduate-apply-online-course-list">
            <div class="form-group">
                <label for="undergraduate-courses">Undergraduate courses</label>
                <div>
                    <select class="form-control apply-online-course-select" id="undergraduate-courses" name="undergraduate">
			<option value="">-- Please choose --</option>
											 
																																			<option value="132" data-program-code="Y002" data-joint-honours-code="AG">Accounting (Joint Honours)</option>
											 
																																			<option value="543" data-program-code="N400" data-joint-honours-code="">Accounting and Finance BA (Hons)</option>
											 
																																			<option value="745" data-program-code="N412,Undergraduate" data-joint-honours-code="">Accounting and Finance Integrated Masters MAccFin</option>
											 
																																			<option value="586" data-program-code="J901,Without industrial year|H293,With industrial year" data-joint-honours-code="">Civil and Infrastructure Engineering BEng (Hons)</option>
					</select>
                </div>
            </div>
        </div>
        <div class="apply-online-course-list" id="postgraduate-apply-online-course-list">
            <div class="form-group">
                <label for="postgraduate-courses">Postgraduate courses</label>
                <div>
                    <select class="form-control apply-online-course-select" id="postgraduate-courses" name="postgraduate">
			<option value="">-- Please choose --</option>
											 
																																			<option value="2560" data-program-code="MN4AB" data-joint-honours-code="">Accounting and Finance MSc</option>
											 
																																			<option value="2561" data-program-code="2561" data-joint-honours-code="">Advanced Computer Networks MSc</option>
					</select>
                </div>
            </div>
        </div>
        <div class="apply-online-course-list" id="professional-apply-online-course-list">
            <div class="form-group">
                <label for="professional-courses">Professional courses</label>
                <div>
                    <select class="form-control apply-online-course-select" id="professional-courses" name="professional">
			<option value="">-- Please choose --</option>
											 
																																			<option value="3327" data-program-code="MY0AF,Level 7" data-joint-honours-code="">Advanced Communication</option>
											 
																																			<option value="3328" data-program-code="MY0AF,Level 7" data-joint-honours-code="">Advanced Technology</option>
					</select>
                </div>
            </div>
        </div>
        <div class="apply-online-course-list" id="short-course-apply-online-course-list">
            <div class="form-group">
                <label for="short-course-courses">Short courses</label>
                <div>
                    <select class="form-control apply-online-course-select" id="short-course-courses" name="short-course">
			<option value="">-- Please choose --</option>
											 
																																			<option value="7622" data-program-code="UN4AA" data-joint-honours-code="">ACCA Revision Classes</option>
											 
																																			<option value="3331" data-program-code="CPDAZ,Level 7" data-joint-honours-code="">An Introduction to Art Therapy Supervision</option>
					</select>
                </div>
            </div>
        </div>
        <div class="apply-online-course-list" id="online-apply-online-course-list">
            <div class="form-group">
                <label for="online-courses">Online courses</label>
                <div>
                    <select class="form-control apply-online-course-select" id="online-courses" name="online">
			<option value="">-- Please choose --</option>
											 
																																			<option value="132" data-program-code="N401" data-joint-honours-code="">Accounting and Finance BA (Hons) Top-Up degree</option>
											 
																																			<option value="13612" data-program-code="UC8AG" data-joint-honours-code="">Psychology BSc (Hons)</option>
					</select>
                </div>
            </div>
        </div>
        <noscript>
            <style>.apply-online-course-list{display: none;}</style>
                                                    <div class="form-group field-required">
	<label for="all-courses">Courses<span class="required">*</span></label>
		<div>
		<select class="form-control" id="all-courses" name="section_id" required>
			<option value="">-- Please choose --</option>
															<option value="">- Undergraduate courses -</option>
											 
																																			<option value="132" data-program-code="Y002" data-joint-honours-code="AG">Accounting (Joint Honours)</option>
											 
																																			<option value="543" data-program-code="N400" data-joint-honours-code="">Accounting and Finance BA (Hons)</option>
											 
																																			<option value="745" data-program-code="N412,Undergraduate" data-joint-honours-code="">Accounting and Finance Integrated Masters MAccFin</option>
											 
																																			<option value="586" data-program-code="J901,Without industrial year|H293,With industrial year" data-joint-honours-code="">Civil and Infrastructure Engineering BEng (Hons)</option>
															<option value="">- Postgraduate courses -</option>
											 
																																			<option value="2560" data-program-code="MN4AB" data-joint-honours-code="">Accounting and Finance MSc</option>
											 
																																			<option value="2561" data-program-code="2561" data-joint-honours-code="">Advanced Computer Networks MSc</option>
															<option value="">- Professional courses -</option>
											 
																																			<option value="3327" data-program-code="MY0AF,Level 7" data-joint-honours-code="">Advanced Communication</option>
											 
																																			<option value="3328" data-program-code="MY0AF,Level 7" data-joint-honours-code="">Advanced Technology</option>
															<option value="">- Short courses -</option>
											 
																																			<option value="7622" data-program-code="UN4AA" data-joint-honours-code="">ACCA Revision Classes</option>
											 
																																			<option value="3331" data-program-code="CPDAZ,Level 7" data-joint-honours-code="">An Introduction to Art Therapy Supervision</option>
															<option value="">- Online courses -</option>
											 
																																			<option value="132" data-program-code="N401" data-joint-honours-code="">Accounting and Finance BA (Hons) Top-Up degree</option>
											 
																																			<option value="13612" data-program-code="UC8AG" data-joint-honours-code="">Psychology BSc (Hons)</option>
					</select>
	</div>
	</div>        </noscript>
        <div class="submitButtons">
            <button class="button-blue" role="button" type="submit" tabindex="0" data-scroll>
        Submit
            <span class="button-overlay"><span>
                        Submit
                    </span></span></button> </div>
    </form>
    <br><br>
    <h3>or continue an existing application</h3>
    <p>If you've started your application already, use the link on the right to access and complete your application form using your username and password.</p>
    <p>
        <a href="https://registration.derby.ac.uk/psp/HPRDOLA2/EMPLOYEE/EMPL/h/?tab=UD_OLA_LOGIN" class="button-blue button-large" role="button" tabindex="0" data-scroll>
        Continue application
    <i class="button-icon uod-icons uod-icons-external-link"></i><span class="button-overlay"><span>
                        Continue application
            <i class="button-icon uod-icons uod-icons-external-link"></i></span></span></a> </p>
    <h3>Forgotten your password or username?</h3>
    <p>If you've forgotten your username or password choose "Continue application" above and then "Forgot password?" to access your account.</p>
</section>
<section class="form-wrapper">
    {% if courseName %}
        <h2>You are applying for:</h2><h3>{{ courseName }}</h3>
    {% else %}
        <h2>Apply now</h2>
    {% endif %}
    {% if courseLink %}
        <p>
            {% include '@button' with {
                label: 'Start application',
                href: courseLink,
                size: 'large',
                external: true,
                scheme: 'blue'
            } %}
        </p>
    {% endif %}
    <form id="apply-online-form">
        {% if courseName %}<h3>or change course</h3>{% endif %}
        {% if courseName %}
            {% set label = 'Course type' %}
        {% else %}
            {% set label = 'Select course type' %}
        {% endif %}
        {% include '@dropdown' with {
            id: 'courseTypes',
            name: 'courseTypes',
            label: label,
            required: true,
            options : courseTypes
        } %} 
        {% for index, courseList in courseLists %}
            <div class="apply-online-course-list{% if selectedCourseType == courseList.name %} preselected{% endif %}" id="{{ courseList.divId }}-apply-online-course-list">
                {% if courseName %}
                    {% set label = courseList.changeLabel %}
                {% else %}
                    {% set label = courseList.selectLabel %}
                {% endif %}
                {% include '@dropdown' with {
                    id: courseList.selectId,
                    name: courseList.name,
                    label: label,
                    required: additionalClasses.required,
                    options : courseList.courses,
                    additionalClasses: courseList.additionalClasses,
                } %}
            </div>
        {% endfor %}
        <noscript>
            <style>.apply-online-course-list{display: none;}</style>
            {% if courseName %}
                {% set label = fullCourseList.changeLabel %}
            {% else %}
                {% set label = fullCourseList.selectLabel %}
            {% endif %}
            {% include '@dropdown' with {
                id: fullCourseList.selectId,
                name: fullCourseList.name,
                label: label,
                required: fullCourseList.required,
                options : fullCourseList.courses,
            } %}
        </noscript>
        <div class="submitButtons">
            {% include '@button' with { 
                label: 'Submit',
                href: '#',
                scheme: 'blue', 
                submit: true,
            } %}
        </div>
    </form>
    <br><br>
    <h3>or continue an existing application</h3>
    <p>If you've started your application already, use the link on the right to access and complete your application form using your username and password.</p>
    <p>
        {% include '@button' with {
            label: 'Continue application',
            href: 'https://registration.derby.ac.uk/psp/HPRDOLA2/EMPLOYEE/EMPL/h/?tab=UD_OLA_LOGIN',
            size: 'large',
            external: true,
            scheme: 'blue'
        } %}
    </p>
    <h3>Forgotten your password or username?</h3>
    <p>If you've forgotten your username or password choose "Continue application" above and then "Forgot password?" to access your account.</p>
</section>
{
  "courseTypes": [
    {
      "label": "Undergraduate",
      "value": "undergraduate",
      "selected": true
    },
    {
      "label": "Postgraduate",
      "value": "postgraduate"
    },
    {
      "label": "Professional",
      "value": "professional"
    },
    {
      "label": "Short course",
      "value": "short-course"
    },
    {
      "label": "Online",
      "value": "online"
    }
  ],
  "courseLists": [
    {
      "divId": "undergraduate",
      "selectId": "undergraduate-courses",
      "name": "undergraduate",
      "changeLabel": "Undergraduate courses",
      "selectLabel": "Select undergraduate course",
      "additionalClasses": "apply-online-course-select",
      "required": null,
      "courses": [
        {
          "label": "Accounting (Joint Honours)",
          "value": 132,
          "dataAttributes": [
            {
              "key": "data-program-code",
              "value": "Y002"
            },
            {
              "key": "data-joint-honours-code",
              "value": "AG"
            }
          ]
        },
        {
          "label": "Accounting and Finance BA (Hons)",
          "value": 543,
          "dataAttributes": [
            {
              "key": "data-program-code",
              "value": "N400"
            },
            {
              "key": "data-joint-honours-code",
              "value": null
            }
          ]
        },
        {
          "label": "Accounting and Finance Integrated Masters MAccFin",
          "value": 745,
          "dataAttributes": [
            {
              "key": "data-program-code",
              "value": "N412,Undergraduate"
            },
            {
              "key": "data-joint-honours-code",
              "value": null
            }
          ]
        },
        {
          "label": "Civil and Infrastructure Engineering BEng (Hons)",
          "value": 586,
          "dataAttributes": [
            {
              "key": "data-program-code",
              "value": "J901,Without industrial year|H293,With industrial year"
            },
            {
              "key": "data-joint-honours-code",
              "value": null
            }
          ]
        }
      ]
    },
    {
      "divId": "postgraduate",
      "selectId": "postgraduate-courses",
      "name": "postgraduate",
      "changeLabel": "Postgraduate courses",
      "selectLabel": "Select postgraduate course",
      "additionalClasses": "apply-online-course-select",
      "required": null,
      "courses": [
        {
          "label": "Accounting and Finance MSc",
          "value": 2560,
          "dataAttributes": [
            {
              "key": "data-program-code",
              "value": "MN4AB"
            },
            {
              "key": "data-joint-honours-code",
              "value": null
            }
          ]
        },
        {
          "label": "Advanced Computer Networks MSc",
          "value": 2561,
          "dataAttributes": [
            {
              "key": "data-program-code",
              "value": "2561"
            },
            {
              "key": "data-joint-honours-code",
              "value": null
            }
          ]
        }
      ]
    },
    {
      "divId": "professional",
      "selectId": "professional-courses",
      "name": "professional",
      "changeLabel": "Professional courses",
      "selectLabel": "Select professional course",
      "additionalClasses": "apply-online-course-select",
      "required": null,
      "courses": [
        {
          "label": "Advanced Communication",
          "value": 3327,
          "dataAttributes": [
            {
              "key": "data-program-code",
              "value": "MY0AF,Level 7"
            },
            {
              "key": "data-joint-honours-code",
              "value": null
            }
          ]
        },
        {
          "label": "Advanced Technology",
          "value": 3328,
          "dataAttributes": [
            {
              "key": "data-program-code",
              "value": "MY0AF,Level 7"
            },
            {
              "key": "data-joint-honours-code",
              "value": null
            }
          ]
        }
      ]
    },
    {
      "divId": "short-course",
      "selectId": "short-course-courses",
      "name": "short-course",
      "changeLabel": "Short courses",
      "selectLabel": "Select short course",
      "additionalClasses": "apply-online-course-select",
      "required": null,
      "courses": [
        {
          "label": "ACCA Revision Classes",
          "value": 7622,
          "dataAttributes": [
            {
              "key": "data-program-code",
              "value": "UN4AA"
            },
            {
              "key": "data-joint-honours-code",
              "value": null
            }
          ]
        },
        {
          "label": "An Introduction to Art Therapy Supervision",
          "value": 3331,
          "dataAttributes": [
            {
              "key": "data-program-code",
              "value": "CPDAZ,Level 7"
            },
            {
              "key": "data-joint-honours-code",
              "value": null
            }
          ]
        }
      ]
    },
    {
      "divId": "online",
      "selectId": "online-courses",
      "name": "online",
      "changeLabel": "Online courses",
      "selectLabel": "Select online course",
      "additionalClasses": "apply-online-course-select",
      "required": null,
      "courses": [
        {
          "label": "Accounting and Finance BA (Hons) Top-Up degree",
          "value": 132,
          "dataAttributes": [
            {
              "key": "data-program-code",
              "value": "N401"
            },
            {
              "key": "data-joint-honours-code",
              "value": null
            }
          ]
        },
        {
          "label": "Psychology BSc (Hons)",
          "value": 13612,
          "dataAttributes": [
            {
              "key": "data-program-code",
              "value": "UC8AG"
            },
            {
              "key": "data-joint-honours-code",
              "value": null
            }
          ]
        }
      ]
    }
  ],
  "fullCourseList": {
    "selectId": "all-courses",
    "name": "section_id",
    "changeLabel": "Courses",
    "selectLabel": "Select course",
    "required": true,
    "courses": [
      {
        "label": "- Undergraduate courses -",
        "value": null
      },
      {
        "label": "Accounting (Joint Honours)",
        "value": 132,
        "dataAttributes": [
          {
            "key": "data-program-code",
            "value": "Y002"
          },
          {
            "key": "data-joint-honours-code",
            "value": "AG"
          }
        ]
      },
      {
        "label": "Accounting and Finance BA (Hons)",
        "value": 543,
        "dataAttributes": [
          {
            "key": "data-program-code",
            "value": "N400"
          },
          {
            "key": "data-joint-honours-code",
            "value": null
          }
        ]
      },
      {
        "label": "Accounting and Finance Integrated Masters MAccFin",
        "value": 745,
        "dataAttributes": [
          {
            "key": "data-program-code",
            "value": "N412,Undergraduate"
          },
          {
            "key": "data-joint-honours-code",
            "value": null
          }
        ]
      },
      {
        "label": "Civil and Infrastructure Engineering BEng (Hons)",
        "value": 586,
        "dataAttributes": [
          {
            "key": "data-program-code",
            "value": "J901,Without industrial year|H293,With industrial year"
          },
          {
            "key": "data-joint-honours-code",
            "value": null
          }
        ]
      },
      {
        "label": "- Postgraduate courses -",
        "value": null
      },
      {
        "label": "Accounting and Finance MSc",
        "value": 2560,
        "dataAttributes": [
          {
            "key": "data-program-code",
            "value": "MN4AB"
          },
          {
            "key": "data-joint-honours-code",
            "value": null
          }
        ]
      },
      {
        "label": "Advanced Computer Networks MSc",
        "value": 2561,
        "dataAttributes": [
          {
            "key": "data-program-code",
            "value": "2561"
          },
          {
            "key": "data-joint-honours-code",
            "value": null
          }
        ]
      },
      {
        "label": "- Professional courses -",
        "value": null
      },
      {
        "label": "Advanced Communication",
        "value": 3327,
        "dataAttributes": [
          {
            "key": "data-program-code",
            "value": "MY0AF,Level 7"
          },
          {
            "key": "data-joint-honours-code",
            "value": null
          }
        ]
      },
      {
        "label": "Advanced Technology",
        "value": 3328,
        "dataAttributes": [
          {
            "key": "data-program-code",
            "value": "MY0AF,Level 7"
          },
          {
            "key": "data-joint-honours-code",
            "value": null
          }
        ]
      },
      {
        "label": "- Short courses -",
        "value": null
      },
      {
        "label": "ACCA Revision Classes",
        "value": 7622,
        "dataAttributes": [
          {
            "key": "data-program-code",
            "value": "UN4AA"
          },
          {
            "key": "data-joint-honours-code",
            "value": null
          }
        ]
      },
      {
        "label": "An Introduction to Art Therapy Supervision",
        "value": 3331,
        "dataAttributes": [
          {
            "key": "data-program-code",
            "value": "CPDAZ,Level 7"
          },
          {
            "key": "data-joint-honours-code",
            "value": null
          }
        ]
      },
      {
        "label": "- Online courses -",
        "value": null
      },
      {
        "label": "Accounting and Finance BA (Hons) Top-Up degree",
        "value": 132,
        "dataAttributes": [
          {
            "key": "data-program-code",
            "value": "N401"
          },
          {
            "key": "data-joint-honours-code",
            "value": null
          }
        ]
      },
      {
        "label": "Psychology BSc (Hons)",
        "value": 13612,
        "dataAttributes": [
          {
            "key": "data-program-code",
            "value": "UC8AG"
          },
          {
            "key": "data-joint-honours-code",
            "value": null
          }
        ]
      }
    ]
  },
  "courseName": "Accounting (Joint Honours)",
  "courseLink": "https://registration.derby.ac.uk/psp/HPRDOLA2/EMPLOYEE/EMPL/h/?tab=UD_OLA_COURSE_SELECTION&PGR=Y002&PN1=AG",
  "selectedCourseType": "undergraduate"
}
  • Content:
    $('.apply-online-course-list:not(.preselected)').hide();
    $('.apply-online-course-list.preselected select').prop('required',true); 
    $('#courseTypes').change(function(){
        var courseType = $(this).val();
        $('.apply-online-course-list').hide();
        $('.apply-online-course-list select').removeAttr('required');
        $('#' + courseType + '-apply-online-course-list').show();
        $('#' + courseType + '-apply-online-course-list select').prop('required',true); 
    });
    
    $('#apply-online-form').submit(function(e){
        e.preventDefault();
    
        var sectionId = $('.apply-online-course-select:visible option:selected').val(),
        programCode = $('.apply-online-course-select:visible option:selected').attr('data-program-code'),
        jointHonoursCode = $('.apply-online-course-select:visible option:selected').attr('data-joint-honours-code'),
        url = 'https://registration.derby.ac.uk/psp/HPRDOLA2/EMPLOYEE/EMPL/h/?tab=UD_OLA_COURSE_SELECTION&PGR=' + programCode;
    
        // if the program code doesn't contain a comma or a pipe we can go straight to the portal...
        // else we need to refresh the page
        if (typeof programCode !== "undefined" && programCode) {
    
            if (programCode.indexOf('|') !== -1 || programCode.indexOf(',') !== -1) {
            	url = '?section_id=' + sectionId;
            }
    
        	if (jointHonoursCode != '') {
    	        url += '&PLN1=' + jointHonoursCode;
    	    }
    	    if (programCode.length > 1) {
    	        window.location.href = url;
    	    }
        }
    });
    
  • URL: /components/raw/apply-online/apply-online.js
  • Filesystem Path: components/components/forms/apply-online/apply-online.js
  • Size: 1.5 KB

Apply online form

This is the form that sits between the website and the application portal. It allows a user to start an application or continue an existing application. In T4 this will use the course XML feed to pull in the required course data.

The fullCourseList is used as a fall back when the user has javascript turned off. This us because all the course data will need to be in a single field when the form submits. By default javascript kicks in when the form submits and reloads/redirects the form depending on what the user has selected.

Properties

  • courseTypes [required, Array of courseType]
  • courseName [optional, string]
  • courseLink [optional, string]
  • selectedCourseType [optional, string]
  • courseLists [required, Array of courseList]
  • fullCourseList [required, fullCourseList]

courseType

  • label [required, string]
  • value [required, string]
  • select [optional, boolean]

courseList

  • divId [required, string]
  • selectId [required, string]
  • name [required, string]
  • changeLabel [required, string]
  • selectLabel [required, string]
  • required [optional, boolean]
  • addtionalClasses [required, string]
  • course [required, Array of course]

fullCourseList

  • selectId [required, string]
  • name [required, string]
  • changeLabel [required, string]
  • selectLabel [required, string]
  • required [optional, boolean]
  • course [required, Array of course]

course

  • label [required, string]
  • value [required, int]
  • dataAttributes [required, Array of dataAttribute]
dataAttribute
  • key [required, string]
  • value [optional, string]