Updated the confirm delete modal JS

Updated the confirm delete modal JS
More readability
This commit is contained in:
cp6 2022-10-13 14:19:39 +11:00
parent 20d308b7be
commit 4b3e72bc93
4 changed files with 22 additions and 22 deletions

View File

@ -56,8 +56,8 @@
class="text-body mx-1"><i class="fas fa-eye" title="view"></i></a>
<a href="{{ route('reseller.edit', $row->id) }}"
class="text-body mx-1"><i class="fas fa-pen" title="edit"></i></a>
<i class="fas fa-trash text-danger ms-3" @click="modalForm"
id="btn-{{$row->main_domain}}" title="{{$row->id}}"></i>
<i class="fas fa-trash text-danger ms-3" @click="confirmDeleteModal"
id="{{$row->id}}" title="{{$row->main_domain}}"></i>
</form>
</td>
</tr>
@ -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;
}
}

View File

@ -80,8 +80,8 @@
class="text-body mx-1">
<i class="fas fa-pen" title="edit"></i>
</a>
<i class="fas fa-trash text-danger ms-3" @click="modalForm"
id="btn-{{$row->title}}" title="{{$row->id}}"></i>
<i class="fas fa-trash text-danger ms-3" @click="confirmDeleteModal"
id="{{$row->id}}" title="{{$row->title}}"></i>
</form>
</td>
</tr>
@ -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;
}
}

View File

@ -97,8 +97,8 @@
title="check if up"
@click="onClk">
</i>
<i class="fas fa-trash text-danger ms-3" @click="modalForm"
id="btn-{{$server->hostname}}" title="{{$server->id}}"></i>
<i class="fas fa-trash text-danger ms-3" @click="confirmDeleteModal"
id="{{$server->id}}" title="{{$server->hostname}}"></i>
</form>
</td>
</tr>
@ -179,8 +179,8 @@
title="check if up"
@click="onClk">
</i>
<i class="fas fa-trash text-danger ms-3" @click="modalForm"
id="btn-{{$server->hostname}}" title="{{$server->id}}"></i>
<i class="fas fa-trash text-danger ms-3" @click="confirmDeleteModal"
id="{{$server->id}}" title="{{$server->hostname}}"></i>
</form>
</td>
</tr>
@ -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;
}
}

View File

@ -58,8 +58,8 @@
<i class="fas fa-pen" title="edit"></i>
</a>
<i class="fas fa-trash text-danger ms-3" @click="modalForm"
id="btn-{{$row->main_domain}}" title="{{$row->id}}"></i>
<i class="fas fa-trash text-danger ms-3" @click="confirmDeleteModal"
id="{{$row->id}}" title="{{$row->main_domain}}"></i>
</form>
</td>
</tr>
@ -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;
}
}