diff --git a/plinth/modules/networks/static/networks.js b/plinth/modules/networks/static/networks.js index 14e7e1800..af2260051 100644 --- a/plinth/modules/networks/static/networks.js +++ b/plinth/modules/networks/static/networks.js @@ -103,7 +103,7 @@ jQuery(function($) { // collapsible so that the form element can be highlighted and an error tooltip // can be show by the browser. document.addEventListener('DOMContentLoaded', event => { - const selector = '.form-connection-edit input, .form-connection-create input'; + const selector = '.form-connection input, .form-connection select'; const input_elements = document.querySelectorAll(selector); input_elements.forEach(input => input.addEventListener('invalid', on_invalid_event) @@ -112,9 +112,7 @@ document.addEventListener('DOMContentLoaded', event => { function on_invalid_event(event) { const element = event.target; - console.log('Invalid event on element', element); const parent = element.closest('.collapse'); - console.log('Invalid event with parent', parent); // Don't use .collapse(). Instead, expand all the sections with errors. parent.classList.add('show'); } diff --git a/plinth/modules/networks/templates/connections_create.html b/plinth/modules/networks/templates/connections_create.html index d444340ad..6d8b5764c 100644 --- a/plinth/modules/networks/templates/connections_create.html +++ b/plinth/modules/networks/templates/connections_create.html @@ -9,7 +9,7 @@

{{ title }}

-
+ {% csrf_token %} {% include "connections_fields.html" %} diff --git a/plinth/modules/networks/templates/connections_edit.html b/plinth/modules/networks/templates/connections_edit.html index 8f95772a5..4a3725592 100644 --- a/plinth/modules/networks/templates/connections_edit.html +++ b/plinth/modules/networks/templates/connections_edit.html @@ -10,7 +10,7 @@

{{ title }}

- + {% csrf_token %} {% include "connections_fields.html" %}