]> git.proxmox.com Git - proxmox-widget-toolkit.git/blame - src/panel/PruneKeepPanel.js
prune panel: allow to pass emptyText for keep-last
[proxmox-widget-toolkit.git] / src / panel / PruneKeepPanel.js
CommitLineData
04eb02d9
TL
1Ext.define('Proxmox.panel.PruneInputPanel', {
2 extend: 'Proxmox.panel.InputPanel',
3 xtype: 'pmxPruneInputPanel',
4 mixins: ['Proxmox.Mixin.CBind'],
5
6 // set on use for now
7 //onlineHelp: 'maintenance_pruning',
8
9de5e64e
TL
9 keepLastEmptyText: '',
10
04eb02d9
TL
11 cbindData: function() {
12 let me = this;
13 me.isCreate = !!me.isCreate;
14 return {};
15 },
16
17 column1: [
18 {
914070be 19 xtype: 'pmxPruneKeepField',
04eb02d9
TL
20 name: 'keep-last',
21 fieldLabel: gettext('keep-last'),
22 cbind: {
23 deleteEmpty: '{!isCreate}',
9de5e64e 24 emptyText: '{keepLastEmptyText}',
04eb02d9
TL
25 },
26 },
27 {
914070be 28 xtype: 'pmxPruneKeepField',
04eb02d9
TL
29 name: 'keep-daily',
30 fieldLabel: gettext('Keep Daily'),
31 cbind: {
32 deleteEmpty: '{!isCreate}',
33 },
34 },
35 {
914070be 36 xtype: 'pmxPruneKeepField',
04eb02d9
TL
37 name: 'keep-monthly',
38 fieldLabel: gettext('Keep Monthly'),
39 cbind: {
40 deleteEmpty: '{!isCreate}',
41 },
42 },
43 ],
44 column2: [
45 {
914070be 46 xtype: 'pmxPruneKeepField',
04eb02d9
TL
47 fieldLabel: gettext('Keep Hourly'),
48 name: 'keep-hourly',
49 cbind: {
50 deleteEmpty: '{!isCreate}',
51 },
52 },
53 {
914070be 54 xtype: 'pmxPruneKeepField',
04eb02d9
TL
55 name: 'keep-weekly',
56 fieldLabel: gettext('Keep Weekly'),
57 cbind: {
58 deleteEmpty: '{!isCreate}',
59 },
60 },
61 {
914070be 62 xtype: 'pmxPruneKeepField',
04eb02d9
TL
63 name: 'keep-yearly',
64 fieldLabel: gettext('Keep Yearly'),
65 cbind: {
66 deleteEmpty: '{!isCreate}',
67 },
68 },
69 ],
70});