{{-- Receiver list picker of Skapa mottagare / Ändra mottagare (#2957 slice 4b, card #3018): nh choice rows. Posts as before: a checkbox named by the list id with value 1, and a hidden {id}_comment field. Params: $lists (the company's lists with receivers_count), $receiver (null on create). After a validation error the checked state comes from the old input, as Form::checkbox did. --}} @php $receiver = $receiver ?? null; $memberships = $receiver !== null ? $receiver->lists->keyBy('id') : collect(); $hasOld = session()->hasOldInput(); @endphp

{{ __('taggingReceiver.nhForm.listsTitle') }}

@if ($lists->isEmpty())

{{ __('taggingReceiver.nhForm.noLists') }}

{{ __('taggingReceiver.form.createList') }}
@else

{{ __('taggingReceiver.receiverlistheader') }}

@foreach ($lists as $list) @php $membership = $memberships->get($list->id); $sub = implode('
', array_filter([ $list->comment ? e($list->comment) : null, (int) $list->status === 0 ? e(__('taggingReceiver.nhForm.listHidden')) : null, ])); // Wrapped so receiver-form.js can drop it after "Aktivera igen". if ($membership !== null && (int) $membership->pivot->status === 0) { $sub .= ''.($sub !== '' ? '
' : '').e(__('receiver.nhForm.listUnsubscribed')).'
'; } @endphp @endforeach
@endif