From 0ae49cfafcc5840f36d7aad78eb53f93908a978d Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Tue, 28 Apr 2026 10:49:59 +0000 Subject: [PATCH] devel/grid_example: add option field to showcase grid %field magic The form %field magic works here too but let's not complicate an example controller with it. PR: https://github.com/opnsense/core/issues/10225 --- devel/grid_example/Makefile | 1 + .../OPNsense/GridExample/forms/dialogAddress.xml | 12 +++++++++--- .../app/models/OPNsense/GridExample/GridExample.xml | 13 ++++++++++--- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/devel/grid_example/Makefile b/devel/grid_example/Makefile index f6c9214c6..c27438641 100644 --- a/devel/grid_example/Makefile +++ b/devel/grid_example/Makefile @@ -1,5 +1,6 @@ PLUGIN_NAME= grid_example PLUGIN_VERSION= 1.1 +PLUGIN_REVISION= 1 PLUGIN_COMMENT= A sample framework application PLUGIN_MAINTAINER= ad@opnsense.org diff --git a/devel/grid_example/src/opnsense/mvc/app/controllers/OPNsense/GridExample/forms/dialogAddress.xml b/devel/grid_example/src/opnsense/mvc/app/controllers/OPNsense/GridExample/forms/dialogAddress.xml index 74f842bd7..0d0152e0f 100644 --- a/devel/grid_example/src/opnsense/mvc/app/controllers/OPNsense/GridExample/forms/dialogAddress.xml +++ b/devel/grid_example/src/opnsense/mvc/app/controllers/OPNsense/GridExample/forms/dialogAddress.xml @@ -3,7 +3,7 @@ address.enabled checkbox - Enable this address + Enable this address. 6em @@ -15,13 +15,19 @@ address.email text - Enter the email address + Enter the email address. + + + address.schedule + + dropdown + Select your preferred schedule. address.description text - Enter an optional description + Enter an optional description. false diff --git a/devel/grid_example/src/opnsense/mvc/app/models/OPNsense/GridExample/GridExample.xml b/devel/grid_example/src/opnsense/mvc/app/models/OPNsense/GridExample/GridExample.xml index fc1146dd2..255d6689f 100644 --- a/devel/grid_example/src/opnsense/mvc/app/models/OPNsense/GridExample/GridExample.xml +++ b/devel/grid_example/src/opnsense/mvc/app/models/OPNsense/GridExample/GridExample.xml @@ -1,8 +1,6 @@ //OPNsense/GridExample - - the OPNsense "GridExample" application - + OPNsense "GridExample" application
@@ -10,6 +8,15 @@ 1 Y + + wly + Y + + Daily + Weekly + Monthly + + Y