{% load freeadmin %}
<form data-dojo-type="dijit.form.Form" id="form_{% cls_name form %}" {% if form and form.is_multipart %}enctype="multipart/form-data" {% endif %}method="POST">

<script type="dojo/method">
addToStack(function() {
    jail_nat_toggle();
    jail_vnet_toggle();
    jail_ipv4_dhcp_toggle();
    jail_ipv6_autoconf_toggle();
});
</script>


    <script type="dojo/event" data-dojo-event="onSubmit" data-dojo-args="e">
        {% block onSubmit %}
        doSubmit({
	    form: this,
	    event: e,
	    url: '{% block formpost %}{{ request.path }}{% endblock %}'
	    });
        {% endblock %}
    </script>
<table class="form">
    {% block form %}
    {% csrf_token %}
    {% admin_form form %}
    {% endblock %}
</table>
    {% block buttons %}
    <button id="btn_{% cls_name form %}_Ok" data-dojo-type="dijit.form.Button" type="submit" data-dojo-props="type:'submit'" class="submitform">
        {% block oklabel %}{% trans "Save" %}{% endblock %}
    </button>
    {% if not inline %}
    <button id="btn_{% cls_name form %}_Cancel" data-dojo-type="dijit.form.Button"type="button">
        {% trans "Cancel" %}
        <script type="dojo/method" data-dojo-event="onClick" data-dojo-args="evt">
            cancelDialog(this);
        </script>
    </button>
    {% endif %}
    {% with form.advanced_fields as advfields %}
    {% include "freeadmin/advanced_btn.html" %}
    {% endwith %}
    {% block extra_buttons %}{% endblock %}
    {% endblock %}
</form>
