Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix execute action on the last button

ayntk-aia22e757ab757
diff --git a/resources/views/components/modal-confirmation.blade.php b/resources/views/components/modal-confirmation.blade.php
index 5d65b55116..44a1d5d931 100644
--- a/resources/views/components/modal-confirmation.blade.php
+++ b/resources/views/components/modal-confirmation.blade.php
@@ -42,11 +42,20 @@
this.selectedActions = @js(collect($checkboxes)->where('model', true)->pluck('id')->toArray());
this.deleteText = '';
this.password = '';
- this.userConfirmText = ''; // Reset userConfirmText
+ this.userConfirmText = '';
},
step1ButtonText: @js($step1ButtonText),
step2ButtonText: @js($step2ButtonText),
step3ButtonText: @js($step3ButtonText),
+ executeAction() {
+ if (this.confirmWithPassword) {
+ $wire.call(this.action, this.selectedActions, this.password);
+ } else {
+ $wire.call(this.action, this.selectedActions);
+ }
+ this.modalOpen = false;
+ this.resetModal();
+ },
copyConfirmText() {
navigator.clipboard.writeText(this.confirmText);
this.copied = true;
@@ -301,10 +310,4 @@
</template>
</div>
-<script>
-function executeAction() {
- $wire[this.action](this.selectedActions, this.password);
- this.modalOpen = false;
- this.resetModal();
-}
-</script>
+