Made group name mandatory for subgroup support.
authorNik Okuntseff <support@anuko.com>
Fri, 23 Nov 2018 19:14:59 +0000 (19:14 +0000)
committerNik Okuntseff <support@anuko.com>
Fri, 23 Nov 2018 19:14:59 +0000 (19:14 +0000)
WEB-INF/lib/ttAdmin.class.php
WEB-INF/lib/ttRegistrator.class.php
WEB-INF/templates/admin_group_add.tpl
WEB-INF/templates/admin_group_edit.tpl
WEB-INF/templates/footer.tpl
WEB-INF/templates/group_edit.tpl
WEB-INF/templates/register.tpl
group_edit.php

index a2388ed..747274f 100644 (file)
@@ -198,7 +198,7 @@ class ttAdmin {
 
     $result = true;
 
-    if (!ttValidString($fields['group_name'], true)) {
+    if (!ttValidString($fields['new_group_name'])) {
       $this->err->add($i18n->get('error.field'), $i18n->get('label.group_name'));
       $result = false;
     }
index 8e75583..77ffb6b 100644 (file)
@@ -67,7 +67,7 @@ class ttRegistrator {
   function validate() {
     global $i18n;
 
-    if (!ttValidString($this->group_name, true))
+    if (!ttValidString($this->group_name))
       $this->err->add($i18n->get('error.field'), $i18n->get('label.group_name'));
     if (!ttValidString($this->currency, true))
       $this->err->add($i18n->get('error.field'), $i18n->get('label.currency'));
index fd671e9..029b525 100644 (file)
@@ -4,7 +4,7 @@
     <td>
       <table cellspacing="1" cellpadding="2" border="0">
         <tr>
-          <td align="right" nowrap>{$i18n.label.group_name}:</td>
+          <td align="right" nowrap>{$i18n.label.group_name} (*):</td>
           <td>{$forms.groupForm.group_name.control}</td>
         </tr>
         <tr>
index 4c52580..70443e3 100644 (file)
@@ -4,7 +4,7 @@
     <td>
       <table cellspacing="1" cellpadding="2" border="0">
         <tr>
-          <td align="right" nowrap>{$i18n.label.group_name}:</td>
+          <td align="right" nowrap>{$i18n.label.group_name} (*):</td>
           <td>{$forms.groupForm.group_name.control}</td>
         </tr>
         <tr><td>&nbsp;</td></tr>
index 161df02..ec0063a 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.27.4503 | 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.27.4504 | 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 d159448..8ccb258 100644 (file)
@@ -28,7 +28,7 @@ function handleTaskRequiredCheckbox() {
         <table cellspacing="1" cellpadding="2" border="0">
 {if $user->can('manage_basic_settings')}
           <tr>
-            <td align="right" nowrap>{$i18n.label.group_name}:</td>
+            <td align="right" nowrap>{$i18n.label.group_name} (*):</td>
             <td>{$forms.groupForm.group_name.control}</td>
           </tr>
           <tr>
@@ -109,6 +109,10 @@ function handleTaskRequiredCheckbox() {
             <td align="right" nowrap>{$i18n.form.group_edit.allow_ip}:</td>
             <td>{$forms.groupForm.allow_ip.control} <a href="https://www.anuko.com/lp/tt_21.htm" target="_blank">{$i18n.label.what_is_it}</a></td>
           </tr>
+          <tr>
+            <td></td>
+            <td>{$i18n.label.required_fields}</td>
+          </tr>
   {/if}
           {* initialize preview text *}
           <script>
index 9668779..3d7678a 100644 (file)
@@ -4,7 +4,7 @@
     <td>
       <table cellspacing="1" cellpadding="2" border="0">
         <tr>
-          <td align="right" nowrap>{$i18n.label.group_name}:</td>
+          <td align="right" nowrap>{$i18n.label.group_name} (*):</td>
           <td>{$forms.groupForm.group_name.control}</td>
         </tr>
         <tr>
index 77ddc61..84c66df 100644 (file)
@@ -191,7 +191,7 @@ if ($request->isPost()) {
   }
 
   // Validate user input.
-  if (!ttValidString($cl_group, true)) $err->add($i18n->get('error.field'), $i18n->get('label.group_name'));
+  if (!ttValidString($cl_group)) $err->add($i18n->get('error.field'), $i18n->get('label.group_name'));
   if (!ttValidString($cl_description, true)) $err->add($i18n->get('error.field'), $i18n->get('label.description'));
   if (!ttValidString($cl_currency, true)) $err->add($i18n->get('error.field'), $i18n->get('label.currency'));
   if ($advanced_settings) {