disable formatting for autoincrement
This commit is contained in:
@@ -38,6 +38,8 @@ Espo.define('views/fields/autoincrement', 'views/fields/int', function (Dep) {
|
||||
|
||||
readOnly: true,
|
||||
|
||||
disableFormatting: true,
|
||||
|
||||
parse: function (value) {
|
||||
value = (value !== '') ? value : null;
|
||||
if (value !== null) {
|
||||
|
||||
@@ -56,6 +56,9 @@ Espo.define('views/fields/float', 'views/fields/int', function (Dep) {
|
||||
},
|
||||
|
||||
formatNumber: function (value) {
|
||||
if (this.disableFormatting) {
|
||||
return value;
|
||||
}
|
||||
if (value !== null) {
|
||||
var parts = value.toString().split(".");
|
||||
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, this.thousandSeparator);
|
||||
|
||||
@@ -70,6 +70,9 @@ Espo.define('views/fields/int', 'views/fields/base', function (Dep) {
|
||||
},
|
||||
|
||||
formatNumber: function (value) {
|
||||
if (this.disableFormatting) {
|
||||
return value;
|
||||
}
|
||||
if (value !== null) {
|
||||
var stringValue = value.toString();
|
||||
stringValue = stringValue.replace(/\B(?=(\d{3})+(?!\d))/g, this.thousandSeparator);
|
||||
|
||||
Reference in New Issue
Block a user