Replace native browser confirms with Ladill confirm dialogs.
Deploy Ladill Frontdesk / deploy (push) Successful in 43s
Deploy Ladill Frontdesk / deploy (push) Successful in 43s
Visits, devices, and admin destructive actions now use the shared modal UI. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -67,26 +67,44 @@
|
||||
|
||||
@if ($device->device_token)
|
||||
<x-danger-zone title="Device actions" class="mt-4">
|
||||
<form method="POST" action="{{ route('frontdesk.devices.regenerate-token', $device) }}">
|
||||
@csrf
|
||||
<x-btn
|
||||
type="submit"
|
||||
variant="warning"
|
||||
onclick="return confirm('Regenerate token? Existing kiosk sessions will stop working.')"
|
||||
>Regenerate token</x-btn>
|
||||
</form>
|
||||
<form method="POST" action="{{ route('frontdesk.devices.destroy', $device) }}" onsubmit="return confirm('Remove this device?')">
|
||||
@csrf @method('DELETE')
|
||||
<x-btn type="submit" variant="danger">Remove device</x-btn>
|
||||
</form>
|
||||
<x-confirm-dialog
|
||||
:name="'regenerate-device-token-'.$device->id"
|
||||
title="Regenerate token?"
|
||||
message="Existing kiosk sessions will stop working until the device is reprovisioned."
|
||||
:action="route('frontdesk.devices.regenerate-token', $device)"
|
||||
confirm-label="Regenerate token"
|
||||
variant="primary"
|
||||
>
|
||||
<x-slot:trigger>
|
||||
<x-btn type="button" variant="warning">Regenerate token</x-btn>
|
||||
</x-slot:trigger>
|
||||
</x-confirm-dialog>
|
||||
<x-confirm-dialog
|
||||
:name="'remove-device-'.$device->id"
|
||||
title="Remove this device?"
|
||||
:action="route('frontdesk.devices.destroy', $device)"
|
||||
method="DELETE"
|
||||
confirm-label="Remove device"
|
||||
>
|
||||
<x-slot:trigger>
|
||||
<x-btn type="button" variant="danger">Remove device</x-btn>
|
||||
</x-slot:trigger>
|
||||
</x-confirm-dialog>
|
||||
</x-danger-zone>
|
||||
@else
|
||||
<form method="POST" action="{{ route('frontdesk.devices.destroy', $device) }}" class="mt-4" onsubmit="return confirm('Remove this device?')">
|
||||
@csrf @method('DELETE')
|
||||
<x-danger-zone title="Device actions">
|
||||
<x-btn type="submit" variant="danger">Remove device</x-btn>
|
||||
</x-danger-zone>
|
||||
</form>
|
||||
<x-danger-zone title="Device actions" class="mt-4">
|
||||
<x-confirm-dialog
|
||||
:name="'remove-device-'.$device->id"
|
||||
title="Remove this device?"
|
||||
:action="route('frontdesk.devices.destroy', $device)"
|
||||
method="DELETE"
|
||||
confirm-label="Remove device"
|
||||
>
|
||||
<x-slot:trigger>
|
||||
<x-btn type="button" variant="danger">Remove device</x-btn>
|
||||
</x-slot:trigger>
|
||||
</x-confirm-dialog>
|
||||
</x-danger-zone>
|
||||
@endif
|
||||
</div>
|
||||
</x-app-layout>
|
||||
|
||||
Reference in New Issue
Block a user