X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=group_edit.php;h=8c7012a50e7b9411e8d9a5bda5a017b32b10466d;hb=a9d5914d51687f6f760b9c0e72fc4e99101f2830;hp=91b2b68cb618960f44623a5838c4a9cc4cda871c;hpb=b262cc9f78e50e6910fefc1744782ddd64bbccda;p=timetracker.git diff --git a/group_edit.php b/group_edit.php index 91b2b68c..8c7012a5 100644 --- a/group_edit.php +++ b/group_edit.php @@ -75,6 +75,7 @@ if ($request->isPost()) { $cl_locking = $request->getParameter('locking'); $cl_quotas = $request->getParameter('quotas'); $cl_week_view = $request->getParameter('week_view'); + $cl_work_units = $request->getParameter('work_units'); } else { $cl_group = $user->group; $cl_currency = ($user->currency == ''? CURRENCY_DEFAULT : $user->currency); @@ -109,6 +110,7 @@ if ($request->isPost()) { $cl_locking = in_array('lk', $plugins); $cl_quotas = in_array('mq', $plugins); $cl_week_view = in_array('wv', $plugins); + $cl_work_units = in_array('wu', $plugins); } $form = new Form('groupForm'); @@ -145,8 +147,8 @@ $DATE_FORMAT_OPTIONS = array( $form->addInput(array('type'=>'combobox','name'=>'date_format','style'=>'width: 150px;','data'=>$DATE_FORMAT_OPTIONS,'datakeys'=>array('id','name'),'value'=>$cl_date_format, 'onchange'=>'MakeFormatPreview("date_format_preview", this);')); $TIME_FORMAT_OPTIONS = array( - array('id'=>'%H:%M','name'=>$i18n->get('form.profile.24_hours')), - array('id'=>'%I:%M %p','name'=>$i18n->get('form.profile.12_hours'))); + array('id'=>'%H:%M','name'=>$i18n->get('form.group_edit.24_hours')), + array('id'=>'%I:%M %p','name'=>$i18n->get('form.group_edit.12_hours'))); $form->addInput(array('type'=>'combobox','name'=>'time_format','style'=>'width: 150px;','data'=>$TIME_FORMAT_OPTIONS,'datakeys'=>array('id','name'),'value'=>$cl_time_format, 'onchange'=>'MakeFormatPreview("time_format_preview", this);')); @@ -162,18 +164,18 @@ $form->addInput(array('type'=>'checkbox','name'=>'show_holidays','value'=>$cl_sh // Prepare tracking mode choices. $tracking_mode_options = array(); -$tracking_mode_options[MODE_TIME] = $i18n->get('form.profile.mode_time'); -$tracking_mode_options[MODE_PROJECTS] = $i18n->get('form.profile.mode_projects'); -$tracking_mode_options[MODE_PROJECTS_AND_TASKS] = $i18n->get('form.profile.mode_projects_and_tasks'); +$tracking_mode_options[MODE_TIME] = $i18n->get('form.group_edit.mode_time'); +$tracking_mode_options[MODE_PROJECTS] = $i18n->get('form.group_edit.mode_projects'); +$tracking_mode_options[MODE_PROJECTS_AND_TASKS] = $i18n->get('form.group_edit.mode_projects_and_tasks'); $form->addInput(array('type'=>'combobox','name'=>'tracking_mode','style'=>'width: 150px;','data'=>$tracking_mode_options,'value'=>$cl_tracking_mode,'onchange'=>'handleTaskRequiredCheckbox()')); $form->addInput(array('type'=>'checkbox','name'=>'project_required','value'=>$cl_project_required)); $form->addInput(array('type'=>'checkbox','name'=>'task_required','value'=>$cl_task_required)); // Prepare record type choices. $record_type_options = array(); -$record_type_options[TYPE_ALL] = $i18n->get('form.profile.type_all'); -$record_type_options[TYPE_START_FINISH] = $i18n->get('form.profile.type_start_finish'); -$record_type_options[TYPE_DURATION] = $i18n->get('form.profile.type_duration'); +$record_type_options[TYPE_ALL] = $i18n->get('form.group_edit.type_all'); +$record_type_options[TYPE_START_FINISH] = $i18n->get('form.group_edit.type_start_finish'); +$record_type_options[TYPE_DURATION] = $i18n->get('form.group_edit.type_duration'); $form->addInput(array('type'=>'combobox','name'=>'record_type','style'=>'width: 150px;','data'=>$record_type_options,'value'=>$cl_record_type)); // Punch mode checkbox. @@ -207,6 +209,8 @@ $form->addInput(array('type'=>'checkbox','name'=>'notifications','value'=>$cl_no $form->addInput(array('type'=>'checkbox','name'=>'locking','value'=>$cl_locking,'onchange'=>'handlePluginCheckboxes()')); $form->addInput(array('type'=>'checkbox','name'=>'quotas','value'=>$cl_quotas,'onchange'=>'handlePluginCheckboxes()')); $form->addInput(array('type'=>'checkbox','name'=>'week_view','value'=>$cl_week_view,'onchange'=>'handlePluginCheckboxes()')); +$form->addInput(array('type'=>'checkbox','name'=>'work_units','value'=>$cl_work_units,'onchange'=>'handlePluginCheckboxes()')); + $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); if ($user->can('delete_group')) $form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get('button.delete'))); @@ -223,7 +227,7 @@ if ($request->isPost()) { if (!ttValidString($cl_currency, true)) $err->add($i18n->get('error.field'), $i18n->get('label.currency')); if ($advanced_settings) { if (!ttValidEmail($cl_bcc_email, true)) $err->add($i18n->get('error.field'), $i18n->get('label.bcc')); - if (!ttValidIP($cl_allow_ip, true)) $err->add($i18n->get('error.field'), $i18n->get('form.profile.allow_ip')); + if (!ttValidIP($cl_allow_ip, true)) $err->add($i18n->get('error.field'), $i18n->get('form.group_edit.allow_ip')); } // Finished validating user input. @@ -253,6 +257,8 @@ if ($request->isPost()) { $plugins .= ',mq'; if ($cl_week_view) $plugins .= ',wv'; + if ($cl_work_units) + $plugins .= ',wu'; // Recycle week view plugin options as they are not configured on this page. $existing_plugins = explode(',', $user->plugins);