feat: confirmation checkbox in price calculator
This commit is contained in:
@@ -38,6 +38,12 @@ class GroupsPriceInquiry
|
||||
*/
|
||||
protected $mode;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
* @TYPO3\CMS\Extbase\Annotation\Validate("Boolean", options={"is": true})
|
||||
*/
|
||||
protected $confirmation;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty")
|
||||
@@ -111,6 +117,22 @@ class GroupsPriceInquiry
|
||||
$this->mode = self::MODE_BOOKING;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isConfirmation()
|
||||
{
|
||||
return $this->confirmation;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $confirmation
|
||||
*/
|
||||
public function setConfirmation($confirmation)
|
||||
{
|
||||
$this->confirmation = $confirmation;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
||||
+17
-1
@@ -197,6 +197,19 @@
|
||||
rows="3"
|
||||
v-model="remarks"/>
|
||||
</div>
|
||||
<div v-if="mode === 'booking'" :class="{ 'has-error': formErrors.confirmation }">
|
||||
<label for="confirmation" class="flex items-start">
|
||||
<input type="checkbox" v-model="confirmation" name="confirmation" id="confirmation">
|
||||
<span class="block ml-2">
|
||||
Mit dem Anklicken des Buttons 'Buchung abschicken' bestätige ich, dass ich die
|
||||
Allgemeinen Geschäftsbedingungen (AGB) gelesen habe und damit einverstanden bin und
|
||||
eine kostenpflichtige Buchung entsteht
|
||||
</span>
|
||||
</label>
|
||||
<div class="text-sm text-red-600 mt-1"
|
||||
v-show="formErrors.confirmation"
|
||||
v-html="formErrors.confirmation"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="py-4">
|
||||
Ihr erhaltet von uns eine Bestätigung. Wir behalten uns vor die Buchung zu prüfen / erst nach
|
||||
@@ -334,7 +347,8 @@ export default {
|
||||
remarks: null,
|
||||
group: null,
|
||||
address: null,
|
||||
mode: 'inquiry',
|
||||
mode: 'booking',
|
||||
confirmation: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -410,8 +424,10 @@ export default {
|
||||
},
|
||||
submitForm(mode) {
|
||||
this.mode = mode
|
||||
let confirmation = 'inquiry' === mode ? true : this.confirmation
|
||||
let formData = new URLSearchParams({
|
||||
'tx_epproducts_ajax[groupsPriceInquiry][mode]': mode,
|
||||
'tx_epproducts_ajax[groupsPriceInquiry][confirmation]': confirmation ? '1' : '0',
|
||||
'tx_epproducts_ajax[groupsPriceInquiry][name]': this.name ? this.name : '',
|
||||
'tx_epproducts_ajax[groupsPriceInquiry][group]': this.group ? this.group : '',
|
||||
'tx_epproducts_ajax[groupsPriceInquiry][address]': this.address ? this.address : '',
|
||||
|
||||
@@ -111,6 +111,9 @@
|
||||
<trans-unit id="tx_eptheme.message.email.1221559976">
|
||||
<source>Ungültige E-Mail Adresse</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_eptheme.message.confirmation.1361959228">
|
||||
<source>Deine Bestätigung ist erforderlich</source>
|
||||
</trans-unit>
|
||||
|
||||
<trans-unit id="label.whatsapp_instructions">
|
||||
<source>Nummer einfach als neuen Kontakt abspeichern und los geht es! Wir beraten Dich über WhatsApp!</source>
|
||||
|
||||
Reference in New Issue
Block a user