]> git.proxmox.com Git - pve-manager.git/blame - www/manager/dc/GroupEdit.js
disable animation of charts on load
[pve-manager.git] / www / manager / dc / GroupEdit.js
CommitLineData
aff192e6
DM
1Ext.define('PVE.dc.GroupEdit', {
2 extend: 'PVE.window.Edit',
3 alias: ['widget.pveDcGroupEdit'],
4
5 initComponent : function() {
6 var me = this;
7
8 me.create = !me.groupid;
9
10 var url;
11 var method;
12
13 if (me.create) {
14 url = '/api2/extjs/access/groups';
15 method = 'POST';
16 } else {
17 url = '/api2/extjs/access/groups/' + me.groupid;
18 method = 'PUT';
19 }
20
21 Ext.applyIf(me, {
58eb5905 22 subject: gettext('Group'),
aff192e6
DM
23 url: url,
24 method: method,
25 items: [
26 {
971b6875
DM
27 xtype: me.create ? 'pvetextfield' : 'displayfield',
28 fieldLabel: gettext('Name'),
aff192e6
DM
29 name: 'groupid',
30 value: me.groupid,
31 allowBlank: false
32 },
33 {
3f7fa559 34 xtype: 'textfield',
32314691 35 fieldLabel: gettext('Comment'),
aff192e6 36 name: 'comment',
3f7fa559 37 allowBlank: true
aff192e6
DM
38 }
39 ]
40 });
41
42 me.callParent();
43
44 if (!me.create) {
45 me.load();
46 }
47 }
48});