diff options
author | Pouyan Savoli <papoola@hotmail.com> | 2017-09-18 00:46:17 +0200 |
---|---|---|
committer | Pouyan Savoli <papoola@hotmail.com> | 2017-09-22 22:59:32 +0200 |
commit | 3753337d60e17e5e72ec071aa4a1b28e36297d15 (patch) | |
tree | 81363c3fb7d1af2c90e7a3e2b1233412569bd52d /models/customFields.js | |
parent | caad952bc1b29bb925c1347a14daa5d1ec8ada81 (diff) | |
download | wekan-3753337d60e17e5e72ec071aa4a1b28e36297d15.tar.gz wekan-3753337d60e17e5e72ec071aa4a1b28e36297d15.tar.bz2 wekan-3753337d60e17e5e72ec071aa4a1b28e36297d15.zip |
dropdown items
Diffstat (limited to 'models/customFields.js')
-rw-r--r-- | models/customFields.js | 19 |
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, }); |