pve-manager/www/manager6/dc/GroupEdit.js
Thomas Lamprecht 8058410f40 ui: eslint: fix various spacing related issues
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-01-19 17:39:15 +01:00

49 lines
1.0 KiB
JavaScript

Ext.define('PVE.dc.GroupEdit', {
extend: 'Proxmox.window.Edit',
alias: ['widget.pveDcGroupEdit'],
initComponent: function() {
var me = this;
me.isCreate = !me.groupid;
var url;
var method;
if (me.isCreate) {
url = '/api2/extjs/access/groups';
method = 'POST';
} else {
url = '/api2/extjs/access/groups/' + me.groupid;
method = 'PUT';
}
Ext.applyIf(me, {
subject: gettext('Group'),
url: url,
method: method,
items: [
{
xtype: me.isCreate ? 'proxmoxtextfield' : 'displayfield',
fieldLabel: gettext('Name'),
name: 'groupid',
value: me.groupid,
allowBlank: false,
},
{
xtype: 'textfield',
fieldLabel: gettext('Comment'),
name: 'comment',
allowBlank: true,
},
],
});
me.callParent();
if (!me.isCreate) {
me.load();
}
},
});