diff --git a/config/express.js b/config/express.js index e2f218b4..696ac5db 100755 --- a/config/express.js +++ b/config/express.js @@ -117,6 +117,7 @@ module.exports = function(db) { app.use(cookieParser()); // Express MongoDB session storage + app.use(session({ saveUninitialized: true, resave: true, diff --git a/docker-compose.yml b/docker-compose.yml index ce08992e..a2fc97bb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,12 +7,14 @@ services: build: . volumes: - .:/usr/src/app + command: node server.js ports: - "3000:3000" - "35729:35729" environment: DB_1_PORT_27017_TCP_ADDR: db PORT: 3000 + BASE_URL: http://192.168.99.100:3000/ links: - db volumes: diff --git a/public/modules/forms/base/config/forms.client.config.js b/public/modules/forms/base/config/forms.client.config.js index b08eebd7..8bd182e9 100644 --- a/public/modules/forms/base/config/forms.client.config.js +++ b/public/modules/forms/base/config/forms.client.config.js @@ -27,3 +27,19 @@ function(){ return 0; }; }); + +angular.module('forms').value('supportedFields', [ + 'textfield', + 'textarea', + 'date', + 'dropdown', + 'hidden', + 'password', + 'radio', + 'legal', + 'statement', + 'rating', + 'yes_no', + 'number', + 'natural' +]); diff --git a/public/modules/forms/base/directives/field.client.directive.js b/public/modules/forms/base/directives/field.client.directive.js index 204055bd..14177c4f 100644 --- a/public/modules/forms/base/directives/field.client.directive.js +++ b/public/modules/forms/base/directives/field.client.directive.js @@ -8,8 +8,8 @@ var __indexOf = [].indexOf || function(item) { return -1; }; -angular.module('forms').directive('fieldDirective', ['$http', '$compile', '$rootScope', '$templateCache', - function($http, $compile, $rootScope, $templateCache) { +angular.module('forms').directive('fieldDirective', ['$http', '$compile', '$rootScope', '$templateCache', 'supportedFields', + function($http, $compile, $rootScope, $templateCache, supportedFields) { var getTemplateUrl = function(fieldType) { var type = fieldType; @@ -29,7 +29,7 @@ angular.module('forms').directive('fieldDirective', ['$http', '$compile', '$root 'number', 'natural' ]; - if (__indexOf.call(supported_fields, type) >= 0) { + if (__indexOf.call(supportedFields, type) >= 0) { templateUrl = templateUrl+type+'.html'; } return $templateCache.get('../public/'+templateUrl);