mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
add terms checkbox
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
import React, { useContext } from 'react'
|
||||
import Link from 'next/link'
|
||||
import Contact from './contact'
|
||||
import BookProvider, { BookContext } from '../../context/book'
|
||||
import DateSelect from './dateSelect'
|
||||
import Reason from './reason'
|
||||
import Button from '../button'
|
||||
import Required from '../required'
|
||||
|
||||
function BookForm() {
|
||||
const { onSubmit, state, forgetData } = useContext(BookContext)
|
||||
const { onSubmit, onChangeEvent, state, forgetData } = useContext(BookContext)
|
||||
const { postData, postDataError, dataStoredLoaded } = state
|
||||
|
||||
return (
|
||||
@@ -18,6 +20,9 @@ function BookForm() {
|
||||
onSubmit()
|
||||
}}
|
||||
>
|
||||
<div className="text-right">
|
||||
Mit <Required /> markierte Felder sind Pflichtfelder.
|
||||
</div>
|
||||
<DateSelect />
|
||||
<Reason />
|
||||
{dataStoredLoaded && (
|
||||
@@ -32,6 +37,12 @@ function BookForm() {
|
||||
</p>
|
||||
)}
|
||||
<Contact />
|
||||
<div className="mb-3">
|
||||
<label className="form-check-label inline-block text-gray-800 cursor-pointer" htmlFor="termsAgreed">
|
||||
<input className="form-check-input h-4 w-4 border border-gray-300 rounded-sm bg-white checked:bg-blue-600 checked:border-blue-600 focus:outline-none transition duration-200 mt-1 align-top bg-no-repeat bg-center bg-contain float-left mr-2 cursor-pointer" type="checkbox" value="" id="termsAgreed" name="termsAgreed" required onChange={onChangeEvent} />
|
||||
Ich stimme den <Link href="./terms" target="_blank" className="underline hover:text-blue-700">Mietbedingungen</Link> zu <Required />
|
||||
</label>
|
||||
</div>
|
||||
<div className="flex items-end">
|
||||
<Button type="submit" loading={!!postData} disabled={postData}>
|
||||
{postData ? 'Speichern...' : 'Absenden'}
|
||||
|
||||
Reference in New Issue
Block a user