Used in "Add USB to VM" dialog for example.
This was broken before 15206214d9 "ComboGrid: fix on-load validation for blank
values" (only the one you enabled first was validated, the other always showed
as valid), and afterwards too, but in a different way (both are now immediately
marked invalid until you select and unselect them) - which is how I noticed.
With this the validation now works correctly.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
The three naming schemes are not ideal, but well here we are for now.
Add some hint to explain what one can do with which version - try to
keep it rather short. It's not ideal but hopefully better than
nothing :)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
vlan-raw-device && vlan-id field are only
enabled if interface name is different than interfaceX.Y
I have added a listener on iface,
to enable them live if user want a custom name for vlan interface
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Commit f32aa3df74 fixed marking multi-select fields with where the store
did not contain a valid value after loading.
However, it introduced a bug for single-select fields where the value
(before the store-load) was explicitly set to be empty (when that should
be invalid because of allowBlank === false).
Fix the logic to correctly detect all scenarios (with def being the
value selected before the store loaded, i.e. undefined or an empty
array):
!allowBlank &&
( def is an array but empty || def is not an array and falsy )
Also use correct error message (localized by ExtJS itself).
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
can often ve useful and doesn't hurts, somewhat similar to ExtJS
forumlas in viemodels, but inline.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Else we can fail at the first fallback check in getConfigValue while
we still have the possibility to have the cbinded key available in
"me" (initial config).
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
when the host has ifupdown2 installed, we can hot apply the config
add a button to do this
if the user does not meet the requirements, the api call
will show why and throw an error (without changing anything)
the button has to be enabled via 'showApplyBtn', because for now,
we do not want it for pmg
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
in fields with 'multiSelect: true', we get an array as value instead
of a string, but a check of !![] results in true (since an array
is an object), so we have to explicitely check for arraylength
in 'setValue' (for correctly showing the trigger) and in the
load handler (to not set an empty field wrongfully to invalid)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
on multiSelect we have to check the values that is in the values
array, but we get the 'displaystring' in the validator so we
have to get the 'real' value (aka the underlying array of values)
before checking if they are in the store
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Prevent the comboBox from displaying a validation error although
forceSelection is true. If you change a valid selection by removing
characters manually and click somewhere else, the comboBox restores
the selection with the previous value. The validation logic then
checked the restored value, but couldn't find it in the store,
because the store is still filtered with the erroneous query.
We now clear the local filter before the actual check to prevent
this.
[Thomas]:
This was fixed in the 6.2 based GPL release of ExtJS, and can be seen
as backport.
Signed-off-by: Tim Marx <t.marx@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
when we have a combogrid that may be empty, we now show a
little 'x' where the user can delete the content
this is not shown when the field is not allowed to be empty
we add a new css for this because triggers need a background image
with a very specific layout:
110x22px which is 5 icons in one image for the various states
(normal, hover, active, focused, focused hover)
the icon is taken from the theme-crisp
form/tag-field-item-close.png but rearranged to fit the size
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
The StdRemoveButton can now pass a delay parameter to the API.
It is set undefined as default so that users of the button
can set the parameter themselves.
Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>