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:
parent
deb33767d5
commit
9d66b5b5c3
@ -8,7 +8,8 @@ Ext.define('PBS.SubscriptionKeyEdit', {
|
||||
onlineHelp: 'get_help',
|
||||
|
||||
items: {
|
||||
xtype: 'textfield',
|
||||
xtype: 'proxmoxtextfield',
|
||||
trimValue: true,
|
||||
labelWidth: 120,
|
||||
name: 'key',
|
||||
value: '',
|
||||
|
Loading…
Reference in New Issue
Block a user