actix-admin 0.8.0

An admin interface for actix-web
Documentation
{% extends "base.html" %}

{% block content %}
<div class="align-items-center">

    <form onsubmit="disableButton(this)" hx-boost="true" hx-indicator="#loading" hx-push-url="true"
        hx-encoding="multipart/form-data" method="post" enctype="multipart/form-data">

        <div>
            <input type="hidden" id="sort_by" name="sort_by" value="{{ sort_by }}">
            <input type="hidden" id="sort_order" name="sort_order" value="{{ sort_order }}">
            <input type="hidden" name="entities_per_page" value="{{ entities_per_page }}">
            <input type="hidden" name="search" value="{{ search }}">
            <input type="hidden" name="page" value="{{ page }}">

            {% for model_field in view_model.fields -%}
            <div class="mb-3">
                <label class="form-label" for="{{ model_field.field_name }}"></label>
                {{ model_field.field_name | replace(from="_id", to="") | split(pat="_") | join(sep=" ") | title
                }}{% if not model_field.is_option %} *{% endif %}
                </label>
                <div>
                    {% if model_field.field_type == "SelectList" %}
                    {% include "create_or_edit/selectlist.html" %}
                    {% elif model_field.field_type == "Checkbox" %}
                    {% include "create_or_edit/checkbox.html" %}
                    {% else %}
                    {% include "create_or_edit/input.html" %}
                    {% endif %}
                </div>
                {% if model.errors | get(key=model_field.field_name, default="" ) !="" %}
                <p class="text-danger">{{ model.errors | get(key=model_field.field_name) }}</p>
                {% endif %}
                {% if model.custom_errors | get(key=model_field.field_name, default="" ) !="" %}
                <p class="text-danger">{{ model.custom_errors | get(key=model_field.field_name) }}</p>
                {% endif %}
            </div>
            {%- endfor %}
        </div>
        <div class="d-flex justify-content-between">
            <div class="form-group">
                <button class="btn btn-primary" name="submitBtn" type="submit">Save</button>
            </div>
            <div class="form-group"></div>
            <a hx-vals='{ 
    "entities_per_page" : "{{ entities_per_page }}",
    "search" : "{{ search }}",
    "sort_by" : "{{ sort_by }}",
    "sort_order" : "{{ sort_order }}",
    "page" : "{{ page }}"
    }' hx-boost="true" hx-push-url="true" hx-indicator="#loading" class="btn btn-secondary"
                href="{{ base_path }}/{{ entity_name }}/list">
                Cancel
            </a>
        </div>
    </form>
</div>

{% endblock content %}