From 889e8060864228a4ff822573c7ebfea7be0898bc Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 22 May 2026 12:23:17 +0200 Subject: [PATCH] ui: split button render, some forms only use save (cherry-picked from commit cea293825452c489488f9f37965cb10f33239f2c) --- .../mvc/app/views/layout_partials/form_input_tr.volt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/opnsense/mvc/app/views/layout_partials/form_input_tr.volt b/src/opnsense/mvc/app/views/layout_partials/form_input_tr.volt index f1a110d24b..c961040f5e 100644 --- a/src/opnsense/mvc/app/views/layout_partials/form_input_tr.volt +++ b/src/opnsense/mvc/app/views/layout_partials/form_input_tr.volt @@ -39,6 +39,7 @@ # info static text (help icon, no input or editing) # color color picker for selecting a color # datetime-local local time picker + # buttons save and cancel buttons # label : attribute label (visible text) # size : size (width in characters) attribute if applicable # height : height (length in characters) attribute if applicable @@ -51,20 +52,26 @@ # readonly : if true, input fields will be readonly # type_formatter : when set add type_formatter="" atribute which is used in getFormData() to pipe data before returning # parent : ID reference for the parent form + # save : request save button (default true) + # cancel : request cancel button (default false) #} -{% if type == "save_cancel" %} +{% if type == "buttons" %}  
+{% if save|default('true')=='true' %} +{% endif %} +{% if cancel|default('false')=='true' %} +{% endif %}