[pmg-devel] [PATCH pmg-gui] ui: trim whitespaces when adding a subscription key

Stefan Sterz s.sterz at proxmox.com
Fri Mar 1 10:54:30 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>
---
 js/Subscription.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/js/Subscription.js b/js/Subscription.js
index 2293cdb..6d7380c 100644
--- a/js/Subscription.js
+++ b/js/Subscription.js
@@ -8,7 +8,8 @@ Ext.define('PMG.SubscriptionKeyEdit', {
     onlineHelp: 'getting_help',
 
     items: {
-	xtype: 'textfield',
+	xtype: 'proxmoxtextfield',
+	trimValue: true,
 	name: 'key',
 	value: '',
 	fieldLabel: gettext('Subscription Key'),
-- 
2.39.2





More information about the pmg-devel mailing list