<?xml version="1.0" encoding="utf-8" ?>
<odoo>
    <template id="accept_legal_input">
        <div>
            <input
                class="form-check-input position-relative me-1"
                type="checkbox"
                id="accepted_event_legal_terms"
                t-att-required="event.website_require_legal"
            />
            <label
                t-if="not event.website_description_legal"
                for="accepted_event_legal_terms"
                class="control-label form-check-label"
            >
                I agree to the <a
                    target="_BLANK"
                    href="/terms"
                >terms &amp; conditions</a>
            </label>
            <label
                t-else=""
                for="accepted_event_legal_terms"
                class="control-label form-check-label"
            >
                <t t-esc="event.website_description_legal" />
            </label>
        </div>
    </template>
    <template
        id="registration_attendee_details"
        inherit_id="website_event.registration_attendee_details"
    >
        <xpath expr="//div[hasclass('modal-footer')]" position="before">
            <div t-if="event.website_require_legal" class="modal-body pb-0">
                <t t-call="website_event_require_legal.accept_legal_input" />
            </div>
        </xpath>
    </template>
</odoo>
