[pmg-devel] [PATCH pmg-gui v2 2/2] disclaimer edit: add 'add-separator' checkbox

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Feb 23 09:02:12 CET 2024


Am 15/01/2024 um 12:12 schrieb Dominik Csapak:
> for controlling if the separator should be included or not, default is
> on (backend default).
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  js/Utils.js | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/js/Utils.js b/js/Utils.js
> index 974df1f..4d591a7 100644
> --- a/js/Utils.js
> +++ b/js/Utils.js
> @@ -697,6 +697,12 @@ Ext.define('PMG.Utils', {
>  			['start', gettext('Start')],
>  		    ],
>  		},
> +		{
> +		    xtype: 'proxmoxcheckbox',
> +		    name: 'add-separator',
> +		    fieldLabel: gettext("Add Separator"),
> +		    value: true,

this was missing setting the uncheckedValue to '0' explicitly, as otherwise
that value is undefined and won't get send at all if the checkbox is unchecked.

Mostly here an issue because most of the time our booleans represented by
checkboxes are opt-in, not opt-out (at least as shown to the user).




More information about the pmg-devel mailing list