Releasing templates plugin for testing.
authorNik Okuntseff <support@anuko.com>
Fri, 8 Mar 2019 22:42:28 +0000 (22:42 +0000)
committerNik Okuntseff <support@anuko.com>
Fri, 8 Mar 2019 22:42:28 +0000 (22:42 +0000)
WEB-INF/templates/footer.tpl
WEB-INF/templates/plugins.tpl
time.php

index 26443ee..b7c02c7 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.18.55.4847 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.18.56.4848 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
index affbcc1..34c6fc2 100644 (file)
@@ -152,12 +152,10 @@ function handlePluginCheckboxes() {
             <td align="right" nowrap>{$forms.pluginsForm.timesheets.control}</td>
             <td><label for="timesheets">{$i18n.title.timesheets}</label></td>
           </tr>
-{if isTrue('TEMPLATES_DEBUG')}
           <tr>
             <td align="right" nowrap>{$forms.pluginsForm.templates.control}</td>
             <td><label for="templates">{$i18n.title.templates}</label> <span id="templates_config"><a href="templates.php">{$i18n.label.configure}</a></span> <a href="https://www.anuko.com/lp/tt_29.htm" target="_blank">{$i18n.label.what_is_it}</a></td>
           </tr>
-{/if}
           <tr>
             <td colspan="2">&nbsp;</td>
           </tr>
index dd219e8..4f0d591 100644 (file)
--- a/time.php
+++ b/time.php
@@ -304,6 +304,10 @@ if ($request->isPost()) {
         $err->add($i18n->get('error.field'), $i18n->get('label.duration'));
     }
     if (!ttValidString($cl_note, true)) $err->add($i18n->get('error.field'), $i18n->get('label.note'));
+    if ($user->isPluginEnabled('tp') && strpos($cl_note, '%req%') !== false) {
+      // A %req% element is found in note. They have to be replaced by user.
+      $err->add($i18n->get('error.field'), $i18n->get('label.note'));
+    }
     if (!ttTimeHelper::canAdd()) $err->add($i18n->get('error.expired'));
     // Finished validating user input.