]> git.proxmox.com Git - pve-manager.git/blob - www/manager/form/GroupSelector.js
add htmlEncode to various comment/description fields
[pve-manager.git] / www / manager / form / GroupSelector.js
1 Ext.define('PVE.form.GroupSelector', {
2 extend: 'PVE.form.ComboGrid',
3 alias: ['widget.pveGroupSelector'],
4
5 allowBlank: false,
6
7 initComponent: function() {
8 var me = this;
9
10 var store = new Ext.data.Store({
11 model: 'pve-groups'
12 });
13
14 Ext.apply(me, {
15 store: store,
16 autoSelect: false,
17 valueField: 'groupid',
18 displayField: 'groupid',
19 listConfig: {
20 columns: [
21 {
22 header: gettext('Group'),
23 sortable: true,
24 dataIndex: 'groupid',
25 flex: 1
26 },
27 {
28 id: 'comment',
29 header: gettext('Comment'),
30 sortable: false,
31 dataIndex: 'comment',
32 renderer: Ext.String.htmlEncode,
33 flex: 1
34 }
35 ]
36 }
37 });
38
39 me.callParent();
40
41 store.load();
42 }
43
44 }, function() {
45
46 Ext.define('pve-groups', {
47 extend: 'Ext.data.Model',
48 fields: [ 'groupid', 'comment' ],
49 proxy: {
50 type: 'pve',
51 url: "/api2/json/access/groups"
52 },
53 idProperty: 'groupid'
54 });
55
56 });