ui: trim whitespaces when adding a subscription key

users that add the correct subscription key just get unnecessarily
confused with a "value does not match the regex pattern" error if
they accidentally have a stray whitespace at the end or beginning
otherwise.

Switch to using our `proxmoxtextfield` component that provides a
`trimValue` config option since widget-toolkit commit 5d7d30d ("text
field: add trimValue config") that was made just for this case.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
 [ TL: reference widget toolkit commit ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Stefan Sterz 2024-03-01 10:40:19 +01:00 committed by Thomas Lamprecht
parent deb33767d5
commit 9d66b5b5c3

View File

@ -8,7 +8,8 @@ Ext.define('PBS.SubscriptionKeyEdit', {
onlineHelp: 'get_help',
items: {
xtype: 'textfield',
xtype: 'proxmoxtextfield',
trimValue: true,
labelWidth: 120,
name: 'key',
value: '',