2026-09-08 20:41:49 +03:00
|
|
|
{{--
|
|
|
|
|
<x-checkout::field name="billing_first_name" label="First name" required />
|
|
|
|
|
|
|
|
|
|
Generic labelled text input with old-input repopulation and validation
|
|
|
|
|
error display — the module's own equivalent of a host x-ui.field, used
|
|
|
|
|
instead of it per the module's independence rule. All styling is .bbk-field*
|
|
|
|
|
(resources/css/checkout.css); no host classes.
|
|
|
|
|
--}}
|
|
|
|
|
@props([
|
|
|
|
|
'name',
|
|
|
|
|
'label',
|
|
|
|
|
'type' => 'text',
|
|
|
|
|
'value' => null,
|
|
|
|
|
'required' => false,
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
<div class="bbk-field">
|
|
|
|
|
<label class="bbk-field-label" for="bbk-{{ $name }}">{{ $label }}</label>
|
|
|
|
|
<input
|
|
|
|
|
type="{{ $type }}"
|
|
|
|
|
name="{{ $name }}"
|
|
|
|
|
id="bbk-{{ $name }}"
|
|
|
|
|
value="{{ old($name, $value) }}"
|
|
|
|
|
@if ($required) required @endif
|
|
|
|
|
{{ $attributes->class(['bbk-field-input', 'bbk-field-input--error' => $errors->has($name)]) }}
|
|
|
|
|
>
|
2026-09-09 13:51:00 +03:00
|
|
|
{{-- Always present so bbk-checkout-form can fill it live on an autosave. --}}
|
|
|
|
|
<p class="bbk-field-error" data-bbk-field-error="{{ $name }}" @unless ($errors->has($name)) hidden @endunless>{{ $errors->first($name) }}</p>
|
2026-09-08 20:41:49 +03:00
|
|
|
</div>
|