Skip to content
Snippets Groups Projects
Commit f23188f6 authored by Matthew Juhl's avatar Matthew Juhl
Browse files

Fix alumni opt-in input

parent cd1e9b07
No related branches found
No related tags found
No related merge requests found
/*<script type="text/javascript">*/
(function(){
// Edit Profile Stuff
function updateLL () {
......@@ -52,7 +53,7 @@
color: "#1091D1"
});
});
$("form.cool fieldset input, form.cool fieldset select").wrap('<div class="element"></div>');
$("form.cool fieldset input[type!=submit], form.cool fieldset select").wrap('<div class="element"></div>');
$("form.cool label div").each(function(){
$(this).insertAfter($(this).parent());
});
......@@ -475,6 +476,25 @@
$("select[name=form_data_profile_dob_day] option[value=" + dob_day + "]").attr("selected","selected");
WDN.log("Opt in value...... " + $("input[name=form_data_info_alumni_opt_in]").val());
var alumniOptIn = $("input[name=form_data_info_alumni_opt_in]").val();
$("input[name=form_data_info_alumni_opt_in]").replaceWith('<input type="checkbox" name="form_data_info_alumni_opt_in" value="yes" />');
if (alumniOptIn == "yes"){
$("input[name=form_data_info_alumni_opt_in]").attr("checked","checked");
}
function alumniCheckbox () {
if ($("select[name=form_data_profile_role]").val() == "Alumnus") {
$("input[name=form_data_info_alumni_opt_in]").parent().parent().show();
} else {
$("input[name=form_data_info_alumni_opt_in]").parent().parent().hide();
}
};
alumniCheckbox();
$("select[name=form_data_profile_role]").change(alumniCheckbox);
$("#formloading").remove();
$("#maincontent form.cool").show();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment