fix calendar preferences to show start- and end-time of day

This commit is contained in:
Ralf Becker 2016-05-03 13:24:21 +00:00
parent c3482510b6
commit e5d6f6a909
2 changed files with 4 additions and 3 deletions

View File

@ -716,11 +716,12 @@ class Select extends Etemplate\Widget
break;
case 'select-hour':
$minutes = !$type2 ? ':00' : '';
for ($h = 0; $h <= 23; ++$h)
{
$options[$h] = $GLOBALS['egw_info']['user']['preferences']['common']['timeformat'] == 12 ?
(($h % 12 ? $h % 12 : 12).' '.($h < 12 ? lang('am') : lang('pm'))) :
sprintf('%02d',$h);
(($h % 12 ? $h % 12 : 12).$minutes.' '.($h < 12 ? lang('am') : lang('pm'))) :
sprintf('%02d',$h).$minutes;
}
$no_lang = True;
break;

View File

@ -157,7 +157,7 @@ class calendar_hooks
if (!isset($hook_data['setup']))
{
$times = Api\Etemplate\Widget\Select::typeOptions('select-time', '');
$times = Api\Etemplate\Widget\Select::typeOptions('select-hour', '');
}
for ($i = 2; $i <= 4; ++$i)
{