From c361a825833c091cfaaad1b2d6b5d36e3b9b2e9b Mon Sep 17 00:00:00 2001 From: Andreas Palm Date: Mon, 27 Mar 2023 15:22:27 +0200 Subject: [PATCH] add "empty" to versandarten module list --- www/pages/versandarten.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/www/pages/versandarten.php b/www/pages/versandarten.php index 60b996f0..6c46f36f 100644 --- a/www/pages/versandarten.php +++ b/www/pages/versandarten.php @@ -268,7 +268,7 @@ class Versandarten { 'geschaeftsbrief_vorlage', $geschaeftsbrief_vorlagen, $daten['geschaeftsbrief_vorlage']); $this->app->Tpl->addSelect('SELMODUL', 'modul', 'modul', - $this->VersandartenSelModul(), $form['modul']); + $this->VersandartenSelModul(true), $form['modul']); $this->app->Tpl->Set('BEZEICHNUNG', $form['bezeichnung']); $this->app->Tpl->Set('TYPE', $form['type']); $this->app->Tpl->Set('PROJEKT', $form['projekt']); @@ -713,7 +713,7 @@ class Versandarten { return $this->HandleSaveAssistantAjaxAction(); } - $modulelist = $this->VersandartenSelModul(); + $modulelist = $this->VersandartenSelModul(true); $auswahlmodul = $this->app->Secure->GetGET('auswahl'); if($auswahlmodul && isset($modulelist[$auswahlmodul])) { @@ -791,9 +791,12 @@ class Versandarten { * Retrieve all Versandarten from lib/versandarten/ * @return array */ - function VersandartenSelModul() : array + function VersandartenSelModul(bool $addEmpty = false) : array { $result = []; + if ($addEmpty) + $result[''] = ''; + $pfad = dirname(__DIR__).'/lib/versandarten'; if(!is_dir($pfad)) return $result;