pve-manager/www/manager6/window/NotesEdit.js
Thomas Lamprecht a78362cf06 ui: notes edit: set maxLength on text area
the backend will have actual explicit length limits on the
description properties (was limited indirectly through PUT/POST
request size limit of 64 KiB), so convey that limit also in the GUI.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-06-18 19:23:15 +02:00

32 lines
523 B
JavaScript

Ext.define('PVE.window.NotesEdit', {
extend: 'Proxmox.window.Edit',
title: gettext('Notes'),
width: 600,
height: '400px',
resizable: true,
layout: 'fit',
autoLoad: true,
defaultButton: undefined,
setMaxLength: function(maxLength) {
let me = this;
let area = me.down('textarea[name="description"]');
area.maxLength = maxLength;
area.validate();
return me;
},
items: {
xtype: 'textarea',
name: 'description',
height: '100%',
value: '',
hideLabel: true,
},
});