{% extends "layout2.html" %} {% load i18n static %} {% block css_include %} {% endblock %} {% block js_include %} {% endblock %} {% block content %} {% csrf_token %} {% if form.non_field_errors or save_error %} {# If there is save/configuration errors #} {% if save_error %} {% translate "Message" %} {% translate "Advanced informations" %} Configuration error {% endif %} {# Print form errors correctly #} {% if form.non_field_errors %} {% translate "Form errors" %} {{ form.non_field_errors|safe }} {% endif %} {# If there is save/configuration errors #} {% if save_error %} {{ save_error.0 }} {{ save_error.1 }} {% endif %} {% endif %} {% translate "Cancel" %} {% translate "Submit" %} {% translate "Portal templates" %} {% translate "General" %} {% translate "Style" %} {% translate "Login" %} {% translate "Logout" %} {% translate "Learning" %} {% translate "Self-Service" %} {% translate "Password" %} {% translate "Email & Dialogs" %} {% translate "OTP" %} {% translate "Message" %} {% translate "HTML Errors" %} {% translate "User Registration" %} {% translate "Friendly name" %} {{form.name}} {{form.name.errors|safe}} {% include "./style.html" %} {% include "./login.html" %} {% include "./logout.html" %} {% include "./learning.html" %} {% include "./self.html" %} {% include "./password.html" %} {% include "./dialogs.html" %} {% include "./otp.html" %} {% include "./message.html" %} {% include "./errors.html" %} {% include "./registration.html" %} {% endblock %} {% block jquery_code %} let images_list = {} let portal_template_uri = "{% url 'portal.template.list' %}" let portal_template_api_uri = "{% url 'api.portal.template' %}"; let object_id = "{{ object_id }}"; 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; }; } $(function() { /* 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 = $('
{{ save_error.0 }}
{{ save_error.1 }}