Updated confirmDeleteModal action
Updated confirmDeleteModal action Made consistency in all the index blade files to use the component
This commit is contained in:
parent
9c1a853d6a
commit
7b602d3616
|
@ -8,10 +8,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 = '{{$uri}}/' + this.modal_id;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,8 +42,8 @@
|
|||
<i class="fas fa-pen" title="edit"></i></a>
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<i class="fas fa-trash text-danger ms-3" @click="modalForm"
|
||||
id="btn-{{$dns->hostname}}" title="{{$dns->id}}"></i>
|
||||
<i class="fas fa-trash text-danger ms-3" @click="confirmDeleteModal"
|
||||
id="{{$dns->id}}" title="{{$dns->hostname}}"></i>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -48,8 +48,8 @@
|
|||
<i class="fas fa-pen" title="edit"></i></a>
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<i class="fas fa-trash text-danger ms-3" @click="modalForm"
|
||||
id="btn-{{$domain->domain}}" title="{{$domain->id}}"></i>
|
||||
<i class="fas fa-trash text-danger ms-3" @click="confirmDeleteModal"
|
||||
id="{{$domain->id}}" title="{{$domain->domain}}"></i>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -41,8 +41,8 @@
|
|||
<form action="{{ route('IPs.destroy', $ip->id) }}" method="POST">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<i class="fas fa-trash text-danger ms-3" @click="modalForm"
|
||||
id="btn-{{$ip->hostname}}" title="{{$ip->id}}"></i>
|
||||
<i class="fas fa-trash text-danger ms-3" @click="confirmDeleteModal"
|
||||
id="{{$ip->id}}" title="{{$ip->hostname}}"></i>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
class="text-body mx-1">
|
||||
<i class="fas fa-eye" title="view"></i></a>
|
||||
@csrf
|
||||
<i class="fas fa-trash text-danger ms-3" @click="modalForm"
|
||||
id="btn-{{$label->label}}" title="{{$label->id}}"></i>
|
||||
<i class="fas fa-trash text-danger ms-3" @click="confirmDeleteModal"
|
||||
id="{{$label->id}}" title="{{$label->label}}"></i>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -75,6 +75,6 @@
|
|||
});
|
||||
</script>
|
||||
<x-modal-delete-script>
|
||||
<x-slot name="uri">locations</x-slot>
|
||||
<x-slot name="uri">labels</x-slot>
|
||||
</x-modal-delete-script>
|
||||
</x-app-layout>
|
||||
|
|
|
@ -51,8 +51,8 @@
|
|||
</a>
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<i class="fas fa-trash text-danger ms-3" @click="modalForm"
|
||||
id="btn-{{$m->name}}" title="{{$m->id}}"></i>
|
||||
<i class="fas fa-trash text-danger ms-3" @click="confirmDeleteModal"
|
||||
id="{{$m->name}}" title="{{$m->id}}"></i>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
<td class="text-nowrap">{{ $o->name }}</td>
|
||||
<td class="text-nowrap">
|
||||
<form action="{{ route('locations.destroy', $o->id) }}" method="POST">
|
||||
<i class="fas fa-trash text-danger ms-3" @click="modalForm"
|
||||
id="btn-{{$o->name}}" title="{{$o->id}}"></i>
|
||||
<i class="fas fa-trash text-danger ms-3" @click="confirmDeleteModal"
|
||||
id="{{$o->id}}" title="{{$o->name}}"></i>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
<a href="{{ route('providers.show', $provider->id) }}"
|
||||
class="text-body mx-1">
|
||||
<i class="fas fa-eye" title="view"></i></a>
|
||||
<i class="fas fa-trash text-danger ms-3" @click="modalForm"
|
||||
id="btn-{{$provider->name}}" title="{{$provider->id}}"></i>
|
||||
<i class="fas fa-trash text-danger ms-3" @click="confirmDeleteModal"
|
||||
id="{{$provider->id}}" title="{{$provider->name}}"></i>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -80,23 +80,7 @@
|
|||
</p>
|
||||
@endif
|
||||
</div>
|
||||
<script>
|
||||
let app = new Vue({
|
||||
el: "#app",
|
||||
data: {
|
||||
"modal_hostname": '',
|
||||
"modal_id": '',
|
||||
"delete_form_action": '',
|
||||
showModal: false
|
||||
},
|
||||
methods: {
|
||||
confirmDeleteModal(event) {
|
||||
this.showModal = true;
|
||||
this.modal_hostname = event.target.title;
|
||||
this.modal_id = event.target.id;
|
||||
this.delete_form_action = 'reseller/' + this.modal_id;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<x-modal-delete-script>
|
||||
<x-slot name="uri">reseller</x-slot>
|
||||
</x-modal-delete-script>
|
||||
</x-app-layout>
|
||||
|
|
|
@ -101,24 +101,7 @@
|
|||
v{{ Illuminate\Foundation\Application::VERSION }} (PHP v{{ PHP_VERSION }})</small></p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let app = new Vue({
|
||||
el: "#app",
|
||||
data: {
|
||||
"modal_hostname": '',
|
||||
"modal_id": '',
|
||||
"delete_form_action": '',
|
||||
showModal: false
|
||||
},
|
||||
methods: {
|
||||
confirmDeleteModal(event) {
|
||||
this.showModal = true;
|
||||
this.modal_hostname = event.target.title;
|
||||
this.modal_id = event.target.id;
|
||||
this.delete_form_action = 'seedboxes/' + this.modal_id;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<x-modal-delete-script>
|
||||
<x-slot name="uri">seedboxes</x-slot>
|
||||
</x-modal-delete-script>
|
||||
</x-app-layout>
|
||||
|
|
|
@ -79,24 +79,7 @@
|
|||
v{{ Illuminate\Foundation\Application::VERSION }} (PHP v{{ PHP_VERSION }})</small></p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let app = new Vue({
|
||||
el: "#app",
|
||||
data: {
|
||||
"modal_hostname": '',
|
||||
"modal_id": '',
|
||||
"delete_form_action": '',
|
||||
showModal: false
|
||||
},
|
||||
methods: {
|
||||
confirmDeleteModal(event) {
|
||||
this.showModal = true;
|
||||
this.modal_hostname = event.target.title;
|
||||
this.modal_id = event.target.id;
|
||||
this.delete_form_action = 'shared/' + this.modal_id;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<x-modal-delete-script>
|
||||
<x-slot name="uri">shared</x-slot>
|
||||
</x-modal-delete-script>
|
||||
</x-app-layout>
|
||||
|
|
|
@ -64,8 +64,8 @@
|
|||
<i class="fas fa-eye" title="view"></i>
|
||||
</a>
|
||||
|
||||
<i class="fas fa-trash text-danger ms-3" @click="modalForm"
|
||||
id="btn-{{$yab->server->hostname}}" title="{{$yab->id}}"></i>
|
||||
<i class="fas fa-trash text-danger ms-3" @click="confirmDeleteModal"
|
||||
id="{{$yab->id}}" title="{{$yab->server->hostname}}"></i>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue
Block a user