From f71cc31c5bcc8cdaa37455665c52acc90122f1e0 Mon Sep 17 00:00:00 2001 From: Yago Diaz Date: Fri, 15 May 2026 10:40:48 +0200 Subject: [PATCH 1/3] Add Cancel and back buttons needed closes #2327 --- public/js/admin.js | 6 ++++-- templates/main/admin_group.html.ep | 7 +++++++ templates/main/network_options.html.ep | 2 ++ templates/main/route_options.html.ep | 2 ++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/public/js/admin.js b/public/js/admin.js index 4225d2a32..bfe269e2b 100644 --- a/public/js/admin.js +++ b/public/js/admin.js @@ -26,7 +26,7 @@ ravadaApp.directive("solShowMachine", swMach) return { require: 'ngModel', link: function(scope, elm, attrs, ctrl) { - ctrl.$parsers.unshift(function(inputText) { + function validateIP(inputText) { var ipformat = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/([0-9]|[0-1][0-9]|2[0-4])$/; if(ipformat.test(inputText)) { @@ -40,8 +40,10 @@ ravadaApp.directive("solShowMachine", swMach) ctrl.$setValidity('ipformat', false); return undefined; } - }); + } + ctrl.$parsers.unshift(validateIP); + ctrl.$formatters.unshift(validateIP); } }; }); diff --git a/templates/main/admin_group.html.ep b/templates/main/admin_group.html.ep index 2e29edc3d..1c6c485fd 100644 --- a/templates/main/admin_group.html.ep +++ b/templates/main/admin_group.html.ep @@ -11,6 +11,8 @@ diff --git a/templates/main/network_options.html.ep b/templates/main/network_options.html.ep index 3606e67b6..746f455e3 100644 --- a/templates/main/network_options.html.ep +++ b/templates/main/network_options.html.ep @@ -130,6 +130,8 @@
+ + - -