]> git.proxmox.com Git - pmg-gui.git/blame - js/MailInfo.js
fix #4818: Revert "UserEdit: add minLength of 4 to username field"
[pmg-gui.git] / js / MailInfo.js
CommitLineData
54d0de79
DC
1Ext.define('PMG.MailInfoBox', {
2 extend: 'Ext.container.Container',
3 xtype: 'pmgMailInfo',
4
5 cls: 'x-toolbar-default',
6 style: {
7 'border-left': '0px',
8 'border-right': '0px',
9 },
10
11 update: function(data) {
12 let me = this;
13 let escaped = {};
60652b75 14 for (const [key, value] of Object.entries(data || {})) {
b6b5d718 15 escaped[key] = Ext.util.Format.ellipsis(Ext.htmlEncode(value), 103);
54d0de79
DC
16 }
17 me.items.each((item) => item.update(escaped));
18 },
19
20 layout: {
21 type: 'vbox',
22 align: 'stretch',
23 },
24
25 defaults: {
26 xtype: 'tbtext',
ca33688b 27 margin: '2 2 0 0 ',
54d0de79
DC
28 },
29
30 items: [
135cddbb
TL
31 {
32 tpl: `<b class="bold">${gettext("From")}:</b> {from}`
33 + `<span style="float:right;white-space:normal;overflow-wrap:break-word;">`
34 + `<b class="bold">${gettext("Receiver")}:</b> {receiver}</span>`,
35 },
ca33688b 36 { tpl: `<b class="bold">${gettext("Subject")}:</b> {subject}` },
54d0de79
DC
37 ],
38});