diff options
Diffstat (limited to 'ishtar_common/templates/ishtar/forms/qa_base.html')
-rw-r--r-- | ishtar_common/templates/ishtar/forms/qa_base.html | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/ishtar_common/templates/ishtar/forms/qa_base.html b/ishtar_common/templates/ishtar/forms/qa_base.html new file mode 100644 index 000000000..ee4c242b7 --- /dev/null +++ b/ishtar_common/templates/ishtar/forms/qa_base.html @@ -0,0 +1,77 @@ +{% load i18n inline_formset table_form %} + +<div + class="modal-dialog {% if modal_size == 'large' %}modal-lg {% elif modal_size == 'small'%}modal-sm {% endif%}modal-dialog-centered"> + <div class="modal-content"> + <div class="modal-header"> + <h2>{{page_name|safe}}</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="qa-action">{% csrf_token %} + <div class="modal-body body-scroll"> + <div class='form'> + {% block main_form %} + + {% for error in form.non_field_errors %} + <p>{{ error }}</p> + {% endfor %} + {% bs_form form %} + + {% if confirm %} + <input type="hidden" name="confirm" value="1"/> + <h4>{% trans "Modified items" %}</h4> + <ul>{% for item in items %} + <li>{{item}}</li>{% endfor %} + </ul> + <h4>{% trans "Modification" %}</h4> + <table> + {% for field in form %} + {% if field.value %} + <tr> + <th>{{field.label}}{% trans ":" %} </th> + <td>{% if field.field.rendered_value %} + {{ field.field.rendered_value }} + {% else %} + {{ field.value }} + {% endif %} + </td> + </tr> + {% endif %} + {% endfor %} + </table> + {% endif %} + + {% endblock %} + </div> + </div> + <div class="modal-footer"> + {% block footer %} + <button type="submit" id="submit_form" name='validate' + value="validate" class="btn btn-success"> + {% if confirm %} + {% trans "Confirm" %} + {% else %} + {% trans "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(){ + qa_action_register("{{url}}"); + }); +</script> + + |