[Tickets #3218] NEW: hourminutesecond form incorrectly shows '00' selected for blank dates
bugs@bugs.horde.org
bugs at bugs.horde.org
Wed Jan 4 02:36:26 PST 2006
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/?id=3218
-----------------------------------------------------------------------
Ticket | 3218
Created By | robin at rainton.com
Summary | hourminutesecond form incorrectly shows '00' selected for blank dates
Queue | Horde Framework Packages
Version | HEAD
State | Unconfirmed
Priority | 2. Medium
Type | Bug
Owners |
-----------------------------------------------------------------------
robin at rainton.com (2006-01-04 02:36) wrote:
If one simply creates an hourminutesecond input, but does not assign
variables one would expect the inputs to appear with 2 drop downs, one with
'hh' selected, and the other 'mm'.
This isn't the case - '00' shows in both dropdowns.
Around line 362 of UI/VarRenderer/html.php we see this:
$html = sprintf('<select name="%s[hour]"
id="%s[hour]"%s>%s</select>',
$varname,
$varname,
$this->_selectOptions($hours, sprintf('%02d',
$time['hour'])),
$this->_getActionScripts($form, $var));
The sprintf of $time['hour'] is causing a blank value of hour to be
converted to '00' and hence 'hh' (represented in the dropdown by blank) is
never shown).
Minutes are affected in the same way.
More information about the bugs
mailing list