Record deletion logic (maybe)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
{% block title %}Bibliography | ArCOA{% endblock %}
|
||||
|
||||
{% block rightpanel %}
|
||||
<div class="container" style="max-width: 60vw">
|
||||
<div class="container" style="max-width: 60vw" data-controller="delete-record">
|
||||
<h1 class="is-size-1 mt-0 has-text-centered">Bibliography</h1>
|
||||
<h2 class="is-size-3 mt-3 has-text-centered">Choose action</h2>
|
||||
|
||||
@@ -66,16 +66,39 @@
|
||||
<i class="fa fa-edit"></i>
|
||||
</span>
|
||||
</button>
|
||||
<button class="button is-small is-danger" title="Delete record">
|
||||
<a href="{{ path('app_bibliography_del', {'id' : record.id}) }}"
|
||||
class="button is-small is-danger" title="Delete record"
|
||||
data-delete-record-target="path" data-action="click->delete-record#show">
|
||||
<span class="icon">
|
||||
<i class="fa fa-trash"></i>
|
||||
</span>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<div class="modal" data-delete-record-target="modal">
|
||||
<div class="modal-background"></div>
|
||||
<div class="modal-card">
|
||||
<header class="modal-card-head">
|
||||
<span class="icon is-large has-text-warning">
|
||||
<i class="fa fa-warning fa-2x"></i>
|
||||
</span>
|
||||
<p class="modal-card-title has-text-danger pl-2"><strong>Delete record?</strong></p>
|
||||
<button class="delete" aria-label="close"></button>
|
||||
</header>
|
||||
<section class="modal-card-body">
|
||||
<p class="is-size-5">This record will be permanently deleted. Proceed?</p>
|
||||
</section>
|
||||
<footer class="modal-card-foot">
|
||||
<div class="buttons is-right">
|
||||
<button class="button is-link" data-action="click->delete-record#delete">Confirm</button>
|
||||
<button class="button is-light" id="cancel">Cancel</button>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" defer>
|
||||
const delBtns = document.querySelectorAll('.delete');
|
||||
|
||||
Reference in New Issue
Block a user