fix: confirmation text could be empty, then skip that part
fix: confirmation modal should not be closed by clicking away
This commit is contained in:
parent
16ccc87fbe
commit
903d84e0dd
1 changed files with 4 additions and 4 deletions
|
|
@ -151,9 +151,9 @@ class="relative w-auto h-auto">
|
|||
@endif
|
||||
@endif
|
||||
<template x-teleport="body">
|
||||
<div x-show="modalOpen" @click.away="modalOpen = false; resetModal()"
|
||||
<div x-show="modalOpen"
|
||||
class="fixed top-0 lg:pt-10 left-0 z-[99] flex items-start justify-center w-screen h-screen" x-cloak>
|
||||
<div x-show="modalOpen" @click="modalOpen = false; resetModal()"
|
||||
<div x-show="modalOpen"
|
||||
class="absolute inset-0 w-full h-full bg-black bg-opacity-20 backdrop-blur-sm"></div>
|
||||
<div x-show="modalOpen" x-trap.inert.noscroll="modalOpen" x-transition:enter="ease-out duration-100"
|
||||
x-transition:enter-start="opacity-0 -translate-y-2 sm:scale-95"
|
||||
|
|
@ -222,7 +222,7 @@ class="flex absolute top-2 right-2 justify-center items-center w-8 h-8 rounded-f
|
|||
</template>
|
||||
@endforeach
|
||||
</ul>
|
||||
@if ($confirmWithText)
|
||||
@if ($confirmWithText && $confirmationText)
|
||||
<div class="mb-4">
|
||||
<h4 class="mb-2 text-lg font-semibold">Confirm Actions</h4>
|
||||
<p class="mb-2 text-sm">{{ $confirmationLabel }}</p>
|
||||
|
|
@ -309,7 +309,7 @@ class="w-24 dark:bg-coolgray-200 dark:hover:bg-coolgray-300">
|
|||
</template>
|
||||
|
||||
<template x-if="step === 2">
|
||||
<x-forms.button x-bind:disabled="confirmWithText && userConfirmationText !== confirmationText"
|
||||
<x-forms.button x-bind:disabled="confirmationText !== '' && confirmWithText && userConfirmationText !== confirmationText"
|
||||
class="w-auto" isError
|
||||
@click="
|
||||
if (dispatchEvent) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue