[pve-devel] [PATCH manager] Use emptyText to inform the user of the value that will set be when the field is empty

Emmanuel Kasper e.kasper at proxmox.com
Mon Jun 26 14:18:05 CEST 2017


emptyText is not submitted, because it does not count as value when getSubmitValue() is
called on it in PVE.panel.InputPanel.getValues()
---
 www/manager6/lxc/DNS.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/www/manager6/lxc/DNS.js b/www/manager6/lxc/DNS.js
index 2c087ae7..9b17c6f5 100644
--- a/www/manager6/lxc/DNS.js
+++ b/www/manager6/lxc/DNS.js
@@ -170,7 +170,8 @@ Ext.define('PVE.lxc.DNS', {
 			    xtype: 'textfield',
 			    name: 'hostname',
 			    vtype: 'DnsName',
-			    allowBlank: true
+			    allowBlank: true,
+			    emptyText: 'CT' + vmid.toString()
 			},
 			onGetValues: function(values) {
 			    var params = values;
-- 
2.11.0





More information about the pve-devel mailing list