Skip to content

Commit c361a82

Browse files
author
Andreas Palm
committed
add "empty" to versandarten module list
1 parent aa93070 commit c361a82

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

www/pages/versandarten.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ public function VersandartenEdit(): void
268268
'geschaeftsbrief_vorlage', $geschaeftsbrief_vorlagen, $daten['geschaeftsbrief_vorlage']);
269269

270270
$this->app->Tpl->addSelect('SELMODUL', 'modul', 'modul',
271-
$this->VersandartenSelModul(), $form['modul']);
271+
$this->VersandartenSelModul(true), $form['modul']);
272272
$this->app->Tpl->Set('BEZEICHNUNG', $form['bezeichnung']);
273273
$this->app->Tpl->Set('TYPE', $form['type']);
274274
$this->app->Tpl->Set('PROJEKT', $form['projekt']);
@@ -713,7 +713,7 @@ public function VersandartenCreate()
713713
return $this->HandleSaveAssistantAjaxAction();
714714
}
715715

716-
$modulelist = $this->VersandartenSelModul();
716+
$modulelist = $this->VersandartenSelModul(true);
717717
$auswahlmodul = $this->app->Secure->GetGET('auswahl');
718718

719719
if($auswahlmodul && isset($modulelist[$auswahlmodul])) {
@@ -791,9 +791,12 @@ public function loadModule(string $module, int $moduleId = 0) : ?Versanddienstle
791791
* Retrieve all Versandarten from lib/versandarten/
792792
* @return array
793793
*/
794-
function VersandartenSelModul() : array
794+
function VersandartenSelModul(bool $addEmpty = false) : array
795795
{
796796
$result = [];
797+
if ($addEmpty)
798+
$result[''] = '';
799+
797800
$pfad = dirname(__DIR__).'/lib/versandarten';
798801
if(!is_dir($pfad))
799802
return $result;

0 commit comments

Comments
 (0)