Added meridian/rw/hw to AddressDB/Form
This commit is contained in:
@@ -231,7 +231,7 @@ class AddressDBController extends mfBaseController {
|
||||
}
|
||||
|
||||
$required = ['netzgebiet_id','strasse','hausnummer','plz','ortschaft','gemeinde'];
|
||||
foreach(['adrcd','extref','netzgebiet_id','strasse','hausnummer','plz','ortschaft','gemeinde','grund_nr','gdaeigenschaft','gps_lat','gps_long','unit_count'] as $field) {
|
||||
foreach(['adrcd','extref','netzgebiet_id','strasse','hausnummer','plz','ortschaft','gemeinde','grund_nr','gdaeigenschaft','meridian','rw','hw','gps_lat','gps_long','unit_count'] as $field) {
|
||||
if(in_array($field, $required)) {
|
||||
if(!trim($r->$field)) {
|
||||
$this->layout()->setFlash("'".ucfirst($field)."' darf nicht leer sein!", "error");
|
||||
@@ -289,6 +289,9 @@ class AddressDBController extends mfBaseController {
|
||||
|
||||
$adb = new AddressDB();
|
||||
$hausnummer_id = $adb->createUpdateHausnummer($address_data);
|
||||
if(is_array($adb->validation_error) && count($adb->validation_error)) {
|
||||
$this->layout()->setFlash(implode("<br />\n",$adb->validation_error), "warning");
|
||||
}
|
||||
if(!$hausnummer_id) {
|
||||
$this->layout()->setFlash("Fehler beim Erstellen der Adresse!", "error");
|
||||
return $this->addAction();
|
||||
|
||||
Reference in New Issue
Block a user