From 4b3e72bc93793888f901c1f71c8ce955723e48fe Mon Sep 17 00:00:00 2001 From: cp6 Date: Thu, 13 Oct 2022 14:19:39 +1100 Subject: [PATCH] Updated the confirm delete modal JS Updated the confirm delete modal JS More readability --- resources/views/reseller/index.blade.php | 10 +++++----- resources/views/seedboxes/index.blade.php | 10 +++++----- resources/views/servers/index.blade.php | 14 +++++++------- resources/views/shared/index.blade.php | 10 +++++----- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/resources/views/reseller/index.blade.php b/resources/views/reseller/index.blade.php index 47347a6..05d2641 100644 --- a/resources/views/reseller/index.blade.php +++ b/resources/views/reseller/index.blade.php @@ -56,8 +56,8 @@ class="text-body mx-1"> - + @@ -90,10 +90,10 @@ showModal: false }, methods: { - modalForm(event) { + confirmDeleteModal(event) { this.showModal = true; - this.modal_hostname = event.target.id.replace('btn-', ''); - this.modal_id = event.target.title; + this.modal_hostname = event.target.title; + this.modal_id = event.target.id; this.delete_form_action = 'reseller/' + this.modal_id; } } diff --git a/resources/views/seedboxes/index.blade.php b/resources/views/seedboxes/index.blade.php index aa1afd5..699f6f2 100644 --- a/resources/views/seedboxes/index.blade.php +++ b/resources/views/seedboxes/index.blade.php @@ -80,8 +80,8 @@ class="text-body mx-1"> - + @@ -112,10 +112,10 @@ showModal: false }, methods: { - modalForm(event) { + confirmDeleteModal(event) { this.showModal = true; - this.modal_hostname = event.target.id.replace('btn-', ''); - this.modal_id = event.target.title; + this.modal_hostname = event.target.title; + this.modal_id = event.target.id; this.delete_form_action = 'seedboxes/' + this.modal_id; } } diff --git a/resources/views/servers/index.blade.php b/resources/views/servers/index.blade.php index 2bd26d1..d4b1bdb 100644 --- a/resources/views/servers/index.blade.php +++ b/resources/views/servers/index.blade.php @@ -97,8 +97,8 @@ title="check if up" @click="onClk"> - + @@ -179,8 +179,8 @@ title="check if up" @click="onClk"> - + @@ -237,10 +237,10 @@ }); } }, - modalForm(event) { + confirmDeleteModal(event) { this.showModal = true; - this.modal_hostname = event.target.id.replace('btn-', ''); - this.modal_id = event.target.title; + this.modal_hostname = event.target.title; + this.modal_id = event.target.id; this.delete_form_action = 'servers/' + this.modal_id; } } diff --git a/resources/views/shared/index.blade.php b/resources/views/shared/index.blade.php index 6d289ba..774db1e 100644 --- a/resources/views/shared/index.blade.php +++ b/resources/views/shared/index.blade.php @@ -58,8 +58,8 @@ - + @@ -90,10 +90,10 @@ showModal: false }, methods: { - modalForm(event) { + confirmDeleteModal(event) { this.showModal = true; - this.modal_hostname = event.target.id.replace('btn-', ''); - this.modal_id = event.target.title; + this.modal_hostname = event.target.title; + this.modal_id = event.target.id; this.delete_form_action = 'shared/' + this.modal_id; } }