From fbb1fdb8fe50e8a65e47966b8ab055be6143eb3c Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Tue, 5 Nov 2013 12:44:24 +0200 Subject: [PATCH] enumInt field --- .../Espo/Metadata/entityDefs/Preferences.json | 4 +-- .../Espo/Metadata/entityDefs/Settings.json | 6 ++--- application/Espo/Metadata/fields/enumInt.json | 25 +++++++++++++++++++ 3 files changed, 30 insertions(+), 5 deletions(-) create mode 100755 application/Espo/Metadata/fields/enumInt.json diff --git a/application/Espo/Metadata/entityDefs/Preferences.json b/application/Espo/Metadata/entityDefs/Preferences.json index 245fe27a92..6530a9bde1 100644 --- a/application/Espo/Metadata/entityDefs/Preferences.json +++ b/application/Espo/Metadata/entityDefs/Preferences.json @@ -14,8 +14,8 @@ "default": "HH:mm" }, "weekStart": { - "type": "enum", - "options": ["0", "1"], + "type": "enumInt", + "options": [0, 1], "default": 0 }, "thousandSeparator": { diff --git a/application/Espo/Metadata/entityDefs/Settings.json b/application/Espo/Metadata/entityDefs/Settings.json index eab6236736..bbc097b1a3 100644 --- a/application/Espo/Metadata/entityDefs/Settings.json +++ b/application/Espo/Metadata/entityDefs/Settings.json @@ -32,9 +32,9 @@ "default": "HH:mm" }, "weekStart": { - "type": "enum", - "options": ["0", "1"], - "default": "1" + "type": "enumInt", + "options": [0, 1], + "default": 1 }, "thousandSeparator": { "type": "varchar", diff --git a/application/Espo/Metadata/fields/enumInt.json b/application/Espo/Metadata/fields/enumInt.json new file mode 100755 index 0000000000..056f52b724 --- /dev/null +++ b/application/Espo/Metadata/fields/enumInt.json @@ -0,0 +1,25 @@ +{ + "params":[ + { + "name":"required", + "type":"bool", + "default":false + }, + { + "name":"options", + "type":"array" + }, + { + "name":"default", + "type":"varchar" + }, + { + "name":"translation", + "type":"varchar" + } + ], + "search":{ + "basic":false, + "advanced":true + } +}