diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/AjaxGroupsPriceController.php b/public/typo3conf/ext/ep_products/Classes/Controller/AjaxGroupsPriceController.php index e505d4c0..37300d26 100644 --- a/public/typo3conf/ext/ep_products/Classes/Controller/AjaxGroupsPriceController.php +++ b/public/typo3conf/ext/ep_products/Classes/Controller/AjaxGroupsPriceController.php @@ -84,9 +84,18 @@ class AjaxGroupsPriceController extends ActionController $selectedOptions = []; } + $mode = $groupsPriceInquiry->getMode(); + + if (false === in_array($mode, [GroupsPriceInquiry::MODE_BOOKING, GroupsPriceInquiry::MODE_INQUIRY])) { + $mode = GroupsPriceInquiry::MODE_BOOKING; + } + $variables = [ + 'mode' => $mode, 'hotel' => $hotel, 'name' => $groupsPriceInquiry->getName(), + 'group' => $groupsPriceInquiry->getGroup(), + 'address' => $groupsPriceInquiry->getAddress(), 'email' => $groupsPriceInquiry->getEmail(), 'phone' => $groupsPriceInquiry->getPhone(), 'remarks' => $groupsPriceInquiry->getRemarks(), diff --git a/public/typo3conf/ext/ep_products/Classes/Domain/Model/Dto/GroupsPriceInquiry.php b/public/typo3conf/ext/ep_products/Classes/Domain/Model/Dto/GroupsPriceInquiry.php index 36d41d84..ba0c49dd 100644 --- a/public/typo3conf/ext/ep_products/Classes/Domain/Model/Dto/GroupsPriceInquiry.php +++ b/public/typo3conf/ext/ep_products/Classes/Domain/Model/Dto/GroupsPriceInquiry.php @@ -28,12 +28,32 @@ namespace EP\EpProducts\Domain\Model\Dto; class GroupsPriceInquiry { + const MODE_INQUIRY = 'inquiry'; + const MODE_BOOKING = 'booking'; + + /** + * @var string + */ + protected $mode; + /** * @var string * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") */ protected $name; + /** + * @var string + * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") + */ + protected $group; + + /** + * @var string + * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") + */ + protected $address; + /** * @var string * @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty") @@ -99,6 +119,27 @@ class GroupsPriceInquiry */ protected $summary; + public function __construct() + { + $this->mode = self::MODE_BOOKING; + } + + /** + * @return string + */ + public function getMode() + { + return $this->mode; + } + + /** + * @param string $mode + */ + public function setMode($mode) + { + $this->mode = $mode; + } + /** * @return string */ @@ -115,6 +156,42 @@ class GroupsPriceInquiry $this->name = $name; } + /** + * @return string + */ + public function getGroup() + { + return $this->group; + } + + /** + * @param string $group + */ + public function setGroup($group) + { + $this->group = $group; + + return $this; + } + + /** + * @return string + */ + public function getAddress() + { + return $this->address; + } + + /** + * @param string $address + */ + public function setAddress($address) + { + $this->address = $address; + + return $this; + } + /** * @return string */ diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue index 7160a3db..d7fb32a3 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/GroupsPriceCalculator.vue @@ -153,7 +153,7 @@
| + Art + | ++ {f:if(condition: '{mode} == "booking"', then: 'Buchung', else: 'Anfrage')} + | +||
|---|---|---|---|
| Haus | {hotel.name} | @@ -15,6 +23,14 @@Name | {name} |
| Name der Gruppe | +{group} | +||
| Adresse | +{address -> f:format.nl2br()} | +||
| {email} | diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/GroupsPrice/Index.html b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/GroupsPrice/Index.html index 20d018a8..422fd5ed 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/GroupsPrice/Index.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/GroupsPrice/Index.html @@ -6,7 +6,7 @@