[pbs-devel] [PATCH widget-toolkit v3 03/14] window: add panel for editing simple, built-in realms
Christoph Heiss
c.heiss at proxmox.com
Fri Aug 23 12:23:13 CEST 2024
On Fri, Aug 23, 2024 at 08:41:06AM GMT, Hannes Laimer wrote:
> On Thu Aug 22, 2024 at 5:19 PM CEST, Christoph Heiss wrote:
> > On Mon, Aug 19, 2024 at 04:18:54PM GMT, Hannes Laimer wrote:
> > > On Fri Aug 16, 2024 at 1:16 PM CEST, Christoph Heiss wrote:
> > > > Signed-off-by: Christoph Heiss <c.heiss at proxmox.com>
> > > > [..]
> > > > diff --git a/src/window/AuthEditSimple.js b/src/window/AuthEditSimple.js
> > > > new file mode 100644
> > > > index 0000000..22932c0
> > > > --- /dev/null
> > > > +++ b/src/window/AuthEditSimple.js
> > > > @@ -0,0 +1,41 @@
> > > > [..]
> > > > + {
> > > > + xtype: 'proxmoxcheckbox',
> > > > + fieldLabel: gettext('Default realm'),
> > > > + name: 'default',
> > > > + value: 0,
> > >
> > > nit:
> > > this should include
> > > ```
> > > cbind: {
> > > deleteEmpty: '{!isCreate}'
> > > },
> > > ```
> > > IIRC we don't send false, so it works because we PUT, but still
> > >
> >
> > Since this panel is only used for built-in/pre-exisiting realms and no
> > new "simple" realms can be created, `isCreate` does not exist anyway.
> >
> ohh, right, but then just `deleteEmpty: true` without the cbind, no?
Sure, that makes sense. Just for completeness-sake - it works like
this too, since the API accepts an `Option<bool>` for the `default`
property - so if it's simply missing from the request, the outcome is
the same.
But setting `deleteEmpty` definitely makes the intent clearer to the
reader.
More information about the pbs-devel
mailing list