{% extends "rules/base.html" %} {% load bootstrap3 %} {% block sidebar %}

{{ ruleset.name }}

Action

{% endblock %} {% block body %} {% endblock %} {% block content %} {% if not mode %}

Edit ruleset

Choose an operation in the actions below:
{% if perms.rules.source_edit %} {% endif %} {% if perms.rules.ruleset_policy_edit %} {% endif %}

Rename ruleset

{% csrf_token %} {# {% bootstrap_form form %} #} {% bootstrap_field form.name %} {# {% bootstrap_field form.sources %}#}

Transformations

{% bootstrap_label "Transformations will be applied on all ruleset's categories" %} {% bootstrap_field form.action %} {% bootstrap_field form.lateral %} {% bootstrap_field form.target %}

Expert mode

{% bootstrap_field form.suppressed_sids %} {% bootstrap_field form.comment %} {% if perms.rules.ruleset_policy_edit %} {% buttons %} {% endbuttons %} {% endif %}
{% endif %} {% if mode == 'sources' %} {% load render_table from django_tables2 %}

Choose sources

Check sources to enable/disable them and validate form at bottom.

{% csrf_token %} {% render_table sources_list %} {% bootstrap_form form %}

{% endif %} {% if mode == 'categories' %} {% load render_table from django_tables2 %}
{% csrf_token %} {% for sourceatversion in sources %} {% if not sourceatversion.source.datatype == 'other' %}

Source: {{ sourceatversion }}

Check categories to enable/disable them and validate form at bottom

{% for key, value in categories_list.items %} {% if key == sourceatversion.source.name %} {% render_table value %} {% endif %} {% endfor %} {% endif %} {% endfor %} {% bootstrap_form form %}

{% endif %} {% if mode == 'rules' %}

Disabled rules

{% csrf_token %} {% render_table rules %} {% bootstrap_form form %}
{% endif %} {% endblock %}