]>
Commit | Line | Data |
---|---|---|
1 | // ExtJS related things | |
2 | ||
3 | Proxmox.Utils.toolkit = 'extjs'; | |
4 | ||
5 | // custom PVE specific VTypes | |
6 | Ext.apply(Ext.form.field.VTypes, { | |
7 | ||
8 | QemuStartDate: function(v) { | |
9 | return (/^(now|\d{4}-\d{1,2}-\d{1,2}(T\d{1,2}:\d{1,2}:\d{1,2})?)$/).test(v); | |
10 | }, | |
11 | QemuStartDateText: gettext('Format') + ': "now" or "2006-06-17T16:01:21" or "2006-06-17"', | |
12 | IP64AddressList: v => PVE.Utils.verify_ip64_address_list(v, false), | |
13 | IP64AddressWithSuffixList: v => PVE.Utils.verify_ip64_address_list(v, true), | |
14 | IP64AddressListText: gettext('Example') + ': 192.168.1.1,192.168.1.2', | |
15 | IP64AddressListMask: /[A-Fa-f0-9,:.; ]/, | |
16 | PciIdText: gettext('Example') + ': 0x8086', | |
17 | PciId: v => /^0x[0-9a-fA-F]{4}$/.test(v), | |
18 | }); | |
19 | ||
20 | Ext.define('PVE.form.field.Display', { | |
21 | override: 'Ext.form.field.Display', | |
22 | ||
23 | setSubmitValue: function(value) { | |
24 | // do nothing, this is only to allow generalized bindings for the: | |
25 | // `me.isCreate ? 'textfield' : 'displayfield'` cases we have. | |
26 | }, | |
27 | }); |