From 29ab4abf0d9ee969801d190eac827dd85083ab74 Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Tue, 9 Aug 2022 19:11:00 +0200 Subject: Add current ogServer to scopesForm With this commit when users select a scope, the ogServer to which it belongs is also sent. Then when processing the form we obtain this ogServer and we can send it the pertinent requests. This commit also makes action "Add client" to use the ogServer sent in the form. --- ogcp/static/js/ogcp.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ogcp/static') diff --git a/ogcp/static/js/ogcp.js b/ogcp/static/js/ogcp.js index 8678759..bdd7581 100644 --- a/ogcp/static/js/ogcp.js +++ b/ogcp/static/js/ogcp.js @@ -64,6 +64,12 @@ function checkParentsCheckboxes() { if (checkboxChildren.length == 0) return; + if (this.name == "scope-server") { + const checkedChildren = checkboxChildren.filter(":checked"); + checkbox.checked = checkedChildren.length > 0; + return; + } + const unCheckedChildren = checkboxChildren.filter(":not(:checked)"); checkbox.indeterminate = -- cgit v1.2.3-18-g5258