fix #4588: ui: acme: allow setting the alias of DNS domains
Domains validated with the DNS challenge can have an alias, so that the challenge record is created on another domain, which the '_acme-challenge' record of the domain points to with a CNAME. This is useful if the DNS plugin should not be able to update the zone of the domain itself. But the alias could only be set on the CLI, as the edit window only kept an existing one in a hidden field. Show it as a text field for domains with the DNS challenge type, like the plugin. Signed-off-by: Michal Fox <me@dualfroz.com>
This commit is contained in:
1 parent
030019a739
commit
d8f02f4336
1 file changed
+13
-7
@@ -332,16 +332,14 @@ Ext.define('PVE.node.ACMEDomainEdit', {
|
|||||||
change: function (cb, value) {
|
change: function (cb, value) {
|
||||||
let me = this;
|
let me = this;
|
||||||
let view = me.up('pveACMEDomainEdit');
|
let view = me.up('pveACMEDomainEdit');
|
||||||
let pluginField = view.down('field[name=plugin]');
|
for (const name of ['plugin', 'alias']) {
|
||||||
pluginField.setDisabled(value !== 'dns');
|
let field = view.down(`field[name=${name}]`);
|
||||||
pluginField.setHidden(value !== 'dns');
|
field.setDisabled(value !== 'dns');
|
||||||
|
field.setHidden(value !== 'dns');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
xtype: 'hidden',
|
|
||||||
name: 'alias',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
xtype: 'pveACMEPluginSelector',
|
xtype: 'pveACMEPluginSelector',
|
||||||
name: 'plugin',
|
name: 'plugin',
|
||||||
@@ -357,6 +355,14 @@ Ext.define('PVE.node.ACMEDomainEdit', {
|
|||||||
value: '',
|
value: '',
|
||||||
fieldLabel: gettext('Domain'),
|
fieldLabel: gettext('Domain'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
xtype: 'proxmoxtextfield',
|
||||||
|
name: 'alias',
|
||||||
|
disabled: true,
|
||||||
|
hidden: true,
|
||||||
|
fieldLabel: gettext('Alias'),
|
||||||
|
emptyText: Proxmox.Utils.noneText,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in new issue
Block a user