diff options
author | Cefin <kevon@tuta.io> | 2021-12-21 15:48:56 +0000 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-12-12 12:20:59 +0100 |
commit | 49f58863a580569d7731e4528389aebee7202f48 (patch) | |
tree | 41bdd168e0be02b4a2d45748305bfe65666264e1 /archaeological_operations/templates | |
parent | a249c5637264ab6d24fc9feb6bf4c92b2d93cac8 (diff) | |
download | Ishtar-49f58863a580569d7731e4528389aebee7202f48.tar.bz2 Ishtar-49f58863a580569d7731e4528389aebee7202f48.zip |
Operation - Parcels - Modify - work in progress, attempt to manage formsets with view for #5227
Diffstat (limited to 'archaeological_operations/templates')
-rw-r--r-- | archaeological_operations/templates/ishtar/forms/operation_modify_parcels.html | 80 |
1 files changed, 72 insertions, 8 deletions
diff --git a/archaeological_operations/templates/ishtar/forms/operation_modify_parcels.html b/archaeological_operations/templates/ishtar/forms/operation_modify_parcels.html index 226f993d7..64619a6f4 100644 --- a/archaeological_operations/templates/ishtar/forms/operation_modify_parcels.html +++ b/archaeological_operations/templates/ishtar/forms/operation_modify_parcels.html @@ -1,8 +1,72 @@ -<form method="post"> - {{ formset.management_form }} - <table> - {% for form in formset %} - {{ form }} - {% endfor %} - </table> -</form> +{% load i18n inline_formset table_form %} + +<div class="modal-dialog modal-lg"> + <div class="modal-content"> + <div class="modal-header"> + <h2>{{ formset.form_label }}</h2> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"> + <span aria-hidden="true">×</span> + </button> + </div> + <form enctype="multipart/form-data" action="{{url}}" method="post" id="{{ formset.form_slug }}"> + {% csrf_token %} + <div class="modal-body body-scroll"> + <div class='form'> + {% block main_form %} + {{ formset.management_form }} + {{ formset_general.management_form }} + {% if formset.non_form_errors %} + {{ formset.non_form_errors }} + {% endif %} + <table> + {% for form in formset %} + <th></th> + <tr> + <td>{{ form }}</td> + </tr> + {% endfor %} + </table> + + <table> + {% for form_g in formset_general %} + <th></th> + <tr> + <td>{{ form_g }}</td> + </tr> + {% endfor %} + </table> + {% endblock %} + </div> + </div> + <div class="modal-footer"> + {% block footer %} + <button type="submit" id="submit_form" name='validate' + value="validate" class="btn btn-success"> + {% if action_name %} + {{ action_name }} + {% else %} + {% trans "Add/Modify" %} + {% endif %} + </button> + <button type="button" data-dismiss="modal" + aria-label="Close" class="btn btn-secondary"> + {% trans "Cancel" %} + </button> + {% endblock %} + </div> + </form> + </div> +</div> +<script type="text/javascript"> + {% block js %} + {% endblock %} + $(document).ready(function(){ + {% if slug %} + qa_action_register("{{url}}", "{{slug}}"); + {% else %} + qa_action_register("{{url}}"); + {% endif %} + {% block js_ready %} + {% endblock %} + }); +</script> |