mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-15 11:17:59 +00:00
fix lxc hostname input window
we used a static emptytext at creation, which is wrong after editing now copied from qemu/Options.js (the name), but instead of deleting the hostname on the backend on an empty field, we set it to CT<VMID> (this is also the default in the wizard) Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
d5a7996b13
commit
6b70251440
@ -164,13 +164,23 @@ Ext.define('PVE.lxc.DNS', {
|
||||
xtype: 'pveWindowEdit',
|
||||
subject: gettext('Hostname'),
|
||||
items: {
|
||||
xtype: 'textfield',
|
||||
name: 'hostname',
|
||||
vtype: 'DnsName',
|
||||
value: '',
|
||||
fieldLabel: gettext('Hostname'),
|
||||
allowBlank: true,
|
||||
emptyText: me.pveSelNode.data.name
|
||||
xtype: 'inputpanel',
|
||||
items:{
|
||||
fieldLabel: gettext('Hostname'),
|
||||
xtype: 'textfield',
|
||||
name: 'hostname',
|
||||
vtype: 'DnsName',
|
||||
allowBlank: true
|
||||
},
|
||||
onGetValues: function(values) {
|
||||
var params = values;
|
||||
if (values.hostname === undefined ||
|
||||
values.hostname === null ||
|
||||
values.hostname === '') {
|
||||
params = { hostname: 'CT'+vmid.toString()};
|
||||
}
|
||||
return params;
|
||||
}
|
||||
}
|
||||
} : undefined
|
||||
},
|
||||
@ -231,6 +241,7 @@ Ext.define('PVE.lxc.DNS', {
|
||||
url: '/api2/extjs/' + baseurl
|
||||
}, rowdef.editor);
|
||||
win = Ext.createWidget(rowdef.editor.xtype, config);
|
||||
win.load();
|
||||
}
|
||||
//win.load();
|
||||
win.show();
|
||||
|
Loading…
Reference in New Issue
Block a user