fixed UI for uplaod on create
This commit is contained in:
@@ -300,19 +300,37 @@
|
|||||||
<span class="mt-3 text-sm font-bold text-zinc-100">Click to choose files</span>
|
<span class="mt-3 text-sm font-bold text-zinc-100">Click to choose files</span>
|
||||||
<span class="mt-1 text-xs text-zinc-500">Maximum {{ (int) config('helpdesk.max_upload_kb', 10240) }} KB per file.</span>
|
<span class="mt-1 text-xs text-zinc-500">Maximum {{ (int) config('helpdesk.max_upload_kb', 10240) }} KB per file.</span>
|
||||||
</label>
|
</label>
|
||||||
|
<div x-data class="rounded-2xl border border-zinc-700 bg-zinc-950/70 p-4">
|
||||||
|
<input
|
||||||
|
x-ref="attachmentsInput"
|
||||||
|
id="attachments"
|
||||||
|
type="file"
|
||||||
|
wire:model="attachments"
|
||||||
|
multiple
|
||||||
|
accept="{{ $helpdeskAttachmentAccept }}"
|
||||||
|
class="hidden"
|
||||||
|
wire:key="ticket-create-attachments-input"
|
||||||
|
dusk="ticket-create-attachments-input"
|
||||||
|
data-dusk="ticket-create-attachments-input"/>
|
||||||
|
|
||||||
<input
|
<button
|
||||||
id="attachments"
|
type="button"
|
||||||
type="file"
|
x-on:click="$refs.attachmentsInput.click()"
|
||||||
wire:model="attachments"
|
class="inline-flex items-center justify-center gap-2 rounded-xl bg-blue-600 px-4 py-2.5 text-sm font-semibold text-white">
|
||||||
multiple
|
<i class="fa-solid fa-paperclip" aria-hidden="true"></i>
|
||||||
accept="{{ $helpdeskAttachmentAccept }}"
|
Add attachments
|
||||||
class="sr-only"
|
</button>
|
||||||
wire:key="ticket-create-attachments-input"
|
<button
|
||||||
dusk="ticket-create-attachments-input"
|
type="button"
|
||||||
data-dusk="ticket-create-attachments-input"
|
x-on:click="$refs.attachmentsInput.click()"
|
||||||
/>
|
class="mt-4 flex w-full flex-col items-center justify-center rounded-2xl border border-dashed border-zinc-700 bg-zinc-900/70 px-4 py-8 text-center">
|
||||||
|
<i class="fa-solid fa-cloud-arrow-up text-2xl text-blue-300" aria-hidden="true"></i>
|
||||||
|
<span class="mt-3 text-sm font-bold text-zinc-100">Click to choose files</span>
|
||||||
|
<span class="mt-1 text-xs text-zinc-500">
|
||||||
|
Maximum {{ (int) config('helpdesk.max_upload_kb', 10240) }} KB per file.
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
@if (count($attachments) > 0)
|
@if (count($attachments) > 0)
|
||||||
<div class="mt-4 grid gap-2 sm:grid-cols-2" dusk="ticket-create-selected-attachments">
|
<div class="mt-4 grid gap-2 sm:grid-cols-2" dusk="ticket-create-selected-attachments">
|
||||||
@foreach ($attachments as $attachment)
|
@foreach ($attachments as $attachment)
|
||||||
|
|||||||
Reference in New Issue
Block a user