Skip to content
Snippets Groups Projects
Commit 58c85cf9 authored by ale's avatar ale
Browse files

Fix form submission

parent e1a29449
Branches
Tags v0.0.11
No related merge requests found
Pipeline #88498 passed
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment