[pve-devel] [PATCH widget-toolkit 2/5] toolkit: fix #1307: don\'t use language dependent separator

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Dec 19 08:16:12 CET 2017


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

We always want the dot.

commit 5c660b6d1302a5fbb3dcf477cf8b5adc9f798530 from pve-manager

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 Toolkit.js | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Toolkit.js b/Toolkit.js
index bcfdf8e..166da4d 100644
--- a/Toolkit.js
+++ b/Toolkit.js
@@ -138,6 +138,12 @@ Ext.apply(Ext.form.field.VTypes, {
     passwordText: gettext('Passwords do not match')
 });
 
+// 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('Proxmox.UnderlayPool', {
-- 
2.11.0





More information about the pve-devel mailing list