]> git.proxmox.com Git - pmg-gui.git/blob - js/RuleEditor.js
spam detector: custom rules: consitent add/edit/remove button & modernization
[pmg-gui.git] / js / RuleEditor.js
1 Ext.define('PMG.RuleEditor', {
2 extend: 'Proxmox.window.Edit',
3 xtype: 'ruleeditwindow',
4 onlineHelp: 'chapter_mailfilter',
5
6 url: undefined,
7
8 method: 'PUT',
9
10 subject: gettext('Rules'),
11
12 width: 400,
13
14 items: [
15 {
16 xtype: 'textfield',
17 name: 'name',
18 allowBlank: false,
19 fieldLabel: gettext('Name'),
20 },
21 {
22 xtype: 'proxmoxintegerfield',
23 name: 'priority',
24 allowBlank: false,
25 minValue: 0,
26 maxValue: 100,
27 fieldLabel: gettext('Priority'),
28 },
29 {
30 xtype: 'proxmoxKVComboBox',
31 name: 'direction',
32 comboItems: [
33 [0, PMG.Utils.rule_direction_text[0]],
34 [1, PMG.Utils.rule_direction_text[1]],
35 [2, PMG.Utils.rule_direction_text[2]]],
36 value: 2,
37 fieldLabel: gettext('Direction'),
38 },
39 {
40 xtype: 'proxmoxcheckbox',
41 name: 'active',
42 defaultValue: 0,
43 uncheckedValue: 0,
44 checked: false,
45 fieldLabel: gettext('Active'),
46 },
47 ],
48 });