{% translate "Download result" %}
{% extends "layout2.html" %}
{% load i18n %}
{% load static %}
{% block css_include %}
{% endblock %}
{% block js_include %}
{% endblock %}
{% block content %}
| " + key + " | " + JSON.stringify(msg['message'][key]) + " |
| " + key + " | " + msg['message'][key] + " |
' + result + '
'); } else { reason = msg['error']; $('#download_test_msg').html("{% translate 'Cannot retrieve asked url, reason: '%}" + reason + ""); } }); // /$.done e.preventDefault(); }); /* Headers code */ var id = 0; /* Add default HeaderForm to headers_table */ $("#add_header").on("click", function(e) { $('#headers_table').append(`{{header_form.as_table_td|safe}}`); refresh_table_events(); id++; }); function get_headers() { let headers = new Array() $('#headers_table tbody tr').each(function(index, tr){ let header_name = tr.children[0].children[0].value let header_value = tr.children[1].children[0].value headers.push({'check_header_name': header_name, 'check_header_value': header_value}); }); return headers; } /* Build http_headers fields with tables content */ $('#reputation_ctx_edit_form').submit(function(event) { $('#custom_headers').val(JSON.stringify(get_headers())); //event.preventDefault(); }); $('.tag-editor').css({"min-width": "100px"}); /* Initialize all custom fields */ refresh_table_events(); }); // end of function() {% endblock %}