digitaleagenturnc/dasettings/templates/dasettings/moduls_content.html

65 lines
2.6 KiB
HTML

{% load crispy_forms_tags %}
<div class="col-6 mt-3">
<table class="table table-hover">
<thead>
<tr>
<th scope="col">Modul</th>
<th scope="col">Aktiviert</th>
<th scope="col">Einstellungen</th>
</tr>
</thead>
<tbody id="module_checkboxes">
<form method="POST" enctype="multipart/form-data">
{% csrf_token %}
<input type="hidden" name="form_type" value="agencymodform">
<input type="hidden" name="settings_area" value="moduls">
{% for formfield in modulform %}
<tr>
<td>{{formfield.label_tag}}</td>
<td>{{formfield}}</td>
<td><button type="button" class="btn btn-sm btn-primary" onclick="javascript:$('#modulesettings_{{formfield.name}}').modal('toggle');"><i class="fas fa-cog"></i></button></td>
</tr>
{% endfor %}
</tbody>
</table>
<button type="submit" class="btn btn-success" data-toggle="tooltip" data-placement="top" title="Mit dem Speichern wird die Seite neu geladen, damit alle Einstellungen aktualisiert werden. Werden Module deaktiviert, gehen die Einstellungen und zugewiesenen Rechte nicht verloren.">Moduleinstellungen aktualisieren</button>
</form>
</div>
{% for formfield in modulform %}
<div class="modal fade" id="modulesettings_{{formfield.name}}" tabindex="-1" role="dialog" data-backdrop="static" aria-labelledby="" aria-hidden="true">
<div class="modal-dialog " role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Moduleinstellungen {{formfield.label_tag}}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Schließen">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
{% if formfield.name != 'module_organigramm' %}
Keine Einstellungen vorhanden.
{% else %}
{% block modulesettings_organigramm %}
{% include "dasettings/modulesettings_organigramm.html" %}
{% endblock %}
{% endif %}
{% if formfield.name == 'module_organigramm' %}
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Schließen</button>&nbsp;
<button id="" type="button" onclick="javascript:updateOrganigrammSettings()" class="btn btn-success" data-dismiss="modal" >Speichern</button>
</div>
{% else %}
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Schließen</button>&nbsp;
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
{% endfor %}