@php if (!isset($errors)) { $errors = collect([]); } $values = request()->get('f'); @endphp @if (request()->get('success') && empty($conversation->id))
{{ __('Your message has been sent!') }} @if (\EndUserPortal::authCustomer() && !empty(request()->get('ticket_id'))) ({{ __('View') }}) @endif
{{-- request()->url() does not return HTTPS protocol --}} {{ __('Submit another message') }}
@else @if (request()->get('success') && !empty($conversation->id))
{{ __('Your message has been sent!') }}
@endif
{{ csrf_field() }} {{----}} {{----}} {{-- Spam protection --}} @if (!\EndUserPortal::authCustomer())
@include('partials/field_error', ['field'=>'customer_name'])
@endif {{--
@include('partials/field_error', ['field'=>'phone'])
--}} @if (!\EndUserPortal::authCustomer())
@include('partials/field_error', ['field'=>'email'])
@endif @php if (empty($mailbox_id)) { $mailbox_id = \EndUserPortal::decodeMailboxId($mailbox->id, \EndUserPortal::WIDGET_SALT); } @endphp @if (\Module::isActive('customfields')) @php // We do not check request string as: // - Submit another ticket button does not work in this case // - In the Portal there is not request parameters. // $cf = Request::get('cf'); // if (empty($cf) || !is_array($cf)) { $widget_settings = \EndUserPortal::getWidgetSettings($mailbox_id); $cf = $widget_settings['cf'] ?? []; //} @endphp @if (!empty($cf) && is_array($cf)) @php $custom_fields = \CustomField::getMailboxCustomFields($mailbox_id); $add_calendar = false; @endphp @foreach($cf as $custom_field_id) @foreach($custom_fields as $custom_field) @php $custom_field_value = $values['cf_'.$custom_field->id] ?? ''; $prefilled = false; @endphp @if ($custom_field->id == $custom_field_id) @if ($custom_field->type == CustomField::TYPE_DATE) @php $add_calendar = true @endphp @endif
@if ($custom_field->type == CustomField::TYPE_DROPDOWN) @foreach($custom_field->options as $option_key => $option_name) @php if ($option_key == $custom_field_value || $option_name == $custom_field_value) { $prefilled = true; break; } @endphp @endforeach @elseif ($custom_field->type == CustomField::TYPE_MULTI_LINE) @elseif ($custom_field->type == CustomField::TYPE_MULTISELECT) {{-- Add hidden input to allow saving empty value --}} @elseif ($custom_field->type == CustomField::TYPE_DROPDOWN_MULTISELECT) {{-- Add hidden input to allow saving empty value --}} @else required) required @endif @if ($custom_field->type == CustomField::TYPE_NUMBER) type="number" @else type="text" @endif /> @endif
@endif @endforeach @endforeach @endif @endif @if ((int)\EndUserPortal::getMailboxParam($mailbox, 'subject') && empty($conversation->id))
@include('partials/field_error', ['field'=>'subject'])
@endif
@include('partials/field_error', ['field'=>'message'])
@if ((int)\EndUserPortal::getMailboxParam($mailbox, 'consent'))
@endif
    {{ __('Add attachments') }}
    @action('enduserportal.submit_form.before_submit')
    {!! $submit_area_append ?? '' !!}
    @if (!empty($add_calendar)) @section('eup_stylesheets') @parent @endsection @section('eup_javascripts') @parent {!! Minify::javascript(['/js/flatpickr/flatpickr.min.js', '/js/flatpickr/l10n/'.strtolower(Config::get('app.locale')).'.js']) !!} @endsection @endif @endif