noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 05/11: Esthestic Bug Forecast if there is no


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 05/11: Esthestic Bug Forecast if there is no category do not show the save btn
Date: Wed, 31 Mar 2021 13:07:06 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit a4a833cee5c593743d154fe3eb560ce0c59ecf0c
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Mon Mar 29 16:01:09 2021 +0200

    Esthestic Bug Forecast if there is no category do not show the save btn
---
 include/class/forecast_item_mtable.class.php    | 6 ++++++
 include/template/forecast_item_mtable-input.php | 4 ----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/include/class/forecast_item_mtable.class.php 
b/include/class/forecast_item_mtable.class.php
index cbb4364..8915401 100644
--- a/include/class/forecast_item_mtable.class.php
+++ b/include/class/forecast_item_mtable.class.php
@@ -161,7 +161,13 @@ class Forecast_Item_MTable extends Manage_Table_SQL
     public function input()
     {
         $object=$this->get_table();
+        if ( $this->count_category() == 0 ) {
+            echo span(_("Sans catégorie il n'est pas possible d'ajouter de 
nouveaux éléments"),'class="notice"');
+        return false;
+        }
+
         require_once NOALYSS_TEMPLATE."/forecast_item_mtable-input.php";
+        return true;
     }
 
     /**
diff --git a/include/template/forecast_item_mtable-input.php 
b/include/template/forecast_item_mtable-input.php
index b133da5..e1474a5 100644
--- a/include/template/forecast_item_mtable-input.php
+++ b/include/template/forecast_item_mtable-input.php
@@ -24,10 +24,6 @@
  * \brief display, add, delete and modify forecast_item, All rows are in $a_row
  * \see Forecast_Item_MTable::input
  */
-if ( $this->count_category() == 0 ) {
-    echo span(_("Sans catégorie il n'est pas possible d'ajouter de nouveaux 
éléments"),'class="notice"');
-    return;
-}
 
 $cn = $object->cn;
 $forecast = new Forecast_SQL($cn, $this->get_forecast_id());



reply via email to

[Prev in Thread] Current Thread [Next in Thread]