name: 'contact',
vtype: 'email',
allowBlank: false,
- fieldLabel: gettext('E-Mail')
+ fieldLabel: gettext('E-Mail'),
},
{
xtype: 'proxmoxComboGrid',
idProperty: ['name'],
proxy: {
type: 'proxmox',
- url: '/api2/json/cluster/acme/directories'
+ url: '/api2/json/cluster/acme/directories',
},
sorters: {
property: 'name',
- order: 'ASC'
- }
+ order: 'ASC',
+ },
},
listConfig: {
columns: [
{
header: gettext('Name'),
dataIndex: 'name',
- flex: 1
+ flex: 1,
},
{
header: gettext('URL'),
dataIndex: 'url',
- flex: 1
- }
- ]
+ flex: 1,
+ },
+ ],
},
listeners: {
change: function(combogrid, value) {
disp.setValue(gettext('Loading'));
field.setValue(undefined);
checkbox.setValue(undefined);
+ checkbox.setHidden(true);
Proxmox.Utils.API2Request({
url: '/cluster/acme/tos',
method: 'GET',
params: {
- directory: value
+ directory: value,
},
success: function(response, opt) {
- me.up('window').down('#tos_url').setValue(response.result.data);
- me.up('window').down('#tos_url_display').setValue(response.result.data);
+ field.setValue(response.result.data);
+ disp.setValue(response.result.data);
+ checkbox.setHidden(false);
},
failure: function(response, opt) {
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
- }
+ },
});
- }
- }
+ },
+ },
},
{
xtype: 'displayfield',
itemId: 'tos_url_display',
renderer: PVE.Utils.render_optional_url,
- name: 'tos_url_display'
+ name: 'tos_url_display',
},
{
xtype: 'hidden',
itemId: 'tos_url',
- name: 'tos_url'
+ name: 'tos_url',
},
{
xtype: 'proxmoxcheckbox',
return true;
}
return false;
- }
+ },
},
- ]
+ ],
});
width: 600,
fieldDefaults: {
- labelWidth: 140
+ labelWidth: 140,
},
title: gettext('Account'),
{
xtype: 'displayfield',
fieldLabel: gettext('E-Mail'),
- name: 'email'
+ name: 'email',
},
{
xtype: 'displayfield',
fieldLabel: gettext('Created'),
- name: 'createdAt'
+ name: 'createdAt',
},
{
xtype: 'displayfield',
fieldLabel: gettext('Status'),
- name: 'status'
+ name: 'status',
},
{
xtype: 'displayfield',
fieldLabel: gettext('Directory'),
renderer: PVE.Utils.render_optional_url,
- name: 'directory'
+ name: 'directory',
},
{
xtype: 'displayfield',
fieldLabel: gettext('Terms of Services'),
renderer: PVE.Utils.render_optional_url,
- name: 'tos'
- }
+ name: 'tos',
+ },
],
initComponent: function() {
data.createdAt = data.account.createdAt;
data.status = data.account.status;
me.setValues(data);
- }
+ },
});
- }
+ },
});
Ext.define('PVE.node.ACMEDomainEdit', {