ConstructionConsent: added birthdate
This commit is contained in:
@@ -89,6 +89,16 @@ class ConstructionConsentOwnerController extends mfBaseController
|
||||
$data["phone2"] = $r->phone2;
|
||||
$data["fax"] = $r->fax;
|
||||
$data["email"] = $r->email;
|
||||
$date["birthdate"] = null;
|
||||
|
||||
if($r->birthdate) {
|
||||
try {
|
||||
$birthdate = DateTime::createFromFormat("d.m.Y", $r->birthdate, new DateTimeZone("Europe/Vienna"));
|
||||
$data["birthdate"] = $birthdate->format("Y-m-d");
|
||||
} catch(Exception $e) {
|
||||
$this->layout()->setFlash("Ungültiges Geburtsdateum", "warning");
|
||||
}
|
||||
}
|
||||
|
||||
if($mode == "add") {
|
||||
$data["status"] = "new";
|
||||
|
||||
Reference in New Issue
Block a user