fixed saveaction
This commit is contained in:
@@ -254,6 +254,18 @@ class ConstructionConsentController extends mfBaseController {
|
||||
$this->layout()->setFlash("Sie haben keine Berechtigung für dieses Projekt", "error");
|
||||
$this->redirect("ConstructionConsent");
|
||||
}
|
||||
// if mode is add and object type is building check if adb_hausnummer_id is set and if object type is street check if adb_strasse_id is set
|
||||
|
||||
if($r->object_type == "building" && !$r->adb_hausnummer_id) {
|
||||
$this->layout()->setFlash("Kein Gebäude ausgewählt", "error");
|
||||
return $this->addAction();
|
||||
}
|
||||
|
||||
if($r->object_type == "street" && !$r->adb_strasse_id) {
|
||||
$this->layout()->setFlash("Keine Straße ausgewählt", "error");
|
||||
return $this->addAction();
|
||||
}
|
||||
|
||||
|
||||
$data = [];
|
||||
$data["constructionconsentproject_id"] = $r->constructionconsentproject_id;
|
||||
|
||||
Reference in New Issue
Block a user