the_works/the_works/templates/views/textform.html

71 lines
2.6 KiB
HTML

{% extends 'base.html' %}
{% block title %}Textformen{% endblock title %}
{% block head %}
<link type="text/css" rel="stylesheet" href="{{ url_for('static', filename='css/datatables.css') }}">
{% endblock head %}
{% block heading %}Textformen{% endblock heading %}
{% block content %}
{% include "_icons.svg" %}
<table id="textform-table">
<thead>
<tr>
<th>Textformen</th>
<th colspan="2">Aktionen</th>
</tr>
</thead>
<tbody>
{% for textform in textformen %}
<tr id="textform-{{ textform['ID'] }}">
<td title="Textform">{{ textform["Textform"] }}</td>
<td class="action action-update" data-id="{{ textform['ID'] }}" data-textform="{{textform['Textform'] }}"><a href="#" title="Textform bearbeiten"><svg viewbox="0 0 24 24"><use href="#update" /></svg></a></td>
<td id="delete-{{ textform['ID'] }}" class="action"><a onclick="return confirm('Eintrag wirklich löschen?');" href="{{ url_for('textform.delete', id=textform['ID']) }}" title="Textform löschen"><svg viewbox="0 0 24 24"><use href="#delete" /></svg></a></td>
</tr>
{% endfor %}
</tbody>
</table>
<dialog aria-labelledby="dialog-heading" id="textform-modal">
<article>
<form id="textform_detail_form" method="dialog">
<header>
<button class="modal-close" aria-label="close" rel="prev" formnovalidate></button>
<h1 id="dialog-heading">#</h1>
</header>
<fieldset>
<article>
<label>
<span class="required">Textform</span>
<input id="form_Textform" name="form_Textform" aria-Label="Textform" required autofocus />
</label>
</article>
</fieldset>
<footer class="grid">
<button id="form_submit" type="submit" formmethod="post" formaction="{{ url_for('textform.create') }}">OK</button>
<button class="secondary" aria-label="close" formmethod="dialog" formnovalidate>Abbrechen</button>
</footer>
</form>
</article>
</dialog>
{% endblock content %}
{% block script %}
<script src="{{ url_for('static', filename='js/datatables.js') }}"></script>
<script src="{{ url_for('static', filename='js/init_dt.js') }}"></script>
<script src="{{ url_for('static', filename='js/modal.js') }}"></script>
<script>
window.onload = function () {
initDataTable("textform-table");
initCreateButton("textform-table", "Textform hinzufügen …");
initModal("textform-modal", "form_Textform", ["Neue Textform", "Textform bearbeiten"], ["{{ url_for('textform.create') }}", "{{ url_for('textform.update', id=-1) }}"]);
}
</script>
{% endblock script %}