From 89f3330606c8a7fcb9a2e11d2ac89e1ce99748da Mon Sep 17 00:00:00 2001 From: glaszig Date: Mon, 19 Aug 2019 00:38:41 +0100 Subject: [PATCH] use template for network page --- includes/networking.php | 107 +-------------------------------------- templates/networking.php | 102 +++++++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+), 106 deletions(-) create mode 100644 templates/networking.php diff --git a/includes/networking.php b/includes/networking.php index 24e9d35d..4094d3cc 100755 --- a/includes/networking.php +++ b/includes/networking.php @@ -16,111 +16,6 @@ function DisplayNetworkingConfig() foreach ($interfaces as $interface) { exec("ip a show $interface", $$interface); } -?> -
-
-
-
-
-
-
- -
-
-

-
- -
-
'.htmlspecialchars($interface, ENT_QUOTES).'
-
-

-                                
-
-
'; - } - ?> -
-
-
- -
-
-
- -
-
-
- ' . CSRFTokenFieldTag() . ' -
-

' . _("Adapter IP Address Settings") . '

-
- - -
-

' . _("Enable Fallback to Static Option") . '

-
- - -
-
-
-

' . _("Static IP Options") . '

-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
- ' . _("Save settings") . ' - ' . _("Apply settings") . ' -
-
-
-
'; + echo renderTemplate("networking", compact("status", "interfaces")); } -?> -
-
- -
- - - - diff --git a/templates/networking.php b/templates/networking.php new file mode 100644 index 00000000..2a109005 --- /dev/null +++ b/templates/networking.php @@ -0,0 +1,102 @@ +
+
+
+
+
+
+
+ +
+
+

+
+ +
+
'.htmlspecialchars($interface, ENT_QUOTES).'
+
+

+                            
+
+
'; + } + ?> +
+
+
+ +
+
+
+ +
+
+
+ ' . CSRFTokenFieldTag() . ' +
+

' . _("Adapter IP Address Settings") . '

+
+ + +
+

' . _("Enable Fallback to Static Option") . '

+
+ + +
+
+
+

' . _("Static IP Options") . '

+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ ' . _("Save settings") . ' + ' . _("Apply settings") . ' +
+
+
+
'; +} +?> +
+
+ +
+ + \ No newline at end of file