Esthestic Bug Forecast if there is no category do not show the save btn

This commit is contained in:
sparkyx 2021-03-29 16:01:09 +02:00
parent edbb7bcc46
commit a4a833cee5
2 changed files with 6 additions and 4 deletions

View file

@ -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;
}
/**

View file

@ -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());