mirror of
https://github.com/flextype/flextype.git
synced 2025-08-18 10:51:21 +02:00
feat(admin-plugin): update dropdown for entries list page #211
This commit is contained in:
@@ -213,8 +213,7 @@
|
||||
<i class="icon icon--white mr-3">{{ icon('far fa-list-alt') }}</i>
|
||||
{{ tr('admin_type') }}</a>
|
||||
<div class="dropdown__divider"></div>
|
||||
<a class="dropdown__item" href="javascript:;" onclick="event.preventDefault();
|
||||
document.getElementById('delete-id-{{ entry.slug }}').submit();">
|
||||
<a class="dropdown__item" href="javascript:;" onclick="event.preventDefault(); deleteEntry('{{ entry.slug }}', {{ loop.index0 }});">
|
||||
<i class="icon icon--white mr-3">{{ icon('fas fa-trash-alt') }}</i>
|
||||
{{ tr('admin_delete') }}</a>
|
||||
<form id="duplicate-id-{{ entry.slug }}" action="{{ path_for('admin.entries.duplicateProcess') }}" method="POST" style="display: none;">
|
||||
@@ -279,4 +278,19 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block tail %}
|
||||
<script>
|
||||
function deleteEntry(id, row_num) {
|
||||
dropdown[row_num].hide();
|
||||
Swal.fire(
|
||||
{title: "{{ tr('admin_cofirmation_required') }}", text: "{{ tr('admin_cofirmation_required_for_delivery_token') }}", showCancelButton: true, confirmButtonText: "{{ tr('admin_yes_iam_sure')|raw }}", cancelButtonText: "{{ tr('admin_cancel') }}"}
|
||||
).then((result) => {
|
||||
if (result.value) {
|
||||
document.getElementById('delete-id-' + id).submit();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user