{{-- manual --}} @extends('user.layouts.app') @php $activeAttachmentsForJs = collect($method->activeAttachments ?? []) ->map(function ($attachment) { $options = $attachment->options; if ($options instanceof \Illuminate\Support\Collection) { $options = $options->values()->toArray(); } elseif (is_string($options)) { $decoded = json_decode($options, true); if (json_last_error() === JSON_ERROR_NONE) { $options = $decoded; } } return [ 'id' => $attachment->id, 'name' => $attachment->name, 'input_type' => $attachment->input_type, 'is_required' => (bool) $attachment->is_required, 'options' => $options, 'min' => $attachment->min, 'max' => $attachment->max, 'placeholder' => $attachment->placeholder, 'input_dom_id' => 'attachment_' . $attachment->id, ]; }) ->values(); @endphp @section('css') @endsection @section('content')
@if ($method->rotating_title)
{{ $method->rotating_title }}
@endif {!! $method->note !!} {{-- add class form-header--important --}}
@csrf
{{ Auth()->user()->currency->name ?? '$' }}
{{ Auth()->user()->currency->name ?? '$' }}
{{-- Operation Number Field (conditional) --}}
{{-- Dynamic attachment fields --}} @if ($method->activeAttachments && $method->activeAttachments->count() > 0) @foreach ($method->activeAttachments as $attachment) @php $fieldName = $attachment->name; $fieldKey = json_encode($fieldName, JSON_UNESCAPED_UNICODE); $inputId = 'attachment_' . $attachment->id; $displayLabel = $attachment->placeholder ?: $attachment->name; @endphp
@if ($attachment->input_type === 'text')
is_required) required @endif>
@elseif($attachment->input_type === 'number')
min !== null) min="{{ $attachment->min }}" @endif @if ($attachment->max !== null) max="{{ $attachment->max }}" @endif @if ($attachment->is_required) required @endif>
@elseif($attachment->input_type === 'select')
@elseif($attachment->input_type === 'file')
@endif
@endforeach @endif
@endsection @section('js') @endsection