shimatta-kenkyusho/shimatta_kenkyusho/templates/parts/modals/edit-component-modal.html

33 lines
1.1 KiB
HTML

{% comment "" %}
Needs following context:
- heading
- form EditComponentForm
- open_component_button
{% endcomment %}
{% load static %}
{% load crispy_forms_tags %}
<div class="modal fade" id="comp-edit-modal" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h2>{{heading}}</h2>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
<div class="modal-body">
{{form|crispy}}
</div>
<div class="modal-footer">
<input type="submit" name="submit-edit-component" class="btn btn-primary" value="Save">
{% if open_component_button %}
<input type="submit" name="submit-edit-component-open" class="btn btn-primary" value="Save and Open">
{% endif %}
</div>
</form>
</div>
</div>
</div>