versandart added button to create versandart without modul

This commit is contained in:
OpenXE 2023-11-01 17:20:54 +01:00
parent 1fe0aea620
commit f55f801cee
2 changed files with 12 additions and 1 deletions

View File

@ -23,6 +23,9 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
[MODULEINSTALLIERT] [MODULEINSTALLIERT]
</fieldset> </fieldset>
[TAB1NEXT] [TAB1NEXT]
<form id="neu" action="index.php?module=versandarten&action=neusonstige" method="post">
<button name="submit" value="neusonstige" class="ui-button-icon">Versandart ohne Modul anlegen</button>
</form>
</div> </div>
<!-- tab view schließen --> <!-- tab view schließen -->
@ -35,4 +38,4 @@ SPDX-License-Identifier: LicenseRef-EGPL-3.1
:pages="pages" :pages="pages"
:allowClose="allowClose" :allowClose="allowClose"
:pagination="pagination"> :pagination="pagination">
</click-by-click-assistant> </click-by-click-assistant>

View File

@ -56,6 +56,7 @@ class Versandarten {
// ab hier alle Action Handler definieren die das Modul hat // ab hier alle Action Handler definieren die das Modul hat
$this->app->ActionHandler("create", "VersandartenCreate"); $this->app->ActionHandler("create", "VersandartenCreate");
$this->app->ActionHandler("neusonstige", "VersandartenNeuSonstige");
$this->app->ActionHandler("edit", "VersandartenEdit"); $this->app->ActionHandler("edit", "VersandartenEdit");
$this->app->ActionHandler("list", "VersandartenList"); $this->app->ActionHandler("list", "VersandartenList");
$this->app->ActionHandler("delete", "VersandartenDelete"); $this->app->ActionHandler("delete", "VersandartenDelete");
@ -153,6 +154,13 @@ class Versandarten {
return $erg; return $erg;
} }
public function VersandartenNeuSonstige() {
$sql = "INSERT INTO versandarten (aktiv) VALUES (1)";
$this->app->DB->Insert($sql);
$id = $this->app->DB->GetInsertID();
$this->app->Location->execute('index.php?module=versandarten&action=edit&id='.$id);
}
/** @noinspection PhpUnused */ /** @noinspection PhpUnused */
public function VersandartenEdit(): void public function VersandartenEdit(): void
{ {