{% extends "base.html" %} {% load i18n %} {% block title %} {% if edit %} {% trans "Edit Rule" %} {{form.data.name}} {% else %} {% trans "Create new Rule" %} {% endif %} {% endblock %} {% block breadcrumbs %}
  • / {% if edit %} {% trans "Edit rule" %} {{form.data.name}} {% else %} {% trans "Create rule" %} {% endif %}
  • {% endblock %} {% block extrahead %} {% endblock %} {% block content %}
    {% if edit %}

    {% trans "Edit rule" %}: {{form.data.name}}

    {% else %}

    {% trans "Apply for a new rule" %}

    {% endif %}

    {% csrf_token %} {% load unescape %} {% if form.non_field_errors %}

    {{ form.non_field_errors|unescape}}

    {% endif %}
    {% trans "Rule Basic Info" %}
    {{ form.name }} {% if form.name.errors %} {{ form.name.errors|join:", " }} {% endif %} A unique identifier will be added as a name_suffix
    {% if user.is_superuser %}
    {% trans "Admin Options" %}
    {{ form.applier }}
    {% if form.applier.errors %}

    {{ form.applier.errors|join:", " }}

    {% endif %}
    {% else %} {% endif %}
    {% trans "Rule Match Conditions" %}
    {{ form.source }}  {% if form.source.errors %} {{ form.source.errors|join:", " }} {% endif %} {{ form.source.help_text }}
    {{ form.destination }}  {% if form.destination.errors %} {{ form.destination.errors|join:", " }} {% endif %} {{ form.destination.help_text }}
    {{ form.protocol }} {% if form.protocol.errors %} {{ form.protocol.errors|join:", " }} {% endif %}
    {{ form.sourceport }} {% if form.sourceport.errors %} {{ form.sourceport.errors|join:", " }} {% endif %} {{ form.sourceport.help_text }}
    {{ form.destinationport }} {% if form.destinationport.errors %} {{ form.destinationport.errors|join:", " }} {% endif %} {{ form.destinationport.help_text }}
    {{ form.port }} {% if form.port.errors %} {{ form.port.errors|join:", " }} {% endif %} {{ form.port.help_text }}
    {% trans "Rule Actions" %}
    {{ form.then }} {% if form.then.errors %} {{ form.then.errors|join:", " }} {% endif %}
    {% comment %}   {% endcomment %}
    {% trans "Expiration" %}
    {{ form.expires }} {% if form.expires.errors %} {{ form.expires.errors|join:", " }} {% endif %}
    {% trans "Use/Comments" %}
    {% blocktrans %}Give a short description of the intended use of this rule, that justifies the parameter selection above. Feel free to include any additional comments.{% endblocktrans %} {{ form.comments }} {% if form.comments.errors %} {{ form.comments.errors|join:", " }} {% endif %}
    {% endblock %}