[pve-devel] [PATCH manager v2] fix #1307: dont use language dependent separator in gui

Dominik Csapak d.csapak at proxmox.com
Mon Mar 20 16:17:41 CET 2017


by default, extjs submits the language dependent decimal separator,
e.g. ',' for german and '.' for english

but we always want '.'

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/Toolkit.js | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/www/manager6/Toolkit.js b/www/manager6/Toolkit.js
index 7581a9e..0e578da 100644
--- a/www/manager6/Toolkit.js
+++ b/www/manager6/Toolkit.js
@@ -129,6 +129,13 @@ Ext.apply(Ext.form.field.VTypes, {
     HostListText: gettext('Not a valid list of hosts')
 });
 
+// since we always want the number in
+// x.y format and never in e.g. x,y
+Ext.define('PVE.form.field.Number', {
+    override: 'Ext.form.field.Number',
+    submitLocaleSeparator: false
+});
+
 // ExtJs 5-6 has an issue with caching
 // see https://www.sencha.com/forum/showthread.php?308989
 Ext.define('PVE.UnderlayPool', {
-- 
2.1.4





More information about the pve-devel mailing list