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

Allow people to not input their birthdays. Prevent further whining.

parent ca302831
Branches
No related tags found
No related merge requests found
...@@ -153,7 +153,7 @@ if ($vars['title'] == "Edit profile") { ...@@ -153,7 +153,7 @@ if ($vars['title'] == "Edit profile") {
/* set up various year inputs */ /* set up various year inputs */
var x = 1900, html = ""; var x = 1900, html = '<option value="">--</option>';
var curYear = (new Date()).getFullYear(); var curYear = (new Date()).getFullYear();
var selYear = document.createElement("select"); var selYear = document.createElement("select");
...@@ -537,14 +537,14 @@ if ($vars['title'] == "Edit profile") { ...@@ -537,14 +537,14 @@ if ($vars['title'] == "Edit profile") {
var dob_month = $("input[name=form_data_profile_dob_month]").val(), var dob_month = $("input[name=form_data_profile_dob_month]").val(),
dob_day = $("input[name=form_data_profile_dob_day]").val(); dob_day = $("input[name=form_data_profile_dob_day]").val();
var months = ['January','February','March','April','May','June','July','August','September','October','November','December']; var months = ['January','February','March','April','May','June','July','August','September','October','November','December'];
var monthsHTML = ""; var monthsHTML = '<option value="">--</option>';
for (var i = 0, l = months.length; i < l; i++){ for (var i = 0, l = months.length; i < l; i++){
monthsHTML+= '<option value="' + months[i] + '">' + months[i] + '</option>'; monthsHTML+= '<option value="' + months[i] + '">' + months[i] + '</option>';
} }
$('form input[name=form_data_profile_dob_month]').replaceWith('<select name="form_data_profile_dob_month" class="input-pulldown">'+monthsHTML+'</select>'); $('form input[name=form_data_profile_dob_month]').replaceWith('<select name="form_data_profile_dob_month" class="input-pulldown">'+monthsHTML+'</select>');
$("select[name=form_data_profile_dob_month] option[value=" + dob_month + "]").attr("selected","selected"); $("select[name=form_data_profile_dob_month] option[value=" + dob_month + "]").attr("selected","selected");
var daysHTML = ""; var daysHTML = '<option value="">--</option>';
for (var i = 1, l = 32; i < l; i++){ for (var i = 1, l = 32; i < l; i++){
daysHTML+= '<option value="' + i + '">' + i + '</option>'; daysHTML+= '<option value="' + i + '">' + i + '</option>';
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment