%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/loslex/production/resources/views/livewire/
Upload File :
Create Path :
Current File : /www/loslex/production/resources/views/livewire/modal-user-merge.blade.php

<div class="w-full" wire:key="showuser-{{ $user->id }}" x-data="{
    initSelect() {
        $('#targetuserid').select2({
            width: '100%',
            language: { noResults: function() { return ' {{ __('No results found') }}'; }},
            dropdownCssClass: ':all:',
            selectionCssClass: ':all:',
            dropdownParent: $('#mergeform')
        });
        $('#targetuserid').on('change', (e) => { $wire.set('targetuserid', e.target.value);})
    }}">

    <div class="mb-2">
        <div class="inline">
            <div class="inline mr-5"><span class="mr-1 fa-solid fa-id-badge" title="{{ __('DB id') }}"></span>{{ $user->id}}</div>
        </div>
        <button wire:click="$dispatch('closeModal')" class="text-base float-right" title="{{ __('Close dialog') }}"><span class="fa-solid fa-circle-xmark text-red-500"></button>
    </div>

    {{-- Select2 dropdown position is messed up by some absolute/relative positioning. At the moment I\'m unable to discover where it comes from, so live with it for now. --}}
    <form class="space-y-2" id="mergeform" wire:submit="merge" x-data="{ }">
        <x-input-label for="targetuserid" value="{{ __('Select target user account') }}" />
        <x-select name="targetuserid" id="targetuserid" x-init="initSelect">
            <option value="" selected disabled>{{ __('Select account') }}</option>
            @foreach ($allusers as $targetusr)<option value="{{ $targetusr->id }}">{{ $targetusr->username }} - {{ $targetusr->displayname }} ({{ $targetusr->id }})</option>@endforeach
        </x-select>

        <div><x-input-error class="mt-4" :messages="$errors->all()" /></div>

        <div class="pt-4 flex justify-center">
            <x-primary-button >{{ __('Merge') }}</x-primary-button>
        </div>

    </form>
</div>

Zerion Mini Shell 1.0