X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=profile_edit.php;h=5839c7e0f2c1bebafc57e3fa266d93b9f41226f4;hb=a215f8b83c542b031bec3131d26a225fa1e27aae;hp=6d82bf78324301c1551aecdad0cef6126463842a;hpb=f2787a0b448c84ee7b28de80f6c2f04dfc7985ad;p=timetracker.git diff --git a/profile_edit.php b/profile_edit.php index 6d82bf78..5839c7e0 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -207,9 +207,7 @@ if ($user->canManageTeam()) { $form->addInput(array('type'=>'checkbox','name'=>'notifications','value'=>$cl_notifications,'onchange'=>'handlePluginCheckboxes()')); $form->addInput(array('type'=>'checkbox','name'=>'locking','value'=>$cl_locking,'onchange'=>'handlePluginCheckboxes()')); $form->addInput(array('type'=>'checkbox','name'=>'quotas','value'=>$cl_quotas,'onchange'=>'handlePluginCheckboxes()')); - if (defined('WEEK_VIEW_DEBUG') && isTrue(WEEK_VIEW_DEBUG)) { - $form->addInput(array('type'=>'checkbox','name'=>'week_view','value'=>$cl_week_view)); - } + $form->addInput(array('type'=>'checkbox','name'=>'week_view','value'=>$cl_week_view,'onchange'=>'handlePluginCheckboxes()')); } $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->getKey('button.save'))); @@ -268,6 +266,16 @@ if ($request->isPost()) { $plugins .= ',mq'; if ($cl_week_view) $plugins .= ',wv'; + + // Recycle week view plugin options as they are not configured on this page. + $existing_plugins = explode(',', $user->plugins); + if (in_array('wvn', $existing_plugins)) + $plugins .= ',wvn'; + if (in_array('wvl', $existing_plugins)) + $plugins .= ',wvl'; + if (in_array('wvns', $existing_plugins)) + $plugins .= ',wvns'; + $plugins = trim($plugins, ','); $update_result = ttTeamHelper::update($user->team_id, array(