[pve-devel] [PATCH manager 2/3] ui/storage: cifs: exit early from username change cb on displaying
Thomas Lamprecht
t.lamprecht at proxmox.com
Fri Jun 29 13:08:18 CEST 2018
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
www/manager6/storage/CIFSEdit.js | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/www/manager6/storage/CIFSEdit.js b/www/manager6/storage/CIFSEdit.js
index d982ef86..2be08c7a 100644
--- a/www/manager6/storage/CIFSEdit.js
+++ b/www/manager6/storage/CIFSEdit.js
@@ -127,17 +127,18 @@ Ext.define('PVE.storage.CIFSInputPanel', {
allowBlank: true,
listeners: {
change: function(f, value) {
- if (me.isCreate) {
- var exportField = me.down('field[name=share]');
- exportField.setUsername(value);
+ if (!me.isCreate) {
+ return;
+ }
+ var exportField = me.down('field[name=share]');
+ exportField.setUsername(value);
- if (value == "") {
- passwordfield.disable();
- } else {
- passwordfield.enable();
- }
- passwordfield.validate();
+ if (value == "") {
+ passwordfield.disable();
+ } else {
+ passwordfield.enable();
}
+ passwordfield.validate();
}
}
},
--
2.17.1
More information about the pve-devel
mailing list