Skip to content
Snippets Groups Projects
Commit 1a617c8a authored by Seth Meranda's avatar Seth Meranda
Browse files

Reimplement all the JS functionality on the second application page.

parent bed2b4df
No related tags found
No related merge requests found
......@@ -157,6 +157,7 @@
margin-right: 5%;
margin-bottom: 5%;
}
#maincontent .stuapp .date_range_set.tri div { width:20%; }
#maincontent .stuapp .date_range_set:last-child div {
margin-bottom: 0;
}
......
......@@ -105,6 +105,7 @@ WDN.jQuery('document').ready(function($){
$('input[name="citizenflag"]').val('U');
$('#ssn1').addClass('required-entry');
});
$('#englishLangYes').change(function(){
$('input[name="English_as_First_Lang"]').val('Y');
$('#native_lang').hide().attr({'aria-expanded' : 'false'});
......@@ -117,6 +118,93 @@ WDN.jQuery('document').ready(function($){
$('#native_lang input').addClass('required-entry').eq(0).focus();
$('#native_lang label').addClass('required');
});
$('#currentEnrollClgYes').change(function(){
$('input[name="Current_Enrolled_Elsewhere"]').val('Y');
$('#current_college').show().attr({'aria-expanded' : 'true'});
$('#current_college input').addClass('required-entry').eq(0).focus();
$('#current_college label').addClass('required');
});
$('#currentEnrollClgNo').change(function(){
$('input[name="Current_Enrolled_Elsewhere"]').val('N');
$('#current_college').hide().attr({'aria-expanded' : 'false'});
$('#current_college input').removeClass('required-entry');
$('#current_college label').removeClass('required');
});
$('#familyAlumniYes').change(function(){
$('#family_alums').show().attr({'aria-expanded' : 'true'});
$('#family_alums input[type="text"]').addClass('required-entry').eq(0).focus();
$('#family_alums legend').addClass('required');
});
$('#familyAlumniNo').change(function(){
$('#family_alums').hide().attr({'aria-expanded' : 'false'});
$('#family_alums input[type="text"]').removeClass('required-entry');
$('#family_alums legend').removeClass('required');
});
$('#bachelorsYes').change(function(){
$('input[name="Received_Bachelors"]').val('Y');
$('#bc_college, #bc_college_info, #bc_alert').show().attr({'aria-expanded' : 'true'});
$('#bc_college input[type="text"]').addClass('required-entry').eq(0).focus();
$('#bc_college label').addClass('required');
});
$('#bachelorsNo').change(function(){
$('input[name="Received_Bachelors"]').val('N');
$('#bc_college, #bc_college_info, #bc_alert').hide().attr({'aria-expanded' : 'false'});
$('#bc_college input[type="text"]').removeClass('required-entry');
$('#bc_college label').removeClass('required');
});
$('#americanIndian').click(function(){
if($(this).is(':checked')){
$('#tribalInput').show().attr({'aria-expanded' : 'true'});
} else {
$('#tribalInput').hide().attr({'aria-expanded' : 'false'});
}
});
$('#persStmntYes').change(function(){
$('#personal_statement_wrapper').show().attr({'aria-expanded' : 'true'}).find('textarea').focus();
});
$('#persStmntNo').change(function(){
$('#personal_statement_wrapper').hide().attr({'aria-expanded' : 'false'});
});
$('#application_fee input').change(function(){
$('input[name="Application_Fee"]').val($(this).val());
if ($(this).val() == "WV"){
$('#system_school').show();
$('#system_school').html(
'<label for="Previously_Attended_Campus">Select the campus attended/applied<label>'
+ '<select name="Previously_Attended_Campus" id="Previously_Attended_Campus" class="required" >'
+ ' <option value="" ></option>'
+ ' <option value="UK">University of Nebraska-Kearney</option>'
+ ' <option value="UO">University of Nebraska-Omaha</option>'
+ ' <option value="WV">University of Nebraska-Lincoln</option>'
+ ' <option value="UM">University of Nebraska-Medical Center</option>'
+ '</select>'
+ '<fieldset>'
+ '<legend class="required">What date did you pay your application fee?</legend>'
+ '<fieldset class="date_range_set tri"><legend>Date Range (mm/dd/yyyy)</legend>'
+ '<div><label for="Previously_Attended_month">Month</label><input type="text" name="Previously_Attended_month" id="Previously_Attended_month" value="" maxlength="2" onchange="validDateMonth(this);" /></div>'
+ '<div><label for="Previously_Attended_day">Day</label><input type="text" name="Previously_Attended_day" id="Previously_Attended_day" value="" maxlength="2" onchange="validDateDay(this);" /></div>'
+ '<div><label for="Previously_Attended_year">Year</label><input type="text" name="Previously_Attended_year" id="Previously_Attended_year" value="" maxlength="4" onchange="validDateYear(this);" /></div>'
+ '</fieldset> '
);
}
else {
$('#system_school').hide();
$('#system_school').html(" " +
+ '<input type="hidden" name="Previously_Attended_Campus"> '
+ '<input type="hidden" name="Previously_Attended_month"> '
+ '<input type="hidden" name="Previously_Attended_day"> '
+ '<input type="hidden" name="Previously_Attended_year"> '
);
}
});
// The form validation places the helper at the bottom of the input's parent element. This doesn't work quite right for input siblings, so we'll have to wrap some of them.
$('select, input').each(function(){
if($(this).next('label').length > 0){
......
......@@ -365,6 +365,8 @@
+ '<input type="hidden" name="comments"> ';
}
}
var hiddenAreas = ['#current_college', '#bc_college', '#bc_alert', '#bc_college_info', '#tribalInput', '#family_alums', '#personal_statement_wrapper', '#system_school'];
</script>
<!-- TemplateEndEditable -->
<!-- variables used by colleges.jspf -->
......@@ -428,7 +430,7 @@
<ol>
<li>
<label for="acadProg" class="required">Academic Program <span class="helperText">Please select the undergraduate program to which you are applying or <em>Undeclared - GEN-U</em> if you are not sure.</span></label>
<select id="acadProg" name="Undergraduate_Program" required>
<select id="acadProg" name="Undergraduate_Program" required autofocus>
<c:choose>
<c:when test='${ugApp.appClgDegMaj == ""}'>
<c:forEach items="${progPlanRec}" var="progPlanRec">
......@@ -519,10 +521,10 @@
<fieldset>
<legend class="required">Are you currently enrolled at another college or university?</legend>
<label for="currentEnrollClgYes">
<input required type="radio" id="currentEnrollClgYes" name="curr_enroll_clg" value="Y" <c:if test="${ugApp.currEnrollClg=='Y'}"> checked </c:if> onclick="document.ugPage2.Current_Enrolled_Elsewhere.value='Y';" /> Yes
<input required type="radio" id="currentEnrollClgYes" name="curr_enroll_clg" value="Y" <c:if test="${ugApp.currEnrollClg=='Y'}"> checked </c:if> /> Yes
</label>
<label for="currentEnrollClgNo">
<input required type="radio" id="currentEnrollClgNo" name="curr_enroll_clg" value="N" <c:if test="${ugApp.currEnrollClg=='N'}"> checked </c:if> onclick="document.ugPage2.Current_Enrolled_Elsewhere.value='N';" /> No
<input required type="radio" id="currentEnrollClgNo" name="curr_enroll_clg" value="N" <c:if test="${ugApp.currEnrollClg=='N'}"> checked </c:if> /> No
</label>
</fieldset>
</li>
......@@ -568,10 +570,10 @@
Have you received a bachelor's degree before?
</legend>
<label for="bachelorsYes">
<input required type="radio" id="bachelorsYes" name="bachelors_degree" value="Y" <c:if test="${ugApp.bachelorsDegree=='Y'}"> checked </c:if> onclick="document.ugPage2.Received_Bachelors.value='Y'; bachelorsDegreeAlert();"/> Yes
<input required type="radio" id="bachelorsYes" name="bachelors_degree" value="Y" <c:if test="${ugApp.bachelorsDegree=='Y'}"> checked </c:if> /> Yes
</label>
<label for="bachelorsNo">
<input required type="radio" id="bachelorsNo" name="bachelors_degree" value="N" <c:if test="${ugApp.bachelorsDegree=='N'}"> checked </c:if> onclick="document.ugPage2.Received_Bachelors.value='N';" /> No
<input required type="radio" id="bachelorsNo" name="bachelors_degree" value="N" <c:if test="${ugApp.bachelorsDegree=='N'}"> checked </c:if> /> No
</label>
</fieldset>
</li>
......@@ -595,8 +597,11 @@
</fieldset>
</li>
</ol>
<p id="bc_alert">To ensure that you are completing the appropriate application
please contact the office of Graduate Admissions at (402) 472-2878
to verify that a Second Undergraduate Degree is appropriate for you.</p>
</fieldset>
<aside class="grid4">
<aside class="grid4" id="bc_college_info">
<p>
We must receive official final transcripts from every institution (high schools and colleges)
you have attended to date (other than University of Nebraska-Lincoln).
......@@ -717,7 +722,7 @@
</label>
</fieldset>
</li>
<li>
<li id="family_alums">
<fieldset>
<legend>Which members of your family? (choose all that apply)</legend>
<label for="alumniFather">
......
<!-- **** applicationfee.jspf **** -->
<script type="text/Javascript">
// ************************************************************************
// (re)set required fields when previously attended UNL
// ************************************************************************
function setPrevAttendUnl(frm, setFlg) {
frm.Previously_Attended_Campus.required=setFlg;
frm.Previously_Attended_month.required=setFlg;
frm.Previously_Attended_day.required=setFlg;
frm.Previously_Attended_year.required=setFlg;
// if (!setFlg){
// frm.Previously_Attended_Campus.className="normaltxt";
// frm.Previously_Attended_month.className="normaltxt";
// frm.Previously_Attended_day.className="normaltxt";
// frm.Previously_Attended_year.className="normaltxt";
// }
}
// ************************************************************************
// hide or make visible the prev attend fields
// ************************************************************************
function checkFee(fee){
//alert("checkFee=(" + fee + ")");
if (fee == "WV"){
document.getElementById('prevCampus').style.visibility='visible';
document.getElementById('prevCampus').innerHTML=' '
+ '<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
+ 'Select the campus attended/applied to below:'
+ '<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
+ '<select name="Previously_Attended_Campus" size="1" >'
+ ' <option value="" > </option>'
+ ' <option value="UK">University of Nebraska-Kearney</option>'
+ ' <option value="UO">University of Nebraska-Omaha</option>'
+ ' <option value="WV">University of Nebraska-Lincoln</option>'
+ ' <option value="UM">University of Nebraska-Medical Center</option>'
+ '</select>'
+ '<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'
+ '<input type="text" name="Previously_Attended_month" value="" size="2" maxlength="2" onchange="validDateMonth(this);" /> '
+ '<input type="text" name="Previously_Attended_day" value="" size="2" maxlength="2" onchange="validDateDay(this);" /> '
+ '<input type="text" name="Previously_Attended_year" value="" size="4" maxlength="4" onchange="validDateYear(this);" /> '
+ '<span class="sm">(mm/dd/yyyy)</span> '
+ '<br />'
+ '<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /> ';
}
else {
document.getElementById('prevCampus').style.visibility='hidden';
document.getElementById('prevCampus').innerHTML=" " +
+ '<input type="hidden" name="Previously_Attended_Campus"> '
+ '<input type="hidden" name="Previously_Attended_month"> '
+ '<input type="hidden" name="Previously_Attended_day"> '
+ '<input type="hidden" name="Previously_Attended_year"> ';
}
}
</script>
<fieldset class="grid12 first">
<fieldset class="grid12 first" id="application_fee">
<legend>Application Fee</legend>
<ol class="full">
<li>
<fieldset class="long_options">
<legend class="required">Please select an option</legend>
<label for="creditCard">
<input required type="radio" id="creditCard" name="pay_method" value="CC" <c:if test="${ugApp.payMethod=='CC'}"> checked </c:if> onclick="document.ugPage2.Application_Fee.value='CC'; checkFee('CC'); " />
<input required type="radio" id="creditCard" name="pay_method" value="CC" <c:if test="${ugApp.payMethod=='CC'}"> checked </c:if> />
I plan to pay the application fee of $45 with a credit card upon electronic submission of this application.
</label>
<label for="neCampus">
<input required type="radio" id="neCampus" name="pay_method" value="WV" <c:if test="${ugApp.payMethod=='WV'}"> checked </c:if> onclick="document.ugPage2.Application_Fee.value='WV'; checkFee('WV'); setPrevAttendUnl(document.ugPage2, true);" />
<input required type="radio" id="neCampus" name="pay_method" value="WV" <c:if test="${ugApp.payMethod=='WV'}"> checked </c:if> />
I have previously attended UNL or have applied and paid my application fee in the last 12 months at a University of Nebraska campus; therefore I do not need to submit an application fee to UNL.
</label>
<c:choose>
<c:when test='${appType == "F"}'>
<label for="feeWaiver">
<input required type="radio" id="feeWaiver" name="pay_method" value="ND" <c:if test="${ugApp.payMethod=='ND'}"> checked </c:if> onclick="document.ugPage2.Application_Fee.value='ND'; checkFee('ND'); "/>
<input required type="radio" id="feeWaiver" name="pay_method" value="ND" <c:if test="${ugApp.payMethod=='ND'}"> checked </c:if> />
<a onclick="feeWaivedAlert()">
I am applying to have my application fee waived based upon documented financial need.
</a>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment