input panel: call setValue on all fields

Fixes the displayedit field and makes some rarer case much easier to
do. Normally we only need this if there are two viewmodel synced
fields, where only one is enabled at a time..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-05-19 21:17:22 +02:00
parent a307714b53
commit 50e8bf4419

View File

@ -64,11 +64,13 @@ Ext.define('Proxmox.panel.InputPanel', {
var form = me.up('form');
Ext.iterate(values, function(fieldId, val) {
var field = me.query('[isFormField][name=' + fieldId + ']')[0];
if (field) {
field.setValue(val);
if (form.trackResetOnLoad) {
field.resetOriginalValue();
let fields = me.query('[isFormField][name=' + fieldId + ']');
for (const field of fields) {
if (field) {
field.setValue(val);
if (form.trackResetOnLoad) {
field.resetOriginalValue();
}
}
}
});