[pbs-devel] [PATCH proxmox-backup] ui: trim whitespaces when adding a subscription key

Stefan Sterz s.sterz at proxmox.com
Fri Mar 1 10:40:19 CET 2024


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.

Signed-off-by: Stefan Sterz <s.sterz at proxmox.com>
---
 www/Subscription.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/www/Subscription.js b/www/Subscription.js
index 7f1de468..0780c4d4 100644
--- a/www/Subscription.js
+++ b/www/Subscription.js
@@ -8,7 +8,8 @@ Ext.define('PBS.SubscriptionKeyEdit', {
     onlineHelp: 'get_help',
 
     items: {
-	xtype: 'textfield',
+	xtype: 'proxmoxtextfield',
+	trimValue: true,
 	labelWidth: 120,
 	name: 'key',
 	value: '',
-- 
2.39.2





More information about the pbs-devel mailing list