Updated the confirm delete modal JS
Updated the confirm delete modal JS More readability
This commit is contained in:
parent
20d308b7be
commit
4b3e72bc93
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user