proxmox-widget-toolkit/form
Thomas Lamprecht a46c2eb11f form: add Proxmox.form.field.DisplayEdit
This allows to write our often used:

> {
>     xtype: me.isCreate ? 'someEditableField' : 'displayfield',
>     ...
> }

In a more schematic way, as it can now be controlled by either our
CBind mixin or ExtJS native data binding.

Use a Field container to add both, they editable and they display,
variants of a form field. As default use "textfield" for the editable
and "displayfield" xtype for the read only one.

Pass all but the editConfig and editable members of our initial
config to the display field, allow further to configure the editable
field with an editConfig object, which overwrites the config
properties inherited from the displayConfig/parent config.

This gives full control while not enforcing to specify anything extra
for most default cases.

Enforce initial state of the fields even if the databinding would
handle it to avoid glitches after first render for simple boolean expression
cases.

> {
>     xtype: 'pmxDisplayEditField',
>     cbind: {
>         editable: '{isCreate}',
>     },
>     name: 'tokenid',
>     fieldLabel: gettext('Token ID'),
>     value: me.tokenid,
>     allowBlank: false,
> }

Here, cbind could also be a bind or a native boolean expression.

For something else than a texfield one would use the editConfig, e.g.:
> {
>     ....
>     editConfig: {
>         xtype: 'pveUserSelector',
>         allowBlank: false,
>     },
> },

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-16 15:33:18 +02:00
..
BondModeSelector.js node network: refactor bond mode array generation 2019-07-10 12:26:54 +02:00
Checkbox.js try to use real config properties 2017-03-29 18:47:19 +02:00
ComboGrid.js open picker for all comboboxes on focus, even if they are editable 2020-04-16 14:39:38 +02:00
DateTimeField.js DateTimeField.js - relay change events 2017-09-21 09:36:36 +02:00
DisplayEdit.js form: add Proxmox.form.field.DisplayEdit 2020-04-16 15:33:18 +02:00
ExpireDate.js form: add Proxmox.form.field.ExpireDate 2020-03-31 18:13:20 +02:00
IntegerField.js try to use real config properties 2017-03-29 18:47:19 +02:00
KVComboBox.js KVComboBox: add setComboItems function 2019-07-11 15:00:14 +02:00
LanguageSelector.js LanguageSelector.js - add language selector 2017-10-04 11:16:22 +02:00
NetworkSelector.js network selector: allow to select IP too 2019-06-27 21:51:02 +02:00
RRDTypeSelector.js add RRDTypeSelector class 2017-08-29 06:25:25 +02:00
TextField.js textfield: validate after allowBlank 2019-06-27 14:21:17 +02:00