summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorPouyan Savoli <papoola@hotmail.com>2017-09-18 00:46:17 +0200
committerPouyan Savoli <papoola@hotmail.com>2017-09-22 22:59:32 +0200
commit3753337d60e17e5e72ec071aa4a1b28e36297d15 (patch)
tree81363c3fb7d1af2c90e7a3e2b1233412569bd52d /models
parentcaad952bc1b29bb925c1347a14daa5d1ec8ada81 (diff)
downloadwekan-3753337d60e17e5e72ec071aa4a1b28e36297d15.tar.gz
wekan-3753337d60e17e5e72ec071aa4a1b28e36297d15.tar.bz2
wekan-3753337d60e17e5e72ec071aa4a1b28e36297d15.zip
dropdown items
Diffstat (limited to 'models')
-rw-r--r--models/customFields.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/models/customFields.js b/models/customFields.js
index 5e76db35..8b0abef4 100644
--- a/models/customFields.js
+++ b/models/customFields.js
@@ -9,6 +9,24 @@ CustomFields.attachSchema(new SimpleSchema({
},
type: {
type: String,
+ allowedValues: ['text', 'number', 'checkbox', 'date', 'dropdown']
+ },
+ settings: {
+ type: Object,
+ },
+ 'settings.dropdownItems': {
+ type: [Object],
+ optional: true
+ },
+ 'settings.dropdownItems.$': {
+ type: new SimpleSchema({
+ _id: {
+ type: String,
+ },
+ name: {
+ type: String,
+ },
+ })
},
showOnCard: {
type: Boolean,
@@ -83,6 +101,7 @@ if (Meteor.isServer) {
const id = CustomFields.direct.insert({
name: req.body.name,
type: req.body.type,
+ settings: req.body.settings,
showOnCard: req.body.showOnCard,
boardId: paramBoardId,
});