From: Nik Okuntseff Date: Fri, 15 Mar 2019 17:59:18 +0000 (+0000) Subject: Starting to work on attachments plugin. X-Git-Tag: timetracker_1.19-1~172 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=91625ebaee1dcc6ca4af8aef0df4156817ac411b;p=timetracker.git Starting to work on attachments plugin. --- diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index db04f818..9fd6995b 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -238,6 +238,7 @@ $i18n_key_words = array( 'label.approval' => 'Report approval', 'label.mark_approved' => 'Mark approved', 'label.template' => 'Template', +'label.attachments' => 'Attachments', // Form titles. 'title.error' => 'Error', diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 95188008..62ae7a5c 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- +{if isTrue('FILES_DEBUG')} + + + + +{/if} diff --git a/plugins.php b/plugins.php index 5880aa37..1c0a076b 100644 --- a/plugins.php +++ b/plugins.php @@ -54,6 +54,7 @@ if ($request->isPost()) { $cl_approval = $request->getParameter('approval'); $cl_timesheets = $request->getParameter('timesheets'); $cl_templates = $request->getParameter('templates'); + $cl_attachments = $request->getParameter('attachments'); } else { // Note: we get here in get, and also in post when group changes. // Which plugins do we have enabled in currently selected group? @@ -74,6 +75,7 @@ if ($request->isPost()) { $cl_approval = in_array('ap', $plugins); $cl_timesheets = in_array('ts', $plugins); $cl_templates = in_array('tp', $plugins); + $cl_attachments = in_array('at', $plugins); } $form = new Form('pluginsForm'); @@ -95,6 +97,7 @@ $form->addInput(array('type'=>'checkbox','name'=>'work_units','value'=>$cl_work_ $form->addInput(array('type'=>'checkbox','name'=>'approval','value'=>$cl_approval)); $form->addInput(array('type'=>'checkbox','name'=>'timesheets','value'=>$cl_timesheets)); $form->addInput(array('type'=>'checkbox','name'=>'templates','value'=>$cl_templates,'onchange'=>'handlePluginCheckboxes()')); +$form->addInput(array('type'=>'checkbox','name'=>'attachments','value'=>$cl_attachments,'onchange'=>'handlePluginCheckboxes()')); // Submit button. $form->addInput(array('type'=>'submit','name'=>'btn_save','value'=>$i18n->get('button.save'))); @@ -136,6 +139,8 @@ if ($request->isPost()) { $plugins .= ',ts'; if ($cl_templates) $plugins .= ',tp'; + if ($cl_attachments) + $plugins .= ',at'; // Recycle week view plugin options as they are not configured on this page. $existing_plugins = explode(',', $user->getPlugins());
 Anuko Time Tracker 1.18.58.4868 | Copyright © Anuko | +  Anuko Time Tracker 1.18.58.4869 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/plugins.tpl b/WEB-INF/templates/plugins.tpl index 18352252..6dfd9d24 100644 --- a/WEB-INF/templates/plugins.tpl +++ b/WEB-INF/templates/plugins.tpl @@ -158,6 +158,12 @@ function handlePluginCheckboxes() { {$forms.pluginsForm.templates.control} {$i18n.label.configure} {$i18n.label.what_is_it}
{$forms.pluginsForm.attachments.control} {$i18n.label.what_is_it}