District now optional freetext in Preorder API
This commit is contained in:
@@ -145,6 +145,7 @@
|
||||
<?=($preorder->adb_wohneinheit_id) ? ((string)$preorder->adb_wohneinheit ? $preorder->adb_wohneinheit."<br />" : "") : "<i class='text-pink'><keine Wohneinheit></i><br />"?>
|
||||
<?=$preorder->adb_hausnummer->plz->plz?>
|
||||
<?=$preorder->adb_hausnummer->strasse->gemeinde->name?>
|
||||
<?=($preorder->address_district) ? "<br />(".$preorder->address_district.")" : ""?>
|
||||
</td>
|
||||
<?php else: ?>
|
||||
<td></td>
|
||||
|
||||
@@ -61,6 +61,7 @@ class PreorderApicontroller extends mfBaseApicontroller {
|
||||
}
|
||||
|
||||
protected function submitPreorder() {
|
||||
//var_dump($this->post);exit;
|
||||
if(!$this->campaigns) {
|
||||
$this->log->debug("disallowed request because no campaign for apikey");
|
||||
return mfResponse::Forbidden();
|
||||
@@ -243,6 +244,9 @@ class PreorderApicontroller extends mfBaseApicontroller {
|
||||
if($address_info) {
|
||||
$preorder_data['address_info'] = $address_info;
|
||||
}
|
||||
if(property_exists($this->post['address'],"district") && $this->post['address']->district) {
|
||||
$preorder_data['address_district'] = $this->post['address']->district;
|
||||
}
|
||||
|
||||
if($this->post['acceptAgb'] === true) {
|
||||
$preorder_data['accept_agb'] = 1;
|
||||
|
||||
@@ -5,6 +5,7 @@ class PreorderModel {
|
||||
public $preordercampaign_id;
|
||||
public $adb_hausnummer_id;
|
||||
public $adb_wohneinheit_id;
|
||||
public $address_district;
|
||||
public $address_info;
|
||||
public $building_id;
|
||||
public $termination_id;
|
||||
|
||||
Reference in New Issue
Block a user