Started to use shorter functions of the Errors class
authorNik Okuntseff <support@anuko.com>
Tue, 22 Mar 2016 00:00:09 +0000 (17:00 -0700)
committerNik Okuntseff <support@anuko.com>
Tue, 22 Mar 2016 00:00:09 +0000 (17:00 -0700)
WEB-INF/templates/footer.tpl
WEB-INF/templates/mobile/header.tpl
admin_team_add.php
cf_custom_field_add.php
cf_custom_field_delete.php
cf_custom_field_edit.php

index 67cb939..f954392 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.9.16.3429 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.9.16.3430 | 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 5b4d1fd..a2b2311 100644 (file)
@@ -55,7 +55,7 @@
       <!-- End of top image -->
 
       <!-- Output errors -->
-{if !$errors->isEmpty()}
+{if $errors->yes()}
       <table cellspacing="4" cellpadding="7" width="{$tab_width}" border="0">
         <tr>
           <td class="error">
index 3ce0e66..5ece36d 100644 (file)
@@ -71,7 +71,7 @@ if ($request->getMethod() == 'POST') {
   }
   if (!ttValidEmail($cl_manager_email, true)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.email'));
 
-  if ($errors->isEmpty()) {
+  if ($errors->no()) {
     if (!ttUserHelper::getUserByLogin($cl_manager_login)) {
       // Create a new team.
       if (!defined('CURRENCY_DEFAULT')) define('CURRENCY_DEFAULT', '$');
index 056ce53..a505305 100644 (file)
@@ -57,7 +57,7 @@ if ($request->getMethod() == 'POST') {
   // Validate user input.
   if (!ttValidString($cl_field_name)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.thing_name'));
 
-  if ($errors->isEmpty()) {
+  if ($errors->no()) {
     $res = CustomFields::insertField($cl_field_name, $cl_field_type, $cl_required);
     if ($res) {
       header('Location: cf_custom_fields.php');
index 78cd380..139253d 100644 (file)
@@ -60,7 +60,7 @@ if ($request->getMethod() == 'POST') {
   if (false === $field)
     $errors->add($i18n->getKey('error.db'));
 
-  if ($errors->isEmpty()) {
+  if ($errors->no()) {
     $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$id));
     $form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->getKey('label.delete')));
     $form->addInput(array('type'=>'submit','name'=>'btn_cancel','value'=>$i18n->getKey('button.cancel')));
index 15146db..b6a1f46 100644 (file)
@@ -42,7 +42,7 @@ if (false === $field)
   $errors->add($i18n->getKey('error.db'));
 
 $form = new Form('fieldForm');
-if ($errors->isEmpty()) {
+if ($errors->no()) {
   $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>$field['label']));
   $form->addInput(array('type'=>'hidden','name'=>'id','value'=>$cl_id));
   $form->addInput(array('type'=>'checkbox','name'=>'required','data'=>1,'value'=>$field['required']));
@@ -62,7 +62,7 @@ if ($request->getMethod() == 'POST') {
   // Validate user input.
   if (!ttValidString($cl_name)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.thing_name'));
 
-  if ($errors->isEmpty()) {
+  if ($errors->no()) {
     $res = CustomFields::updateField($cl_id, $cl_name, $cl_type, $cl_required);
     if ($res) {
       header('Location: cf_custom_fields.php');