{% extends "layout2.html" %} {% load i18n %} {% load static %} {% block css_include %} {% endblock %} {% block js_include %} {% endblock %} {% block content %}
{% csrf_token %}
{% if form.non_field_errors %}
{# Print form errors correctly #} {% if form.non_field_errors %}

{% translate "Form errors" %}

{{ form.non_field_errors|safe }}
{% endif %}
{% endif %}

 {% translate "Radius Repository edition" %}

{{form.name}} {{form.name.errors|safe}}
{{form.host}} {{form.host.errors|safe}}
{{form.port}} {{form.port.errors|safe}}
{{form.nas_id}} {{form.nas_id.errors|safe}}
{{form.secret}} {{form.secret.errors|safe}}
{{form.retry}} {{form.retry.errors|safe}}
{{form.timeout}} {{form.timeout.errors|safe}}
{% endblock %} {% block jquery_code %} if (!String.prototype.endsWith) { String.prototype.endsWith = function(searchString, position) { var subjectString = this.toString(); if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) { position = subjectString.length; } position -= searchString.length; var lastIndex = subjectString.lastIndexOf(searchString, position); return lastIndex !== -1 && lastIndex === position; }; } /* Initialize select2 objects */ $('.select2').select2(); /* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834', }); }); function handle_form_errors(data){ if (typeof(data['form_errors']) !== 'undefined'){ $('.errorlist').remove(); $.each(data['form_errors'], function(field_name, error_list){ field_selector = $('#id_'+field_name); var ul = $('