merged with master
This commit is contained in:
commit
4f2682554d
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -1,14 +1,10 @@
|
||||||
dist
|
dist
|
||||||
.vagrant
|
.vagrant
|
||||||
npm-debug.*
|
npm-debug.*
|
||||||
docs/Oscar_Credentials.md
|
|
||||||
scripts/test_oscarhost.js
|
scripts/test_oscarhost.js
|
||||||
scripts/oscarhost/private/
|
|
||||||
coverage/
|
coverage/
|
||||||
e2e_coverage/
|
e2e_coverage/
|
||||||
uploads/
|
|
||||||
app/e2e_tests/screeshots/*
|
app/e2e_tests/screeshots/*
|
||||||
tmp
|
|
||||||
|
|
||||||
# iOS / Apple
|
# iOS / Apple
|
||||||
# ===========
|
# ===========
|
||||||
|
@ -25,6 +21,7 @@ Oscar_Credentials.*
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
node_modules/
|
node_modules/
|
||||||
public/lib/
|
public/lib/
|
||||||
|
public/dist
|
||||||
app/tests/coverage/
|
app/tests/coverage/
|
||||||
.bower-*/
|
.bower-*/
|
||||||
.idea/
|
.idea/
|
||||||
|
|
13
README.md
13
README.md
|
@ -4,7 +4,7 @@ TellForm 2.1.0
|
||||||
[![Build Status](https://travis-ci.org/tellform/tellform.svg?branch=master)](https://travis-ci.org/tellform/tellform)
|
[![Build Status](https://travis-ci.org/tellform/tellform.svg?branch=master)](https://travis-ci.org/tellform/tellform)
|
||||||
![Project Status](https://img.shields.io/badge/status-2.1.0-green.svg)
|
![Project Status](https://img.shields.io/badge/status-2.1.0-green.svg)
|
||||||
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/3491e86eb7194308b8fc80711d736ede)](https://www.codacy.com/app/david-baldwin/tellform?utm_source=github.com&utm_medium=referral&utm_content=tellform/tellform&utm_campaign=Badge_Grade)
|
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/3491e86eb7194308b8fc80711d736ede)](https://www.codacy.com/app/david-baldwin/tellform?utm_source=github.com&utm_medium=referral&utm_content=tellform/tellform&utm_campaign=Badge_Grade)
|
||||||
[![Gitter](https://badges.gitter.im/tellform/tellform.svg)](https://gitter.im/tellform/tellform?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
[![Gitter](https://badges.gitter.im/tellform/Lobby.svg)](https://gitter.im/tellform/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||||
|
|
||||||
> An *opensource alternative to TypeForm* that can create [stunning mobile-ready forms](https://tellform.com/examples) , surveys and questionnaires.
|
> An *opensource alternative to TypeForm* that can create [stunning mobile-ready forms](https://tellform.com/examples) , surveys and questionnaires.
|
||||||
|
|
||||||
|
@ -119,14 +119,7 @@ Your application should run on port 3000 or the port you specified in your .env
|
||||||
|
|
||||||
To deploy with docker, first install docker [here](https://docs.docker.com/engine/installation/).
|
To deploy with docker, first install docker [here](https://docs.docker.com/engine/installation/).
|
||||||
|
|
||||||
Then run these commands
|
Then see this page [here](https://tellform.com/install_docker) for commands on how to deploy your own local TellForm instance.
|
||||||
|
|
||||||
```
|
|
||||||
$ docker run -p 27017:27017 -d --name some-mongo mongo
|
|
||||||
$ docker run -p 127.0.0.1:6379:6379 -d --name some-redis redis
|
|
||||||
$ docker run --rm -p 3000:3000 --link some-redis:redis-db --link some-mongo:db -e "SUBDOMAINS_DISABLED=TRUE" -e "DISABLE_CLUSTER_MODE=TRUE" -e "MAILER_EMAIL_ID=<YourEmailAPI_ID>" -e "MAILER_FROM=<noreply@yourdomain.com>" -e "MAILER_SERVICE_PROVIDER=<YourEmailAPIProvider>" -e "MAILER_PASSWORD=<YourAPIKey>" -e "BASE_URL=localhost" -p 80:80 tellform/development
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## Testing Your Application
|
## Testing Your Application
|
||||||
You can run the full test suite included with TellForm with the test task:
|
You can run the full test suite included with TellForm with the test task:
|
||||||
|
@ -201,7 +194,7 @@ TellForm's configuration is done with environment variables. To set an option fo
|
||||||
|
|
||||||
## Where to get help
|
## Where to get help
|
||||||
|
|
||||||
[Gitter Chat](https://gitter.im/tellform/tellform)
|
[Gitter Chat](https://gitter.im/tellform/Lobby)
|
||||||
|
|
||||||
[Official Twitter](https://twitter.com/tellform_real)
|
[Official Twitter](https://twitter.com/tellform_real)
|
||||||
|
|
||||||
|
|
7
app.json
7
app.json
|
@ -28,5 +28,10 @@
|
||||||
"description": "Which mail service/API you will be using (i.e. SparkPost, Mandrill, etc)",
|
"description": "Which mail service/API you will be using (i.e. SparkPost, Mandrill, etc)",
|
||||||
"value": "SendGrid"
|
"value": "SendGrid"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"buildpacks": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/heroku/heroku-buildpack-nodejs#v111"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,20 +10,8 @@ var mongoose = require('mongoose'),
|
||||||
timeStampPlugin = require('../libs/timestamp.server.plugin'),
|
timeStampPlugin = require('../libs/timestamp.server.plugin'),
|
||||||
path = require('path'),
|
path = require('path'),
|
||||||
querystring = require('querystring'),
|
querystring = require('querystring'),
|
||||||
nodemailer = require('nodemailer'),
|
|
||||||
constants = require('../libs/constants');
|
constants = require('../libs/constants');
|
||||||
|
|
||||||
var smtpTransport = nodemailer.createTransport(config.mailer.options);
|
|
||||||
|
|
||||||
// verify connection configuration on startup
|
|
||||||
smtpTransport.verify(function(error, success) {
|
|
||||||
if (error) {
|
|
||||||
console.log('Your mail configuration is incorrect', error);
|
|
||||||
} else {
|
|
||||||
console.log('Mail server is ready to take our messages');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User Schema
|
* User Schema
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -51,7 +51,7 @@ html(lang='en', xmlns='http://www.w3.org/1999/xhtml')
|
||||||
|
|
||||||
block content
|
block content
|
||||||
|
|
||||||
script window.ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;ga('create','{{google_analytics_id}}','auto');ga('send','pageview')
|
script window.ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;ga('create','#{google_analytics_id}','auto');ga('send','pageview')
|
||||||
|
|
||||||
script(src='https://www.google-analytics.com/analytics.js', async='', defer='')
|
script(src='https://www.google-analytics.com/analytics.js', async='', defer='')
|
||||||
|
|
||||||
|
|
7
config/env/production.js
vendored
7
config/env/production.js
vendored
|
@ -28,9 +28,8 @@ module.exports = {
|
||||||
domain: process.env.BASE_URL || '.tellform.com'
|
domain: process.env.BASE_URL || '.tellform.com'
|
||||||
},
|
},
|
||||||
assets: {
|
assets: {
|
||||||
bower_js: 'public/dist/vendor.min.js',
|
css: ['public/dist/application.min.css'],
|
||||||
css: 'public/dist/application.min.css',
|
js: ['public/dist/application.min.js', 'public/dist/populate_template_cache.js'],
|
||||||
js: 'public/dist/application.min.js',
|
form_js: ['public/dist/form-application.min.js', 'public/dist/form_populate_template_cache.js', 'public/dist/form-vendor.min.js']
|
||||||
form_js: 'public/dist/form-application.min.js'
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -123,7 +123,7 @@ module.exports = function(grunt) {
|
||||||
compress: true
|
compress: true
|
||||||
},
|
},
|
||||||
files: {
|
files: {
|
||||||
'public/dist/vendor.min.js': bowerArray
|
'public/dist/form-vendor.min.js': bowerArray
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
39
package-lock.json
generated
39
package-lock.json
generated
|
@ -3124,13 +3124,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"connect-mongo": {
|
"connect-mongo": {
|
||||||
"version": "0.8.2",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/connect-mongo/-/connect-mongo-0.8.2.tgz",
|
"resolved": "https://registry.npmjs.org/connect-mongo/-/connect-mongo-2.0.0.tgz",
|
||||||
"integrity": "sha1-ySh47sDFpaZiW3mgwhTzf4YfxuA=",
|
"integrity": "sha512-2Nj5d4XO55AXSy1GOXDZteSEEUObGm/kvJaXyEQCa8cCHsCiZH+V/+sjk3b+khc4V8oyVi34rCtUxor4TfETLA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"debug": "3.1.0",
|
|
||||||
"depd": "1.1.1",
|
|
||||||
"lodash": "4.17.4",
|
|
||||||
"mongodb": "2.0.55"
|
"mongodb": "2.0.55"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -4060,6 +4057,36 @@
|
||||||
"resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz",
|
||||||
"integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY="
|
"integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY="
|
||||||
},
|
},
|
||||||
|
"envfile": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/envfile/-/envfile-2.1.1.tgz",
|
||||||
|
"integrity": "sha1-jlrmacHyRZ5YkJWdn4obHAXmj50=",
|
||||||
|
"requires": {
|
||||||
|
"ambi": "2.5.0",
|
||||||
|
"eachr": "3.2.0",
|
||||||
|
"editions": "1.3.3",
|
||||||
|
"typechecker": "4.4.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"eachr": {
|
||||||
|
"version": "3.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/eachr/-/eachr-3.2.0.tgz",
|
||||||
|
"integrity": "sha1-LDXkPqCGUW95l8+At6pk1VpKRIQ=",
|
||||||
|
"requires": {
|
||||||
|
"editions": "1.3.3",
|
||||||
|
"typechecker": "4.4.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"typechecker": {
|
||||||
|
"version": "4.4.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/typechecker/-/typechecker-4.4.1.tgz",
|
||||||
|
"integrity": "sha1-+XuV9RsDhBchLWd9RaNz7nvO1+Y=",
|
||||||
|
"requires": {
|
||||||
|
"editions": "1.3.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"error-ex": {
|
"error-ex": {
|
||||||
"version": "1.3.1",
|
"version": "1.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz",
|
||||||
|
|
|
@ -32,12 +32,13 @@
|
||||||
"chalk": "^1.1.3",
|
"chalk": "^1.1.3",
|
||||||
"compression": "~1.6.0",
|
"compression": "~1.6.0",
|
||||||
"connect": "^3.4.1",
|
"connect": "^3.4.1",
|
||||||
"connect-mongo": "~0.8.2",
|
"connect-mongo": "^2.0.0",
|
||||||
"consolidate": "~0.14.5",
|
"consolidate": "~0.14.5",
|
||||||
"cookie-parser": "~1.4.0",
|
"cookie-parser": "~1.4.0",
|
||||||
"deep-diff": "^0.3.4",
|
"deep-diff": "^0.3.4",
|
||||||
"dotenv": "^2.0.0",
|
"dotenv": "^2.0.0",
|
||||||
"email-verification": "github:tellform/node-email-verification",
|
"email-verification": "github:tellform/node-email-verification",
|
||||||
|
"envfile": "^2.1.1",
|
||||||
"express": "~4.13.3",
|
"express": "~4.13.3",
|
||||||
"express-session": "~1.12.1",
|
"express-session": "~1.12.1",
|
||||||
"glob": "^7.0.3",
|
"glob": "^7.0.3",
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
// Setting up route
|
// Setting up route
|
||||||
angular.module('core').config(['$stateProvider', '$urlRouterProvider',
|
angular.module('core').config(['$stateProvider', '$urlRouterProvider',
|
||||||
function($stateProvider, $urlRouterProvider, Authorization) {
|
function($stateProvider, $urlRouterProvider) {
|
||||||
// Redirect to home view when route not found
|
// Redirect to home view when route not found
|
||||||
$urlRouterProvider.otherwise('/forms');
|
$urlRouterProvider.otherwise('/forms');
|
||||||
}
|
}
|
||||||
|
@ -20,14 +20,9 @@ angular.module(ApplicationConfiguration.applicationModuleName).run(['$rootScope'
|
||||||
state: fromState,
|
state: fromState,
|
||||||
params: fromParams
|
params: fromParams
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
var statesToIgnore = ['home', 'signin', 'resendVerifyEmail', 'verify', 'signup', 'signup-success', 'forgot', 'reset-invalid', 'reset', 'reset-success'];
|
|
||||||
|
|
||||||
=======
|
|
||||||
var statesToIgnore = ['', 'home', 'signin', 'resendVerifyEmail', 'verify', 'signup', 'signup-success', 'forgot', 'reset-invalid', 'reset', 'reset-success'];
|
var statesToIgnore = ['', 'home', 'signin', 'resendVerifyEmail', 'verify', 'signup', 'signup-success', 'forgot', 'reset-invalid', 'reset', 'reset-success'];
|
||||||
|
|
||||||
>>>>>>> 2.20
|
|
||||||
//Redirect to listForms if user is authenticated
|
//Redirect to listForms if user is authenticated
|
||||||
if(statesToIgnore.indexOf(toState.name) > 0){
|
if(statesToIgnore.indexOf(toState.name) > 0){
|
||||||
if(Auth.isAuthenticated()){
|
if(Auth.isAuthenticated()){
|
||||||
|
|
|
@ -1,18 +1,11 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
//TODO: DAVID: URGENT: Make this a $resource that fetches valid field types from server
|
//TODO: DAVID: URGENT: Make this a $resource that fetches valid field types from server
|
||||||
<<<<<<< HEAD
|
|
||||||
angular.module('forms').service('FormFields', [ '$rootScope', '$translate', '$window',
|
|
||||||
function($rootScope, $translate, $window) {
|
|
||||||
console.log($window.user);
|
|
||||||
$translate.use($window.user.language);
|
|
||||||
=======
|
|
||||||
angular.module('forms').service('FormFields', [ '$rootScope', '$translate', 'Auth',
|
angular.module('forms').service('FormFields', [ '$rootScope', '$translate', 'Auth',
|
||||||
function($rootScope, $translate, Auth) {
|
function($rootScope, $translate, Auth) {
|
||||||
|
|
||||||
var language = Auth.ensureHasCurrentUser().language;
|
var language = Auth.ensureHasCurrentUser().language;
|
||||||
$translate.use(language);
|
$translate.use(language);
|
||||||
>>>>>>> 2.20
|
|
||||||
|
|
||||||
this.types = [
|
this.types = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
// Use Application configuration module to register a new module
|
// Use Application configuration module to register a new module
|
||||||
ApplicationConfiguration.registerModule('forms', [
|
ApplicationConfiguration.registerModule('forms', [
|
||||||
'ngFileUpload', 'ui.date', 'ui.sortable',
|
'ngFileUpload', 'ui.date', 'ui.sortable',
|
||||||
<<<<<<< HEAD
|
|
||||||
'angular-input-stars', 'users', 'ngclipboard', 'textAngular',
|
'angular-input-stars', 'users', 'ngclipboard', 'textAngular',
|
||||||
'frapontillo.bootstrap-switch'
|
'frapontillo.bootstrap-switch'
|
||||||
=======
|
|
||||||
'angular-input-stars', 'users', 'ngclipboard'
|
|
||||||
>>>>>>> 2.20
|
|
||||||
]);//, 'colorpicker.module' @TODO reactivate this module
|
]);//, 'colorpicker.module' @TODO reactivate this module
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
process.env.NODE_ENV = 'production';
|
process.env.NODE_ENV = 'production';
|
||||||
|
|
||||||
var config = require('../config/config'),
|
var config = require('../config/config'),
|
||||||
mongoose = require('mongoose'),
|
mongoose = require('mongoose'),
|
||||||
inquirer = require('inquirer'),
|
inquirer = require('inquirer'),
|
||||||
envfile = require('envfile'),
|
envfile = require('envfile'),
|
||||||
|
|
13
server.js
13
server.js
|
@ -17,7 +17,8 @@ require('events').EventEmitter.prototype._maxListeners = 0;
|
||||||
|
|
||||||
var config = require('./config/config'),
|
var config = require('./config/config'),
|
||||||
mongoose = require('mongoose'),
|
mongoose = require('mongoose'),
|
||||||
chalk = require('chalk');
|
chalk = require('chalk'),
|
||||||
|
nodemailer = require('nodemailer');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main application entry file.
|
* Main application entry file.
|
||||||
|
@ -36,6 +37,16 @@ mongoose.connection.on('error', function (err) {
|
||||||
process.exit(-1);
|
process.exit(-1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const smtpTransport = nodemailer.createTransport(config.mailer.options);
|
||||||
|
|
||||||
|
// verify connection configuration on startup
|
||||||
|
smtpTransport.verify(function(error, success) {
|
||||||
|
if (error) {
|
||||||
|
console.error(chalk.red('Your mail configuration is incorrect: ' + error));
|
||||||
|
process.exit(-1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Init the express application
|
// Init the express application
|
||||||
var app = require('./config/express')(db);
|
var app = require('./config/express')(db);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue