From c5cf6bb2e2a4dde9a75adb69dd9a1d8a3b66000b Mon Sep 17 00:00:00 2001 From: sam_marshall Date: Wed, 28 Jan 2009 12:11:32 +0000 Subject: [PATCH] MDL-17974: Calendar 'new entry' accessibility improvement --- calendar/event_new.html | 17 +++++++++-------- lib/weblib.php | 37 ++++++++++++++++++++++++++++++++----- 2 files changed, 41 insertions(+), 13 deletions(-) diff --git a/calendar/event_new.html b/calendar/event_new.html index 2e094f3820..e9cb1c834a 100644 --- a/calendar/event_new.html +++ b/calendar/event_new.html @@ -5,18 +5,18 @@
- + - + @@ -77,8 +78,8 @@ - - + + diff --git a/lib/weblib.php b/lib/weblib.php index fca6e2c25a..f67d806789 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -5464,10 +5464,24 @@ function print_date_selector($day, $month, $year, $currenttime=0, $return=false) for ($i=1970; $i<=2020; $i++) { $years[$i] = $i; } - return choose_from_menu($days, $day, $currentdate['mday'], '', '', '0', $return) - .choose_from_menu($months, $month, $currentdate['mon'], '', '', '0', $return) - .choose_from_menu($years, $year, $currentdate['year'], '', '', '0', $return); + // Build or print result + $result=''; + // Note: There should probably be a fieldset around these fields as they are + // clearly grouped. However this causes problems with display. See Mozilla + // bug 474415 + $result.=''; + $result.=choose_from_menu($days, $day, $currentdate['mday'], '', '', '0', true); + $result.=''; + $result.=choose_from_menu($months, $month, $currentdate['mon'], '', '', '0', true); + $result.=''; + $result.=choose_from_menu($years, $year, $currentdate['year'], '', '', '0', true); + + if ($return) { + return $result; + } else { + echo $result; + } } /** @@ -5495,8 +5509,21 @@ function print_time_selector($hour, $minute, $currenttime=0, $step=5, $return=fa $minutes[$i] = sprintf("%02d",$i); } - return choose_from_menu($hours, $hour, $currentdate['hours'], '','','0',$return) - .choose_from_menu($minutes, $minute, $currentdate['minutes'], '','','0',$return); + // Build or print result + $result=''; + // Note: There should probably be a fieldset around these fields as they are + // clearly grouped. However this causes problems with display. See Mozilla + // bug 474415 + $result.=''; + $result.=choose_from_menu($hours, $hour, $currentdate['hours'], '','','0',true); + $result.=''; + $result.=choose_from_menu($minutes, $minute, $currentdate['minutes'], '','','0',true); + + if ($return) { + return $result; + } else { + echo $result; + } } /** -- 2.39.5
+ - +
+ description); @@ -55,8 +55,9 @@
duration == 2) echo 'checked="checked"'; ?>/> - + +