1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-18 10:51:21 +02:00

feat(admin-plugin): add swal2 for api/delivery #211

This commit is contained in:
Awilum
2020-02-02 19:36:07 +03:00
parent b6d46b9e9b
commit b70f67dde0

View File

@@ -72,19 +72,19 @@
{% endif %}
{% endblock %}
{% block tail_js %}
{% block tail %}
<script>
function deleteDeliveryToken(id, row_num) {
dropdown[row_num].hide();
swal({
Swal.fire({
title: "{{ tr('admin_cofirmation_required') }}",
text: "{{ tr('admin_cofirmation_required_for_delivery_token') }}",
buttons: [
"{{ tr('admin_cancel') }}", "{{ tr('admin_yes_iam_sure')|raw }}"
],
closeModal: true
}).then((willDelete) => {
if (willDelete) {
showCancelButton: true,
confirmButtonText: "{{ tr('admin_yes_iam_sure')|raw }}",
cancelButtonText: "{{ tr('admin_cancel') }}",
reverseButtons: true
}).then((result) => {
if (result.value) {
document.getElementById('delete-api-token-id-' + id).submit();
}
});