From 23651f92f15874443d98dd1072802f575b2d1aa6 Mon Sep 17 00:00:00 2001 From: Matthew Juhl <mjuhl24@gmail.com> Date: Mon, 17 May 2010 19:33:33 +0000 Subject: [PATCH] Setup for the college selector field. --- .../scripts/JS/enhanceProfileForm.php | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/plugins/unl_theme/scripts/JS/enhanceProfileForm.php b/plugins/unl_theme/scripts/JS/enhanceProfileForm.php index b10e7ead..bd5236ea 100644 --- a/plugins/unl_theme/scripts/JS/enhanceProfileForm.php +++ b/plugins/unl_theme/scripts/JS/enhanceProfileForm.php @@ -416,6 +416,28 @@ } $('form select[name=form_data_profile_role] option[value='+unlrole+']').attr('selected','selected'); + + /********* College selector */ + + var collegeName = $('form input[name=form_data_profile_college]').val(); + + $('form input[name=form_data_profile_college]').replaceWith('<select id="collegeSelector" name="form_data_profile_college" class="input-pulldown">'+ + '<option value=""></option>' + + '<option value="Agricultural Sciences and Natural Resources">Agricultural Sciences and Natural Resources</option>'+ + '<option value="Architecture">Architecture</option>'+ + '<option value="Arts and Sciences">Arts and Sciences</option>'+ + '<option value="Business Administration">Business Administration</option>'+ + '<option value="Education and Human Sciences">Education and Human Sciences</option>'+ + '<option value="Engineering">Engineering</option>'+ + '<option value="Hixson-Lied College of Fine and Performing Arts">Hixson-Lied College of Fine and Performing Arts</option>'+ + '<option value="Human Resources and Family Sciences">Human Resources and Family Sciences</option>'+ + '<option value="Journalism and Mass Communications">Journalism and Mass Communications</option>'+ + '<option value="Law">Law</option>'+ + '<option value="Teachers College">Teachers College</option>'+ + '</select>'); + + $("#collegeSelector option[value=" + collegeName + "]").attr("selected","selected"); + /********* Hide and Change Labels */ $("label[for='form_data_profile_city']").html('Your Map Location <span class="helper">Please enter the location you want to use for yourself on the map.</span>'); $("label[for='form_data_profile_state']").remove(); -- GitLab