From 58c85cf9ab8877864df19eab63606bc824c891b6 Mon Sep 17 00:00:00 2001
From: ale <ale@incal.net>
Date: Sun, 23 Feb 2025 09:15:16 +0000
Subject: [PATCH] Fix form submission

---
 ai-simplesitestats.php | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/ai-simplesitestats.php b/ai-simplesitestats.php
index 1599760..408d6ae 100644
--- a/ai-simplesitestats.php
+++ b/ai-simplesitestats.php
@@ -3,7 +3,7 @@
  * Plugin Name: ai-simplesitestats
  * Plugin URI: https://git.autistici.org/noblogs/ai-simplesitestats-plugin
  * Description: Show simple site statistics
- * Version: 0.0.10
+ * Version: 0.0.11
  * Author: Autistici/Inventati
  * Author URI: https://www.autistici.org/
  * License: MIT
@@ -58,14 +58,16 @@ class StatisticsPage {
         echo '<div style="display:none;" id="sssChartData">' . $timeseriesJSON . '</div>';
 
         // Form to control chart parameters.
-        echo '<form method="get" action="?page=' . htmlentities($_GET['page']) . '">';
+        echo '<form method="get" action="">';
+        echo '<input type="hidden" name="page" value="' . htmlentities($_GET['page']) . '">';
         wp_nonce_field('simplesitestats_settings');
 
         // Show chart controls.
+        echo '<table><tr><td>';
         $this->showSelectControl("sss_metric", "Metric", $this->metrics, $metric);
+        echo '</td><td>';
         $this->showSelectControl("sss_resolution", "Resolution", $this->resolutions, $resolution);
-
-        echo '<button type="submit">Update</button>';
+        echo '</td><td><button type="submit">Update</button></td></tr></table>';
         echo '</form>';
 
         echo '</div>';
@@ -111,7 +113,7 @@ class StatisticsPage {
 
 class AiSSS {
 
-    private static $version = '0.0.10', $blog_id;
+    private static $version = '0.0.11', $blog_id;
 
     public function __construct() {
         global $blog_id;
-- 
GitLab