added dnsmasq setup file

This commit is contained in:
David Baldwynn 2016-11-02 11:30:04 -07:00
parent 8309b27e3e
commit ecfccd803f
37 changed files with 766 additions and 11458 deletions

View file

@ -44,7 +44,9 @@ TellForm is an *opensource alternative to TypeForm* built ontop of nodejs that c
## Quickstart
Before you start, make sure you have Redis installed and running at 127.0.0.1:6379
Before you start, make sure you have Redis installed and running at 127.0.0.1:6379 and MongoDB installed.
Also make sure to install DNS Masq or equivalent if running it locally on your computer (look at dns_masq_setup_osx for instructions on OSX)
Install dependencies first.
```bash

View file

@ -233,12 +233,9 @@ exports.read = function(req, res) {
* Update a form
*/
exports.update = function(req, res) {
debugger;
var form = req.form;
/*
delete req.body.form.__v;
delete req.body.form._id;
*/
if(req.user.roles.indexOf('admin') === -1) delete req.body.form.admin;
if(req.body.changes){
var formChanges = req.body.changes;
@ -248,6 +245,7 @@ exports.update = function(req, res) {
});
} else {
//Unless we have 'admin' privileges, updating form admin is disabled
if(req.user.roles.indexOf('admin') === -1) delete req.body.form.admin;
//Do this so we can create duplicate fields
var checkForValidId = new RegExp('^[0-9a-fA-F]{24}$');
@ -260,7 +258,6 @@ exports.update = function(req, res) {
form = _.extend(form, req.body.form);
}
form.save(function(err, form) {
if (err) {
console.log(err);

View file

@ -141,18 +141,10 @@ var FormSchema = new Schema({
type: Boolean,
default: false
},
isGenerated: {
type: Boolean,
default: false
},
isLive: {
type: Boolean,
default: false
},
autofillPDFs: {
type: Boolean,
default: false
},
design: {
colors:{
@ -183,55 +175,6 @@ var FormSchema = new Schema({
}
},
font: String
},
plugins: {
oscarhost: {
baseUrl: {
type: String
},
settings: {
lookupField: {
type: Schema.Types.ObjectId,
ref: 'Field'
},
updateType: {
type: String,
enum: ['upsert', 'force_add', 'force_update', 'fetch'],
},
fieldMap: {
type: Schema.Types.Mixed,
},
validUpdateTypes: {
type: [String]
},
validFields : {
type: [String],
default: [
'address',
'city',
'email',
'firstName',
'hin',
'lastName',
'phone',
'postal',
'province',
'sex',
'spokenLanguage',
'title',
'DOB']
}
},
auth: {
user: {
type: String
},
pass: {
type: String
}
}
}
}
});
@ -478,12 +421,18 @@ FormSchema.pre('save', function (next) {
else return cb();
},
function(cb) {
if(that.isModified('form_fields') && that.form_fields && _original){
var hasIds = true;
for(var i=0; i<that.form_fields.length; i++){
if(!that.form_fields.hasOwnProperty('_id')){
hasIds = false;
break;
}
}
if(that.isModified('form_fields') && that.form_fields && _original && hasIds){
var old_form_fields = _original.form_fields,
new_ids = _.map(_.pluck(that.form_fields, '_id'), function(id){ return ''+id;}),
old_ids = _.map(_.pluck(old_form_fields, '_id'), function(id){ return ''+id;}),
new_ids = _.map(_.pluck(that.form_fields, 'id'), function(id){ return ''+id;}),
old_ids = _.map(_.pluck(old_form_fields, 'id'), function(id){ return ''+id;}),
deletedIds = getDeletedIndexes(old_ids, new_ids);
//Preserve fields that have at least one submission

View file

@ -75,6 +75,7 @@ var UserSchema = new Schema({
type: String,
unique: true,
required: false,
lowercase: true,
trim: true
},
passwordHash: {

View file

@ -90,7 +90,7 @@ module.exports = function(db) {
return next();
}
//console.log(subdomains);
console.log(req.subdomains.reverse()[0]);
//console.log("is api subdomain: "+ (subdomains.indexOf("api") > -1));
//console.log(req.url);
if(subdomains.indexOf('api') > -1){
@ -105,6 +105,7 @@ module.exports = function(db) {
}
User.findOne({username: req.subdomains.reverse()[0]}).exec(function (err, user) {
console.log("user");
console.log(user);
if (err) {
console.log(err);

40
dns_masq_setup_osx.md Normal file
View file

@ -0,0 +1,40 @@
# wildcard DNS in localhost development
- install [dnsmasq](http://www.thekelleys.org.uk/dnsmasq/doc.html)
```
$ brew install dnsmasq
...
$ cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
```
- edit `/usr/local/etc/dnsmasq.conf`
```
address=/local/127.0.0.1
```
- start **dnsmasq**
```
$ sudo brew services start dnsmasq
```
- any time we change `dnsmasq.conf` we have to re-start **dnsmasq**:
```
$ sudo launchctl stop homebrew.mxcl.dnsmasq
$ sudo launchctl start homebrew.mxcl.dnsmasq
```
- For OS X to _resolve_ requests from `*.local` to **localhost** we need to add a _resolver_:
```
$ sudo mkdir /etc/resolver
$ sudo touch /etc/resolver/local
```
- edit `/etc/resolver/local`
```
nameserver 127.0.0.1
```
- re-start the computer to enable the _resolver_
===
**REFERENCES**
- [Using Dnsmasq for local development on OS X - Passing Curiosity](https://passingcuriosity.com/2013/dnsmasq-dev-osx/)
- [Using Dnsmasq Configure Wildcard DNS Record on Mac | Ri Xu Online](https://xuri.me/2014/12/13/using-dnsmasq-configure-wildcard-dns-record-on-mac.html)
- [unix - In my /etc/hosts/ file on Linux/OSX, how do I do a wildcard subdomain? - Server Fault](http://serverfault.com/questions/118378/in-my-etc-hosts-file-on-linux-osx-how-do-i-do-a-wildcard-subdomain)
- [hostname - Wildcard in /etc/hosts file - Unix & Linux Stack Exchange](http://unix.stackexchange.com/questions/3352/wildcard-in-etc-hosts-file)
- [Mac OS Lion - Wildcard subdomain virtual host - Stack Overflow](http://stackoverflow.com/questions/9562059/mac-os-lion-wildcard-subdomain-virtual-host)
- [How to put wildcard entry into /etc/hosts? - Stack Overflow](http://stackoverflow.com/questions/20446930/how-to-put-wildcard-entry-into-etc-hosts)

View file

@ -1,140 +0,0 @@
<?xml version='1.0' encoding='UTF-8'?><wsdl:definitions name="DemographicWsService" targetNamespace="http://ws.oscarehr.org/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ws.oscarehr.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xs:schema elementFormDefault="unqualified" targetNamespace="http://ws.oscarehr.org/" version="1.0" xmlns:tns="http://ws.oscarehr.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="getDemographic" type="tns:getDemographic"/>
<xs:element name="getDemographicByMyOscarUserName" type="tns:getDemographicByMyOscarUserName"/>
<xs:element name="getDemographicByMyOscarUserNameResponse" type="tns:getDemographicByMyOscarUserNameResponse"/>
<xs:element name="getDemographicResponse" type="tns:getDemographicResponse"/>
<xs:complexType name="getDemographic">
<xs:sequence>
<xs:element minOccurs="0" name="arg0" type="xs:int"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="getDemographicResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="tns:demographicTransfer"/>
</xs:sequence>
</xs:complexType>
<xs:complexType final="extension restriction" name="demographicTransfer">
<xs:sequence>
<xs:element name="activeCount" type="xs:int"/>
<xs:element minOccurs="0" name="address" type="xs:string"/>
<xs:element minOccurs="0" name="alias" type="xs:string"/>
<xs:element minOccurs="0" name="anonymous" type="xs:string"/>
<xs:element minOccurs="0" name="chartNo" type="xs:string"/>
<xs:element minOccurs="0" name="children" type="xs:string"/>
<xs:element minOccurs="0" name="citizenship" type="xs:string"/>
<xs:element minOccurs="0" name="city" type="xs:string"/>
<xs:element minOccurs="0" name="dateJoined" type="xs:dateTime"/>
<xs:element minOccurs="0" name="dateOfBirth" type="xs:string"/>
<xs:element minOccurs="0" name="demographicNo" type="xs:int"/>
<xs:element minOccurs="0" name="displayName" type="xs:string"/>
<xs:element minOccurs="0" name="effDate" type="xs:dateTime"/>
<xs:element minOccurs="0" name="email" type="xs:string"/>
<xs:element minOccurs="0" name="endDate" type="xs:dateTime"/>
<xs:element minOccurs="0" name="familyDoctor" type="xs:string"/>
<xs:element minOccurs="0" name="firstName" type="xs:string"/>
<xs:element minOccurs="0" name="hcRenewDate" type="xs:dateTime"/>
<xs:element minOccurs="0" name="hcType" type="xs:string"/>
<xs:element minOccurs="0" name="headRecord" type="xs:int"/>
<xs:element minOccurs="0" name="hin" type="xs:string"/>
<xs:element name="hsAlertCount" type="xs:int"/>
<xs:element minOccurs="0" name="lastName" type="xs:string"/>
<xs:element minOccurs="0" name="lastUpdateDate" type="xs:dateTime"/>
<xs:element minOccurs="0" name="lastUpdateUser" type="xs:string"/>
<xs:element minOccurs="0" name="links" type="xs:string"/>
<xs:element minOccurs="0" name="monthOfBirth" type="xs:string"/>
<xs:element minOccurs="0" name="myOscarUserName" type="xs:string"/>
<xs:element minOccurs="0" name="officialLanguage" type="xs:string"/>
<xs:element minOccurs="0" name="patientStatus" type="xs:string"/>
<xs:element minOccurs="0" name="patientStatusDate" type="xs:dateTime"/>
<xs:element minOccurs="0" name="pcnIndicator" type="xs:string"/>
<xs:element minOccurs="0" name="phone" type="xs:string"/>
<xs:element minOccurs="0" name="phone2" type="xs:string"/>
<xs:element minOccurs="0" name="postal" type="xs:string"/>
<xs:element minOccurs="0" name="previousAddress" type="xs:string"/>
<xs:element minOccurs="0" name="providerNo" type="xs:string"/>
<xs:element minOccurs="0" name="province" type="xs:string"/>
<xs:element minOccurs="0" name="rosterDate" type="xs:dateTime"/>
<xs:element minOccurs="0" name="rosterStatus" type="xs:string"/>
<xs:element minOccurs="0" name="rosterTerminationDate" type="xs:dateTime"/>
<xs:element minOccurs="0" name="rosterTerminationReason" type="xs:string"/>
<xs:element minOccurs="0" name="sex" type="xs:string"/>
<xs:element minOccurs="0" name="sexDesc" type="xs:string"/>
<xs:element minOccurs="0" name="sin" type="xs:string"/>
<xs:element minOccurs="0" name="sourceOfIncome" type="xs:string"/>
<xs:element minOccurs="0" name="spokenLanguage" type="xs:string"/>
<xs:element minOccurs="0" name="title" type="xs:string"/>
<xs:element minOccurs="0" name="ver" type="xs:string"/>
<xs:element minOccurs="0" name="yearOfBirth" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="getDemographicByMyOscarUserName">
<xs:sequence>
<xs:element minOccurs="0" name="arg0" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="getDemographicByMyOscarUserNameResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="tns:demographicTransfer"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="getDemographicByMyOscarUserNameResponse">
<wsdl:part element="tns:getDemographicByMyOscarUserNameResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="getDemographicByMyOscarUserName">
<wsdl:part element="tns:getDemographicByMyOscarUserName" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="getDemographicResponse">
<wsdl:part element="tns:getDemographicResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="getDemographic">
<wsdl:part element="tns:getDemographic" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="DemographicWs">
<wsdl:operation name="getDemographic">
<wsdl:input message="tns:getDemographic" name="getDemographic">
</wsdl:input>
<wsdl:output message="tns:getDemographicResponse" name="getDemographicResponse">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getDemographicByMyOscarUserName">
<wsdl:input message="tns:getDemographicByMyOscarUserName" name="getDemographicByMyOscarUserName">
</wsdl:input>
<wsdl:output message="tns:getDemographicByMyOscarUserNameResponse" name="getDemographicByMyOscarUserNameResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="DemographicWsServiceSoapBinding" type="tns:DemographicWs">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getDemographic">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="getDemographic">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getDemographicResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getDemographicByMyOscarUserName">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="getDemographicByMyOscarUserName">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getDemographicByMyOscarUserNameResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="DemographicWsService">
<wsdl:port binding="tns:DemographicWsServiceSoapBinding" name="DemographicWsPort">
<soap:address location="https://secure11.oscarhost.ca/kensington/ws/DemographicService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

File diff suppressed because one or more lines are too long

View file

@ -1,108 +0,0 @@
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.oscarehr.org/">
<soapenv:Header/>
<soapenv:Body>
<ws:addDemographic>
<!--Optional:-->
<arg0>
<!-- <activeCount>1</activeCount>-->
<!--Optional:-->
<address>2286 Ottawa</address>
<!--Optional:-->
<!-- <alias>?</alias>-->
<!--Optional:-->
<!-- <anonymous>?</anonymous>-->
<!--Optional:-->
<!-- <chartNo>?</chartNo>-->
<!--Optional:-->
<!-- <children>?</children>-->
<!--Optional:-->
<!-- <citizenship>?</citizenship>-->
<!--Optional:-->
<city>West Vancouver</city>
<!--Optional:-->
<!-- <dateJoined></dateJoined>-->
<!--Optional:-->
<dateOfBirth>06</dateOfBirth>
<!--Optional:-->
<!-- <demographicNo>?</demographicNo>-->
<!--Optional:-->
<displayName>TestUserAddDemographic</displayName>
<!--Optional:-->
<!-- <effDate></effDate>-->
<!--Optional:-->
<email>polydaic@gmail.com</email>
<!--Optional:-->
<!-- <endDate></endDate>-->
<!--Optional:-->
<!-- <familyDoctor> </familyDoctor>-->
<!--Optional:-->
<firstName>TestUser</firstName>
<!--Optional:-->
<!-- <hcRenewDate></hcRenewDate>-->
<!--Optional:-->
<!-- <hcType></hcType>-->
<!--Optional:-->
<!-- <headRecord></headRecord>-->
<!--Optional:-->
<!-- <hin></hin>-->
<!-- <hsAlertCount>0</hsAlertCount>-->
<!--Optional:-->
<lastName>AddDemographic</lastName>
<!--Optional:-->
<lastUpdateDate>2015-10-01T18:39:46.817Z</lastUpdateDate>
<!--Optional:-->
<!-- <lastUpdateUser> </lastUpdateUser>-->
<!--Optional:-->
<!-- <links> </links>-->
<!--Optional:-->
<monthOfBirth>06</monthOfBirth>
<!--Optional:-->
<!-- <myOscarUserName> </myOscarUserName>-->
<!--Optional:-->
<!-- <officialLanguage> </officialLanguage>-->
<!--Optional:-->
<!-- <patientStatus> </patientStatus>-->
<!--Optional:-->
<!-- <patientStatusDate></patientStatusDate>-->
<!--Optional:-->
<!-- <pcnIndicator> </pcnIndicator>-->
<!--Optional:-->
<phone>6048786969</phone>
<!--Optional:-->
<!-- <phone2> </phone2>-->
<!--Optional:-->
<postal>V8V5S8</postal>
<!--Optional:-->
<!-- <previousAddress> </previousAddress>-->
<!--Optional:-->
<!-- <providerNo> </providerNo>-->
<!--Optional:-->
<province>BC</province>
<!--Optional:-->
<!-- <rosterDate></rosterDate>-->
<!--Optional:-->
<!-- <rosterStatus> </rosterStatus>-->
<!--Optional:-->
<!-- <rosterTerminationDate></rosterTerminationDate>-->
<!--Optional:-->
<!-- <rosterTerminationReason> </rosterTerminationReason>-->
<!--Optional:-->
<sex>M</sex>
<!--Optional:-->
<!-- <sexDesc> </sexDesc>-->
<!--Optional:-->
<!-- <sin> </sin>-->
<!--Optional:-->
<!-- <sourceOfIncome> </sourceOfIncome>-->
<!--Optional:-->
<!-- <spokenLanguage> </spokenLanguage>-->
<!--Optional:-->
<title>Mr.</title>
<!--Optional:-->
<!-- <ver> </ver>-->
<!--Optional:-->
<yearOfBirth>1994</yearOfBirth>
</arg0>
</ws:addDemographic>
</soapenv:Body>
</soapenv:Envelope>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,26 @@
// A custom Nightwatch assertion.
// the name of the method is the filename.
// can be used in tests like this:
//
// browser.assert.elementCount(selector, count)
//
// for how to write custom assertions see
// http://nightwatchjs.org/guide#writing-custom-assertions
exports.assertion = function (selector, count) {
this.message = 'Testing if element <' + selector + '> has count: ' + count
this.expected = count
this.pass = function (val) {
return val === this.expected
}
this.value = function (res) {
return res.value
}
this.command = function (cb) {
var self = this
return this.api.execute(function (selector) {
return document.querySelectorAll(selector).length
}, [selector], function (res) {
cb.call(self, res)
})
}
}

View file

@ -0,0 +1,5 @@
"use strict";
module.exports.command = function(page) {
return page;
}

View file

@ -0,0 +1,19 @@
"use strict";
let fs = require("fs");
let path = require("path");
module.exports.command = function(title) {
//console.log(this);
let prefix = this.currentTest.module + '/' + this.currentTest.name + (title ? ("-" + title) : "");
prefix = prefix.replace(/\s/g, '-').replace(/"|'/g, '');
let baseFilePath = path.join(this.screenshotsPath, prefix);
let idx = 2;
let filePath = baseFilePath + ".png";
while (fs.existsSync(filePath))
filePath = baseFilePath + "_" + (idx++) + ".png";
this.saveScreenshot(filePath);
return this;
}

7
e2e_tests/globals.js Normal file
View file

@ -0,0 +1,7 @@
"use strict";
module.exports = {
"waitForConditionTimeout": 10000
}

View file

@ -0,0 +1,66 @@
"use strict";
let seleniumServer = require('selenium-server');
let chromedriver = require('chromedriver');
let appPort = process.env.APP_PORT || process.env.PORT || 3000;
// http://nightwatchjs.org/guide#settings-file
//
module.exports = {
"src_folders": ["e2e_tests/specs"],
"output_folder": "e2e_tests/reports",
"globals_path": "e2e_tests/globals.js",
"custom_assertions_path": ["e2e_tests/custom-assertions"],
"custom_commands_path": [ "e2e_tests/custom-commands" ],
"page_objects_path": "e2e_tests/pages",
"test_runner": {
"type" : "mocha",
"options": {
"ui": "bdd",
"reporter": "spec"
}
},
"selenium": {
"start_process": true,
"server_path": seleniumServer.path,
"host": "127.0.0.1",
"port": 4444,
"cli_args": {
"webdriver.chrome.driver": chromedriver.path
}
},
"test_settings": {
"default": {
"launch_url" : "http://tellform.dev:3001",
"appPort": appPort,
"selenium_port": 4444,
"selenium_host": "localhost",
"silent": true,
"desiredCapabilities": {
"javascriptEnabled": true,
"acceptSslCerts": true
},
"screenshots": {
"enabled": true,
"on_failure" : true,
"on_error" : false,
"path": "e2e_tests/reports/screenshots"
}
},
"chrome": {
"desiredCapabilities": {
"browserName": "chrome"
}
},
"firefox": {
"desiredCapabilities": {
"browserName": "firefox"
}
}
}
}

View file

@ -0,0 +1,32 @@
"use strict";
let commands = {
submit(email) {
return this
.waitForElementVisible('@emailField', 10000)
.assert.containsText("@title", "FORGOT")
.assert.elementPresent("@emailField")
.setValue("@emailField", email)
.makeScreenshot()
.click("@submitButton");
}
};
module.exports = {
url() {
return this.client.api.options.baseURL + "/forgot";
},
commands: [commands],
elements: {
title: "form header",
emailField: "form #email",
submitButton: "form [type=submit]",
flashError: ".flash .alert-danger div",
flashInfo: ".flash .alert-success div"
}
}

View file

@ -0,0 +1,22 @@
"use strict";
let commands = {
logout() {
return this
.client.api.url("http://"+ this.client.api.options.baseURL + this.client.options.appPort + "/logout")
.waitForElementVisible(".page h1");
}
};
module.exports = {
url(subdomain) {
console.log('http://'+subdomain + '.helpbase.dev:' + this.client.options.appPort + "/#!/");
return 'http://'+subdomain + '.helpbase.dev:' + this.client.options.appPort + "/#!/";
},
commands: [commands],
elements: {
title: "h2.title.align-left"
}
}

View file

@ -0,0 +1,33 @@
"use strict";
let commands = {
login(username, password) {
return this
.waitForElementVisible('@usernameField', 10000)
.assert.elementPresent("@usernameField")
.assert.elementPresent("@passwordField")
.setValue("@usernameField", username)
.setValue("@passwordField", password)
.makeScreenshot()
.click("@submitButton");
}
};
module.exports = {
url() {
return this.client.api.options.baseURL + "/login";
},
commands: [commands],
elements: {
formImage: ".row > .col > img.responsive-image",
usernameField: "form #username",
passwordField: "form #password",
submitButton: "form [type=submit]",
flashError: ".flash .alert-danger div",
flashInfo: ".flash .alert-success div"
}
}

View file

@ -0,0 +1,35 @@
"use strict";
let commands = {
submit(password, confirm) {
return this
.waitForElementVisible('@passwordField', 10000)
.assert.containsText("@title", "NEW PASSWORD")
.assert.elementPresent("@passwordField")
.assert.elementPresent("@confirmField")
.setValue("@passwordField", password)
.setValue("@confirmField", confirm)
.makeScreenshot()
.click("@submitButton");
}
};
module.exports = {
url() {
return this.client.api.options.baseURL + "/reset";
},
commands: [commands],
elements: {
title: "form header",
passwordField: "form #password",
confirmField: "form #confirm",
submitButton: "form [type=submit]",
flashError: ".flash .alert-danger div",
flashInfo: ".flash .alert-success div"
}
}

View file

@ -0,0 +1,42 @@
"use strict";
let commands = {
signup(name, email, password, company_name, company_subdomain) {
return this
.waitForElementVisible('@emailField', 10000)
.assert.elementPresent("@nameField")
.assert.elementPresent("@emailField")
.assert.elementPresent("@companyNameField")
.assert.elementPresent("@companySubdomainField")
.assert.elementPresent("@passwordField")
.setValue("@nameField", name)
.setValue("@emailField", email)
.setValue("@passwordField", password)
.setValue("@companyNameField", company_name)
.setValue("@companySubdomainField", company_subdomain)
.makeScreenshot()
.click("@submitButton");
}
};
module.exports = {
url() {
return this.client.api.options.baseURL + "/signup";
},
commands: [commands],
elements: {
title: "form header",
nameField: "form #name",
companySubdomainField: "form #company_subdomain",
companyNameField: "form #company_name",
emailField: "form #email",
passwordField: "form #password",
submitButton: "form [type=submit]",
flashError: ".flash .alert-danger div",
flashInfo: ".flash .alert-success div"
}
}

44
e2e_tests/runner.js Normal file
View file

@ -0,0 +1,44 @@
"use strict";
var path = require("path");
// 1. start the server
process.env.NODE_ENV = 'test';
// Pass the port of server via environment
var app = require("../server");
var config = require('../config/config');
process.env.APP_PORT = config.port;
// 2. run the nightwatch test suite against it
// to run in additional browsers:
// 1. add an entry in tests/e2e/nightwatch.conf.json under "test_settings"
// 2. or add it to the --env flag below
// or override the environment flag, for example: `npm run e2e -- --env chrome,firefox`
// For more information on Nightwatch's config file, see
// http://nightwatchjs.org/guide#settings-file
var opts = process.argv.slice(2);
if (opts.indexOf('--config') === -1) {
opts = opts.concat(['--config', 'e2e_tests/nightwatch.conf.js']);
}
if (opts.indexOf('--env') === -1) {
opts = opts.concat(['--env', 'chrome']);
}
// Clear reports folder
var del = require("del");
del.sync(path.join(__dirname, "reports", "**"));
var spawn = require('cross-spawn');
var runner = spawn('./node_modules/.bin/nightwatch', opts, { stdio: 'inherit' });
runner.on('exit', function (code) {
app.close();
process.exit(code);
});
runner.on('error', function (err) {
app.close();
throw err;
});

View file

@ -0,0 +1,73 @@
"use strict";
let mailtrap = require("../../util/mailtrap");
let pauseTime = 100;
describe.only("Test login page with username and password", () => {
let loginPage;
let homePage;
let baseURL;
before((browser, done) => {
baseURL = 'http://helpbase.dev:' + browser.globals.test_settings.appPort;
browser.options.baseURL = baseURL;
loginPage = browser.page.loginPage();
homePage = browser.page.homePage();
done();
});
after((browser, done) => {
browser.end(() => {
done();
});
});
it("should give error, if username/email does not exist", (browser) => {
loginPage.navigate()
.waitForElementPresent('form.validate-form')
.login("johnnn", "johnny")
.waitForElementPresent(".flash")
.assert.elementPresent("@flashError")
.assert.containsText("@flashError", "Unknow username or e-mail")
.api.pause(pauseTime)
.makeScreenshot();
});
it("should give error, if password is incorrect", (browser) => {
loginPage.navigate()
.login("test", "1234567")
.waitForElementPresent(".flash")
.assert.elementPresent("@flashError")
.assert.containsText("@flashError", "Unknown user or invalid password")
.api.pause(pauseTime)
.makeScreenshot();
});
it("should redirect to main, if credentials correct", (browser) => {
loginPage.navigate()
.login("test", "test1234")
.api.pause(pauseTime)
.makeScreenshot();
homePage
.waitForElementVisible("@title")
.assert.containsText("@title", "Dashboard")
.assert.urlEquals('http://polydaic.helpbase.dev:3000/#!/")
.makeScreenshot();
});
it("should jump to index, after logout", (browser) => {
// Logout
browser.url(http://polydaic.helpbase.dev:3000 + "/logout")
.waitForElementVisible("h1.center-align")
.assert.urlEquals(baseURL + "/")
.assert.elementPresent("h1.center-align")
.pause(pauseTime)
.makeScreenshot();
});
});

View file

@ -0,0 +1,127 @@
/*"use strict";
let mailtrap = require("../../util/mailtrap");
let pauseTime = 100;
describe("Test forgot page", () => {
let forgotPage;
let resetPage;
let homePage;
let loginPage;
let baseURL;
before((browser, done) => {
baseURL = 'http://localhost:' + browser.globals.test_settings.appPort;
browser.options.baseURL = baseURL;
forgotPage = browser.page.forgotPage();
resetPage = browser.page.resetPage();
homePage = browser.page.homePage();
loginPage = browser.page.loginPage();
done();
});
after((browser, done) => {
browser.end(() => {
done();
});
});
it("should give error, if email is not found", (browser) => {
forgotPage.navigate()
.submit("chuck.norris@notfound.me")
.waitForElementPresent(".flash")
.assert.elementPresent("@flashError")
.assert.containsText("@flashError", "The email address chuck.norris@notfound.me is not associated with any account.")
.api.pause(pauseTime)
.makeScreenshot();
});
it("should send rest email, if email is correct", (browser) => {
forgotPage.navigate()
.submit("test@boilerplate-app.com")
.waitForElementPresent(".flash")
.assert.elementPresent("@flashInfo")
.assert.containsText("@flashInfo", "An email has been sent to test@boilerplate-app.com with further instructions.")
.api.pause(pauseTime)
.makeScreenshot();
browser
.pause(1000) // Wait for email received
.perform(function(browser, done) {
console.log("Check mailbox...");
let re = /reset\/(\w+)/g;
mailtrap.getTokenFromMessage("test@boilerplate-app.com", re, function(err, token, message) {
if (err)
throw new Error(err);
// Delete message
mailtrap.deleteMessage(null, message.id);
console.log("Open reset link: " + baseURL + "/reset/" + token);
browser.url(baseURL + "/reset/" + token);
return done();
});
return this;
})
.pause(pauseTime);
// Try to reset password
resetPage
.waitForElementVisible("@passwordField")
// password is too short
.submit("123", "123")
.waitForElementPresent(".flash")
.assert.elementPresent("@flashError")
.assert.containsText("@flashError", "Password must be at least 6 characters long!")
.api.pause(pauseTime)
.makeScreenshot()
resetPage
// invalid confirm password
.submit("newPassword", "otherConfirmPassword")
.waitForElementPresent(".flash")
.assert.elementPresent("@flashError")
.assert.containsText("@flashError", "Passwords must match.")
.api.pause(pauseTime)
.makeScreenshot()
resetPage
// correct new password
.submit("newPassword", "newPassword")
.api.pause(pauseTime)
// Check we logged in automatically
homePage
.waitForElementVisible("@title")
.assert.urlEquals(homePage.url)
.assert.containsText("@title", "Home")
.makeScreenshot();
// Logout
homePage
.logout()
// Login with the new password
loginPage.navigate()
.login("test", "newPassword");
homePage
.waitForElementVisible("@title")
.assert.urlEquals(homePage.url)
.assert.containsText("@title", "Home")
.makeScreenshot();
});
});
*/

View file

@ -0,0 +1,86 @@
"use strict";
let mailtrap = require("../../util/mailtrap");
let fakerator = require("fakerator")();
let pauseTime = 100;
let user = fakerator.entity.user();
let company = fakerator.entity.company();
user.name = user.firstName + " " + user.lastName;
describe("Test signup page with password", () => {
let loginPage;
let signupPage;
let homePage;
let baseURL;
before((browser, done) => {
baseURL = 'http://helpbase.dev:' + browser.globals.test_settings.appPort;
browser.options.baseURL = baseURL;
signupPage = browser.page.signupPage();
loginPage = browser.page.loginPage();
homePage = browser.page.homePage();
done();
});
after((browser, done) => {
browser.end(() => {
done();
});
});
it("should give error, if password is too short", (browser) => {
signupPage.navigate()
.signup(user.name, user.email, "123", company.name, "abcd")
.waitForElementPresent(".flash")
.assert.elementPresent("@flashError")
.assert.containsText("@flashError", "Password must be at least 6 characters long!")
.api.pause(pauseTime)
.makeScreenshot();
});
it("should accept signup, if every data is good", (browser) => {
signupPage.navigate()
.signup(user.name, user.email, user.password, company.name, "abcd")
.waitForElementPresent(".flash")
.assert.elementPresent("@flashInfo")
.assert.containsText("@flashInfo", "Please check your email to verify your account. Thanks for signing up!")
.api.pause(pauseTime)
.assert.urlEquals(loginPage.url)
.makeScreenshot();
browser
.pause(1000) // Wait for email received
.perform(function(browser, done) {
//console.log("Check mailbox...");
let re = /verify\/(\w+)/g;
mailtrap.getTokenFromMessage(user.email, re, function(err, token, message) {
if (err)
throw new Error(err);
// Delete message
mailtrap.deleteMessage(null, message.id);
//console.log("Open verify link: " + baseURL + "/verify/" + token);
browser.url(baseURL + "/verify/" + token);
return done();
});
return this;
})
.pause(pauseTime);
// Check the user redirected to main app
homePage
.waitForElementVisible('@usernameField')
.assert.urlEquals(loginPage.url)
.makeScreenshot();
});
});

View file

@ -98,7 +98,10 @@
"wildcard-subdomains": "github:whitef0x0/wildcard-subdomains"
},
"devDependencies": {
"chromedriver": "^2.25.1",
"coveralls": "^2.11.4",
"cross-spawn": "^5.0.0",
"del": "^2.2.2",
"glob": "^7.0.3",
"grunt-execute": "^0.2.2",
"grunt-mocha-istanbul": "^3.0.1",
@ -115,10 +118,12 @@
"karma-ng-html2js-preprocessor": "^0.2.0",
"karma-phantomjs-launcher": "~0.2.1",
"mailosaur": "^1.0.1",
"mocha": ">=1.20.0",
"mocha": "^3.1.2",
"mocha-lcov-reporter": "^1.0.0",
"nightwatch": "^0.9.8",
"node-mandrill": "^1.0.1",
"phantomjs": "^1.9.18",
"selenium-server": "^3.0.1",
"should": "~7.1.1",
"supertest": "~1.2.0",
"supertest-session": "~2.0.1"

View file

@ -64,7 +64,7 @@ angular.element(document).ready(function() {
angular.module('NodeForm.templates', []).run(['$templateCache', function($templateCache) {
"use strict";
$templateCache.put("modules/core/views/header.client.view.html",
"<section class=\"navbar navbar-inverse\" data-ng-controller=HeaderController ng-hide=hideNav><div class=container><div class=navbar-header><button class=navbar-toggle type=button data-ng-click=toggleCollapsibleMenu()><span class=sr-only>Toggle navigation</span> <span>{{ 'MENU_BTN' | translate }}</span></button> <a href=\"https://www.tellform.com/#!/\" class=navbar-brand><img src=/static/modules/core/img/logo_white.svg height=100%></a></div><nav class=\"collapse navbar-collapse\" collapse=!isCollapsed role=navigation><ul class=\"nav navbar-nav\" data-ng-if=authentication.isAuthenticated()><li data-ng-repeat=\"item in menu.items | orderBy: 'position'\" data-ng-if=item.shouldRender(authentication.isAuthenticated()); ng-switch=item.menuItemType ui-route={{item.uiRoute}} class={{item.menuItemClass}} ng-class=\"{active: ($uiRoute)}\" dropdown=\"item.menuItemType === 'dropdown'\"><a ng-switch-when=dropdown class=dropdown-toggle dropdown-toggle><span data-ng-bind=item.title></span> <b class=caret></b></a><ul ng-switch-when=dropdown class=dropdown-menu><li data-ng-repeat=\"subitem in item.items | orderBy: 'position'\" data-ng-if=subitem.shouldRender(authentication.isAuthenticated()); ui-route={{subitem.uiRoute}} ng-class=\"{active: $uiRoute}\"><a href=/#!/{{subitem.link}} data-ng-bind=subitem.title></a></li></ul><a ng-switch-default href=/#!/{{item.link}} data-ng-bind=item.title></a></li></ul><ul class=\"nav navbar-nav navbar-right\" data-ng-hide=authentication.isAuthenticated()><li ng-hide=$root.signupDisabled ui-route=/signup ng-class=\"{active: $uiRoute}\"><a href=/#!/signup>{{ 'SIGNUP_TAB' | translate }}</a></li><li class=divider-vertical></li><li ui-route=/signin ng-class=\"{active: $uiRoute}\"><a href=/#!/signin>{{ 'SIGNIN_TAB' | translate }}</a></li></ul><ul class=\"nav navbar-nav navbar-right\" data-ng-show=authentication.isAuthenticated()><li class=dropdown uib-dropdown><a href=# class=dropdown-toggle data-toggle=dropdown dropdown-toggle><span>{{ 'MY_SETTINGS' | translate }}</span> <b class=caret></b></a><ul class=dropdown-menu><li><a href=/#!/settings/profile>{{ 'EDIT_PROFILE' | translate }}</a></li><li class=divider></li><li><a href=/#!/settings/password>{{ 'CHANGE_PASSWORD' | translate }}</a></li></ul></li><li><a href=\"/\" ng-click=signout()>{{ 'SIGNOUT_TAB' | translate }}</a></li></ul></nav></div></section>");
"<section class=\"navbar navbar-inverse\" data-ng-controller=HeaderController ng-hide=hideNav><div class=container><div class=navbar-header><button class=navbar-toggle type=button data-ng-click=toggleCollapsibleMenu()><span class=sr-only>Toggle navigation</span> <span>{{ 'MENU_BTN' | translate }}</span></button> <a href=\"/#!/\" class=navbar-brand><img src=/static/modules/core/img/logo_white.svg height=100%></a></div><nav class=\"collapse navbar-collapse\" collapse=!isCollapsed role=navigation><ul class=\"nav navbar-nav navbar-right\" data-ng-hide=authentication.isAuthenticated()><li ng-hide=$root.signupDisabled ui-route=/signup ng-class=\"{active: $uiRoute}\"><a href=/#!/signup>{{ 'SIGNUP_TAB' | translate }}</a></li><li class=divider-vertical></li><li ui-route=/signin ng-class=\"{active: $uiRoute}\"><a href=/#!/signin>{{ 'SIGNIN_TAB' | translate }}</a></li></ul><ul class=\"nav navbar-nav navbar-right\" data-ng-show=authentication.isAuthenticated()><li class=dropdown uib-dropdown><a href=# class=dropdown-toggle data-toggle=dropdown dropdown-toggle><span>{{ 'MY_SETTINGS' | translate }}</span> <b class=caret></b></a><ul class=dropdown-menu><li><a href=/#!/settings/profile>{{ 'EDIT_PROFILE' | translate }}</a></li><li class=divider></li><li><a href=/#!/settings/password>{{ 'CHANGE_PASSWORD' | translate }}</a></li></ul></li><li><a href=\"/\" ng-click=signout()>{{ 'SIGNOUT_TAB' | translate }}</a></li></ul></nav></div></section>");
$templateCache.put("modules/forms/admin/views/admin-form.client.view.html",
"<header data-ng-include=\"'/static/modules/core/views/header.client.view.html'\"></header><div class=container cg-busy=\"{promise:updatePromise,templateUrl:'modules/forms/admin/views/directiveViews/cgBusy/update-form-message-TypeB.html',message:'Updating form...', backdrop:false, wrapperClass:'.busy-updating-wrapper'}\"></div><section class=admin-form><script type=text/ng-template id=myModalContent.html><div class=\"modal-header\">\n" +
" <h2 class=\"modal-title hidden-md hidden-lg\">{{ 'ARE_YOU_SURE' | translate }}</h2>\n" +
@ -88,7 +88,7 @@ angular.module('NodeForm.templates', []).run(['$templateCache', function($templa
" </button>\n" +
" </div></script><div class=page-header style=\"padding-bottom: 1em\"><div class=\"col-xs-10 col-sm-8\"><h1 class=\"hidden-sm hidden-xs\" data-ng-bind=myform.title style=\"margin-bottom: 0px\"></h1><h2 class=\"hidden-md hidden-lg\" data-ng-bind=myform.title style=\"margin-bottom: 0px\"></h2></div><div class=\"col-xs-1 col-sm-2\"><small class=pull-right><button class=\"btn btn-danger\" ng-click=openDeleteModal()><i class=\"fa fa-trash-o\"></i> <span class=\"show-sm hidden-lg hidden-md hidden-xs\">{{ 'DELETE_FORM_SM' | translate}}</span> <span class=\"hidden-xs hidden-sm\">{{ 'DELETE_FORM_MD' | translate}}</span></button></small></div><div class=\"col-xs-1 col-sm-2\"><small class=pull-right><a class=\"btn btn-secondary view-form-btn\" href={{actualFormURL}}><span class=\"hidden-xs hidden-sm\">{{ 'VIEW' | translate }} <span ng-show=myform.isLive>{{ 'LIVE' | translate }}</span> <span ng-hide=myform.isLive>{{ 'PREVIEW' | translate }}</span></span> <span class=\"hidden-xs hidden-md hidden-lg\">View <span ng-if=myform.isLive>{{ 'LIVE' | translate }}</span> <span ng-if=!myform.isLive>{{ 'PREVIEW' | translate }}</span></span> <i class=\"status-light status-light-on fa fa-dot-circle-o\" ng-if=myform.isLive></i> <i class=\"status-light status-light-off fa fa-dot-circle-o\" ng-if=!myform.isLive></i></a></small></div></div><div class=row><div class=col-xs-12><uib-tabset active=activePill vertical=true type=pills><uib-tab ng-repeat=\"tab in tabData\" index=$index heading={{tab.heading}}><div class=row data-ng-include=\"'/static/modules/forms/admin/views/adminTabs/'+tab.templateName+'.html'\" onload=\"form_url = trustSrc(formURL)\"></div></uib-tab><uib-tab heading=Design index=5><div class=\"config-form design container\"><div class=row><div class=\"col-md-4 col-sm-12 container\"><div class=\"row field\"><div class=\"field-title col-sm-5\"><h5>{{ 'BACKGROUND_COLOR' | translate }}</h5></div><div class=\"field-input col-sm-6\"><input class=form-control colorpicker=hex ng-model=myform.design.colors.backgroundColor ng-style=\"{ 'background-color': myform.design.colors.backgroundColor }\"></div></div><div class=\"row field\"><div class=\"field-title col-sm-5\"><h5>{{ 'QUESTION_TEXT_COLOR' | translate }}</h5></div><div class=\"field-input col-sm-6\"><input class=form-control colorpicker=hex ng-model=myform.design.colors.questionColor ng-style=\"{ 'background-color': myform.design.colors.questionColor }\"></div></div><div class=\"row field\"><div class=\"field-title col-sm-5\"><h5>{{ 'ANSWER_TEXT_COLOR' | translate }}</h5></div><div class=\"field-input col-sm-6\"><input class=form-control colorpicker=hex ng-model=myform.design.colors.answerColor ng-style=\"{ 'background-color': myform.design.colors.answerColor }\"></div></div><div class=\"row field\"><div class=\"field-title col-sm-5\"><h5>{{ 'BTN_BACKGROUND_COLOR' | translate }}</h5></div><div class=\"field-input col-sm-6\"><input class=form-control colorpicker=hex ng-model=myform.design.colors.buttonColor ng-style=\"{ 'background-color': myform.design.colors.buttonColor }\"></div></div><div class=\"row field\"><div class=\"field-title col-sm-5\"><h5>{{ 'BTN_TEXT_COLOR' | translate }}</h5></div><div class=\"field-input col-sm-6\"><input class=form-control colorpicker=hex ng-model=myform.design.colors.buttonTextColor ng-style=\"{ 'background-color': myform.design.colors.buttonTextColor }\"></div></div></div><div class=\"col-md-8 hide-md hide-lg\"><iframe id=iframe ng-if=!!formURL src={{trustSrc(formURL)}} style=\"border: none; box-shadow: 0px 0px 10px 0px grey; overflow: hidden; height: 400px; width: 90%; position: absolute\"></iframe></div></div><div class=row><div class=\"col-sm-offset-4 col-sm-2\"><button class=\"btn btn-signup btn-rounded\" type=button ng-click=\"update(false, null)\"><i class=\"icon-arrow-left icon-white\"></i>{{ 'SAVE_CHANGES' | translate }}</button></div><div class=col-sm-1><button class=\"btn btn-secondary btn-rounded\" type=button ng-click=resetForm()><i class=\"icon-eye-open icon-white\"></i>{{ 'CANCEL' | translate }}</button></div></div></div></uib-tab></uib-tabset></div></div></section>");
$templateCache.put("modules/forms/admin/views/list-forms.client.view.html",
"<header data-ng-include=\"'/static/modules/core/views/header.client.view.html'\"></header><section class=overlay ng-if=showCreateModal ng-click=closeCreateModal()></section><section data-ng-controller=\"ListFormsController as ctrl\" data-ng-init=findAll() class=container><br><div class=row><div ng-click=openCreateModal() class=\"col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-1 col-md-3 col-md-offset-1 form-item create-new\"><div class=\"title-row col-xs-12\"><h4 class=\"fa fa-plus fa-6\"></h4></div><div class=\"col-xs-12 details-row\"><small class=list-group-item-text>{{ 'CREATE_A_NEW_FORM' | translate }}</small></div></div><form name=forms.createForm class=\"col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-1 col-md-3 col-md-offset-1 form-item create-new new-form\" ng-if=showCreateModal><div class=\"title-row row\"><div class=\"col-xs-5 field-title text-left\">Name</div><div class=\"col-xs-12 field-input\"><input name=title required ng-model=formTitle ng-pattern=languageRegExp ng-minlength=4 style=\"color:black\"></div></div><div class=\"details-row row\"><div class=\"col-xs-5 field-title text-left\">Language</div><div class=\"col-xs-12 field-input\"><div class=\"button custom-select\"><select style=color:black name=language required ng-model=formLanguage ng-init=\"formLanguage = user.language\"><option ng-repeat=\"language in languages\" value={{language}}>{{language}}</option></select></div></div></div><div class=\"details-row submit row\"><div class=\"col-xs-12 field-title text-center\"><button class=\"btn btn-primary\" ng-disabled=forms.createForm.$invalid ng-click=createNewForm()>{{ 'CREATE_FORM' | translate }}</button></div></div></form><div data-ng-repeat=\"form in myforms\" ng-style=\"{ 'background-color': form.design.colors.backgroundColor, 'color': form.design.colors.answerColor }\" class=\"col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-1 col-md-3 col-md-offset-1 form-item container\"><div class=row><span class=pull-right><i style=cursor:pointer class=\"fa fa-trash-o\" ng-click=removeForm($index)></i> <i style=cursor:pointer class=\"fa fa-files-o\" ng-click=duplicateForm($index)></i></span></div><div class=row><a data-ng-href=#!/forms/{{form._id}}/admin/create ng-style=\"{ 'color': form.design.colors.answerColor }\" class=\"title-row col-xs-12\"><h4 class=list-group-item-heading data-ng-bind=form.title></h4></a></div><div class=\"row footer\"><div class=\"col-xs-12 details-row\"><small class=list-group-item-text>{{ 'CREATED_ON' | translate }} <span data-ng-bind=\"form.created | date:'shortDate'\"></span></small></div></div></div></div></section>");
"<header data-ng-include=\"'/static/modules/core/views/header.client.view.html'\"></header><section class=overlay ng-if=showCreateModal ng-click=closeCreateModal()></section><section data-ng-controller=\"ListFormsController as ctrl\" data-ng-init=findAll() class=container><br><div class=row><div class=\"col-xs-4 col-xs-offset-4\"><h3 class=\"text-center forms-list-title\">My Forms</h3></div></div><div class=row><div ng-click=openCreateModal() class=\"col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-1 col-md-3 col-md-offset-1 form-item create-new\"><div class=\"title-row col-xs-12\"><h4 class=\"fa fa-plus fa-6\"></h4></div><div class=\"col-xs-12 details-row\"><small class=list-group-item-text>{{ 'CREATE_A_NEW_FORM' | translate }}</small></div></div><form name=forms.createForm class=\"col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-1 col-md-3 col-md-offset-1 form-item create-new new-form\" ng-if=showCreateModal><div class=\"title-row row\"><div class=\"col-xs-5 field-title text-left\">Name</div><div class=\"col-xs-12 field-input\"><input name=title required ng-model=formTitle ng-pattern=languageRegExp ng-minlength=4 style=\"color:black\"></div></div><div class=\"details-row row\"><div class=\"col-xs-5 field-title text-left\">Language</div><div class=\"col-xs-12 field-input\"><div class=\"button custom-select\"><select style=color:black name=language required ng-model=formLanguage ng-init=\"formLanguage = user.language\"><option ng-repeat=\"language in languages\" value={{language}}>{{language}}</option></select></div></div></div><div class=\"details-row submit row\"><div class=\"col-xs-12 field-title text-center\"><button class=\"btn btn-primary\" ng-disabled=forms.createForm.$invalid ng-click=createNewForm()>{{ 'CREATE_FORM' | translate }}</button></div></div></form><div data-ng-repeat=\"form in myforms\" class=\"col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-1 col-md-3 col-md-offset-1 form-item container\" ng-class=\"{'paused': !form.isLive}\"><div class=row><span class=pull-right><i style=cursor:pointer class=\"fa fa-trash-o\" ng-click=removeForm($index)></i> <i style=cursor:pointer class=\"fa fa-files-o\" ng-click=duplicateForm($index)></i></span></div><div class=row><a data-ng-href=#!/forms/{{form._id}}/admin/create class=\"title-row col-xs-12\"><h4 class=list-group-item-heading data-ng-bind=form.title></h4></a><div class=\"col-xs-12 responses-row\"><small class=list-group-item-text><span>{{ form.submissions.length }} responses</span></small> <small ng-if=!form.isLive class=list-group-item-text><span>Form Paused</span></small></div></div></div></div></section>");
$templateCache.put("modules/forms/base/views/submit-form.client.view.html",
"<section class=public-form ng-style=\"{ 'background-color': myform.design.colors.backgroundColor }\"><submit-form-directive myform=myform></submit-form-directive></section><script ng-if=myform.analytics.gaCode>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n" +
" (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n" +
@ -137,7 +137,7 @@ angular.module('NodeForm.templates', []).run(['$templateCache', function($templa
"<div class=\"field row\" ng-click=\"setActiveField(field._id, index, true)\"><div class=\"col-xs-12 field-title\" ng-style=\"{'color': design.colors.questionColor}\"><h3><small class=field-number>{{index+1}} <i class=\"fa fa-angle-double-right\" aria-hidden=true></i></small> {{field.title}} <span class=required-error ng-show=!field.required>{{ 'OPTIONAL' | translate }}</span></h3><small>{{ 'NEWLINE' | translate }}</small><p><small>{{field.description}}</small></p></div><div class=\"col-xs-12 field-input\"><small style=font-size:0.6em>Press SHIFT+ENTER to add a newline</small><textarea class=\"textarea focusOn\" type=text ng-model=field.fieldValue ng-model-options=\"{ debounce: 250 }\" ng-class=\"{ 'no-border': !!field.fieldValue }\" value={{field.fieldValue}} ng-required=field.required ng-disabled=field.disabled ng-focus=\"setActiveField(field._id, index, true)\" on-enter-or-tab-key=nextField() on-tab-and-shift-key=prevField() style=\"border: none; border-left: lightgrey dashed 2px\">\n" +
" </textarea></div></div><div><div class=\"btn btn-lg btn-default hidden-xs\" style=\"padding: 4px; margin-top:8px; background: rgba(255,255,255,0.5)\"><button ng-disabled=\"!field.fieldValue || forms.myForm.{{field.fieldType}}{{$index}}.$invalid\" ng-style=\"{'background-color':design.colors.buttonColor, 'color':design.colors.buttonTextColor}\" ng-click=$root.nextField() class=\"btn col-sm-5 col-xs-5\">{{ 'OK' | translate }} <i class=\"fa fa-check\"></i></button><div class=\"col-sm-3 col-xs-6\" style=margin-top:0.2em><small style=\"color:#ddd; font-size:70%\">{{ 'ENTER' | translate }}</small></div></div></div>");
$templateCache.put("modules/forms/base/views/directiveViews/field/textfield.html",
"<div class=\"textfield field row\" ng-click=\"setActiveField(field._id, index, true)\"><div class=\"col-xs-12 field-title row-fluid\" ng-style=\"{'color': design.colors.questionColor}\"><h3 class=col-xs-12><small class=field-number>{{index+1}} <i class=\"fa fa-angle-double-right\" aria-hidden=true></i></small> {{field.title}} <span class=required-error ng-show=!field.required>({{ 'OPTIONAL' | translate }})</span></h3><p class=col-xs-12><small>{{field.description}}</small></p></div><div class=\"col-xs-12 field-input\"><input ng-style=\"{'color': design.colors.answerColor, 'border-color': design.colors.answerColor}\" name={{field.fieldType}}{{index}} type={{input_type}} ng-pattern=validateRegex placeholder={{placeholder}} ng-class=\"{ 'no-border': !!field.fieldValue }\" class=\"focusOn text-field-input\" ng-model=field.fieldValue ng-model-options=\"{ debounce: 250 }\" value=field.fieldValue ng-focus=\"setActiveField(field._id, index, true)\" on-enter-or-tab-key=nextField() on-tab-and-shift-key=prevField() ng-required=field.required ng-disabled=field.disabled aria-describedby=inputError2Status></div><div class=col-xs-12><div ng-show=\"forms.myForm.{{field.fieldType}}{{index}}.$invalid && !!forms.myForm.{{field.fieldType}}{{index}}.$viewValue \" class=\"alert alert-danger\" role=alert><span class=\"glyphicon glyphicon-exclamation-sign\" aria-hidden=true></span> <span class=sr-only>Error:</span> <span ng-if=\"field.fieldType == 'email'\">{{ 'ERROR_EMAIL_INVALID' | translate }}</span> <span ng-if=field.validateRegex>{{ 'ERROR_NOT_A_NUMBER' | translate }}</span> <span ng-if=\"field.fieldType == 'link'\">{{ 'ERROR_URL_INVALID' | translate }}</span></div></div></div><div><div class=\"btn btn-lg btn-default col-xs-12 col-sm-4 hidden-xs\" style=\"padding: 4px; margin-top:8px; background: rgba(255,255,255,0.5)\"><button ng-disabled=\"!field.fieldValue || forms.myForm.{{field.fieldType}}{{$index}}.$invalid\" ng-style=\"{'background-color':design.colors.buttonColor, 'color':design.colors.buttonTextColor}\" ng-click=$root.nextField() class=\"btn col-sm-5 col-xs-5\">{{ 'OK' | translate }} <i class=\"fa fa-check\"></i></button><div class=\"col-xs-6 col-sm-3\" style=margin-top:0.2em><small style=\"color:#ddd; font-size:70%\">{{ 'ENTER' | translate }}</small></div></div></div><div class=\"textfield field row\" ng-click=\"setActiveField(field._id, index, true)\"><div class=\"col-xs-12 field-title row-fluid\" ng-style=\"{'color': design.colors.questionColor}\"><h3 class=col-xs-12><small class=field-number>{{index+1}} <i class=\"fa fa-angle-double-right\" aria-hidden=true></i></small> {{field.title}} <span class=required-error ng-show=!field.required>({{ 'OPTIONAL' | translate }})</span></h3><p class=col-xs-12><small>{{field.description}}</small></p></div><div class=\"col-xs-12 field-input\"><input ng-style=\"{'color': design.colors.answerColor, 'border-color': design.colors.answerColor}\" name={{field.fieldType}}{{index}} type={{input_type}} ng-pattern=validateRegex placeholder={{placeholder}} ng-class=\"{ 'no-border': !!field.fieldValue }\" class=\"focusOn text-field-input\" ng-model=field.fieldValue ng-model-options=\"{ debounce: 250 }\" value=field.fieldValue ng-focus=\"setActiveField(field._id, index, true)\" on-enter-or-tab-key=nextField() on-tab-and-shift-key=prevField() ng-required=field.required ng-disabled=field.disabled aria-describedby=inputError2Status></div><div class=col-xs-12><div ng-show=\"forms.myForm.{{field.fieldType}}{{index}}.$invalid && !!forms.myForm.{{field.fieldType}}{{index}}.$viewValue \" class=\"alert alert-danger\" role=alert><span class=\"glyphicon glyphicon-exclamation-sign\" aria-hidden=true></span> <span class=sr-only>Error:</span> <span ng-if=\"field.fieldType == 'email'\">{{ 'ERROR_EMAIL_INVALID' | translate }}</span> <span ng-if=field.validateRegex>{{ 'ERROR_NOT_A_NUMBER' | translate }}</span> <span ng-if=\"field.fieldType == 'link'\">{{ 'ERROR_URL_INVALID' | translate }}</span></div></div></div><div><div class=\"btn btn-lg btn-default col-xs-12 col-sm-4 hidden-xs\" style=\"padding: 4px; margin-top:8px; background: rgba(255,255,255,0.5)\"><button ng-disabled=\"!field.fieldValue || forms.myForm.{{field.fieldType}}{{$index}}.$invalid\" ng-style=\"{'background-color':design.colors.buttonColor, 'color':design.colors.buttonTextColor}\" ng-click=$root.nextField() class=\"btn col-sm-5 col-xs-5\">{{ 'OK' | translate }} <i class=\"fa fa-check\"></i></button><div class=\"col-xs-6 col-sm-3\" style=margin-top:0.2em><small style=\"color:#ddd; font-size:70%\">{{ 'ENTER' | translate }}</small></div></div></div>");
"<div class=\"textfield field row\" ng-click=\"setActiveField(field._id, index, true)\"><div class=\"col-xs-12 field-title row-fluid\" ng-style=\"{'color': design.colors.questionColor}\"><h3 class=col-xs-12><small class=field-number>{{index+1}} <i class=\"fa fa-angle-double-right\" aria-hidden=true></i></small> {{field.title}} <span class=required-error ng-show=!field.required>({{ 'OPTIONAL' | translate }})</span></h3><p class=col-xs-12><small>{{field.description}}</small></p></div><div class=\"col-xs-12 field-input\"><input ng-style=\"{'color': design.colors.answerColor, 'border-color': design.colors.answerColor}\" name={{field.fieldType}}{{index}} type={{input_type}} ng-pattern=validateRegex placeholder={{placeholder}} ng-class=\"{ 'no-border': !!field.fieldValue }\" class=\"focusOn text-field-input\" ng-model=field.fieldValue ng-model-options=\"{ debounce: 250 }\" value=field.fieldValue ng-focus=\"setActiveField(field._id, index, true)\" on-enter-or-tab-key=nextField() on-tab-and-shift-key=prevField() ng-required=field.required ng-disabled=field.disabled aria-describedby=inputError2Status></div><div class=col-xs-12><div ng-show=\"forms.myForm.{{field.fieldType}}{{index}}.$invalid && !!forms.myForm.{{field.fieldType}}{{index}}.$viewValue \" class=\"alert alert-danger\" role=alert><span class=\"glyphicon glyphicon-exclamation-sign\" aria-hidden=true></span> <span class=sr-only>Error:</span> <span ng-if=\"field.fieldType == 'email'\">{{ 'ERROR_EMAIL_INVALID' | translate }}</span> <span ng-if=field.validateRegex>{{ 'ERROR_NOT_A_NUMBER' | translate }}</span> <span ng-if=\"field.fieldType == 'link'\">{{ 'ERROR_URL_INVALID' | translate }}</span></div></div></div><div><div class=\"btn btn-lg btn-default col-xs-12 col-sm-4 hidden-xs\" style=\"padding: 4px; margin-top:8px; background: rgba(255,255,255,0.5)\"><button ng-disabled=\"!field.fieldValue || forms.myForm.{{field.fieldType}}{{$index}}.$invalid\" ng-style=\"{'background-color':design.colors.buttonColor, 'color':design.colors.buttonTextColor}\" ng-click=$root.nextField() class=\"btn col-sm-5 col-xs-5\">{{ 'OK' | translate }} <i class=\"fa fa-check\"></i></button><div class=\"col-xs-6 col-sm-3\" style=margin-top:0.2em><small style=\"color:#ddd; font-size:70%\">{{ 'ENTER' | translate }}</small></div></div></div>");
$templateCache.put("modules/forms/base/views/directiveViews/field/yes_no.html",
"<div class=\"field row radio\" ng-click=\"setActiveField(field._id, index, true)\" on-tab-and-shift-key=prevField() key-to-truthy key-char-truthy=y key-char-falsey=n field=field><div class=\"col-xs-12 field-title\" ng-style=\"{'color': design.colors.questionColor}\"><h3 class=row><small class=field-number>{{index+1}} <i class=\"fa fa-angle-double-right\" aria-hidden=true></i></small> {{field.title}} <span class=required-error ng-show=!field.required>{{ 'OPTIONAL' | translate }}</span></h3><p class=row>{{field.description}}</p></div><div class=\"col-xs-12 field-input\"><div class=\"row col-xs-12\"><label class=\"btn btn-default\" style=\"background: rgba(0,0,0,0.1); text-align:left\"><input type=radio value=true class=focusOn style=\"opacity: 0; margin-left: 0px\" ng-model=field.fieldValue ng-focus=\"setActiveField(field._id, index, true)\" ng-model-options=\"{ debounce: 250 }\" ng-required=field.required ng-change=$root.nextField() ng-disabled=\"field.disabled\"><div class=letter>{{ 'Y' | translate }}</div><span>{{ 'YES' | translate }}</span> <i ng-show=\"field.fieldValue === 'true'\" class=\"fa fa-check\" aria-hidden=true></i></label></div><div class=\"row col-xs-12\" style=\"margin-top: 10px\"><label class=\"btn btn-default\" style=\"background: rgba(0,0,0,0.1); text-align:left\"><input type=radio value=false style=\"opacity:0; margin-left:0px\" ng-model=field.fieldValue ng-model-options=\"{ debounce: 250 }\" ng-required=field.required ng-change=$root.nextField() ng-disabled=\"field.disabled\"><div class=letter>{{ 'N' | translate }}</div><span>{{ 'NO' | translate }}</span> <i ng-show=\"field.fieldValue === 'false'\" class=\"fa fa-check\" aria-hidden=true></i></label></div></div></div><br>");
$templateCache.put("modules/forms/base/views/directiveViews/form/submit-form.client.view.html",
@ -167,7 +167,7 @@ angular.module('NodeForm.templates', []).run(['$templateCache', function($templa
$templateCache.put("modules/users/views/verify/resend-verify-email.client.view.html",
"<section class=\"auth valign-wrapper\" data-ng-controller=VerifyController><section class=\"row valign\" ng-if=!isResetSent><div class=\"col-md-4 col-md-offset-4\"><div class=\"col-md-12 text-center\" style=\"padding-bottom: 50px\"><img src=/static/modules/core/img/logo_white.svg height=100px></div><div data-ng-show=error class=\"text-center text-danger\"><strong>{{error}}</strong></div><div class=col-md-12><form data-ng-submit=resendVerifyEmail() class=\"signin form-horizontal\" autocomplete=off><fieldset><div class=form-group><input id=email name=email class=form-control data-ng-model=credentials.email placeholder=\"{{ 'ENTER_ACCOUNT_EMAIL' | translate}}\"></div><div class=\"text-center form-group\"><button type=submit class=\"btn btn-signup btn-rounded btn-block\" ng-click=resendVerifyEmail()>{{ 'RESEND_VERIFICATION_EMAIL' | translate }}</button></div></fieldset></form></div></div></section><section class=\"row valign\" ng-if=isResetSent><div class=\"col-md-4 col-md-offset-4\"><div class=\"col-md-12 text-center\" style=\"padding-bottom: 50px\"><img src=/static/modules/core/img/logo_white.svg height=100px></div><h3 class=\"col-md-12 text-center\">Verification Email has been Sent</h3><div class=col-md-12><h2>{{ 'VERIFICATION_EMAIL_SENT' | translate }} {{username}}.<br>{{ 'NOT_ACTIVATED_YET' | translate }}</h2><p>{{ 'CHECK_YOUR_EMAIL' | translate }} <a href=mail:polydaic@gmail.com>polydaic@gmail.com</a></p><div class=\"text-center form-group\"><button type=submit class=\"btn btn-large btn-primary btn-rounded\"><a href=\"/#!/\" style=color:white>Continue</a></button></div></div></div></section></section>");
$templateCache.put("modules/users/views/verify/verify-account.client.view.html",
"<section class=auth data-ng-controller=VerifyController ng-init=validateVerifyToken()><section class=\"row text-center\" ng-if=isResetSent><div class=\"col-md-4 col-md-offset-4\"><div class=\"col-md-12 text-center\" style=\"padding-bottom: 50px\"><img src=/static/modules/core/img/logo_white.svg height=100px></div><div class=col-md-12><a href=/#!/signin class=\"btn btn-signup btn-rounded btn-block\">{{ 'CONTINUE_TO_LOGIN' | translate }}</a></div></div></section><section class=\"row text-center\" ng-if=!isResetSent><div class=\"col-md-4 col-md-offset-4\"><div class=\"col-md-12 text-center\" style=\"padding-bottom: 50px\"><img src=/static/modules/core/img/logo_white.svg height=100px></div><h3 class=col-md-12>{{ 'VERIFY_ERROR' | translate }}</h3><div class=col-md-12><a href=/#!/verify class=\"btn btn-rounded btn-default\">{{ 'REVERIFY_ACCOUNT_LINK' | translate }}</a></div><div class=col-sm-12><a href=/#!/signin class=\"btn btn-rounded btn-primary\">{{ 'SIGNIN_BTN' | translate }}</a></div></div></section></section>");
"<section class=auth data-ng-controller=VerifyController ng-init=validateVerifyToken()><section class=\"row text-center\" ng-if=isResetSent><div class=\"col-md-4 col-md-offset-4\"><div class=\"col-md-12 text-center\" style=\"padding-bottom: 50px\"><img src=/static/modules/core/img/logo_white.svg height=100px></div><h3 class=col-md-12>{{ 'VERIFY_SUCCESS' | translate }}</h3><div class=col-md-12><a href=/#!/signin class=\"btn btn-signup btn-rounded btn-block\">{{ 'CONTINUE_TO_LOGIN' | translate }}</a></div></div></section><section class=\"row text-center\" ng-if=!isResetSent><div class=\"col-md-4 col-md-offset-4\"><div class=\"col-md-12 text-center\" style=\"padding-bottom: 50px\"><img src=/static/modules/core/img/logo_white.svg height=100px></div><h3 class=col-md-12>{{ 'VERIFY_ERROR' | translate }}</h3><div class=col-md-12><a href=/#!/verify class=\"btn btn-rounded btn-default\">{{ 'REVERIFY_ACCOUNT_LINK' | translate }}</a></div><div class=col-sm-12><a href=/#!/signin class=\"btn btn-rounded btn-primary\">{{ 'SIGNIN_BTN' | translate }}</a></div></div></section></section>");
}]);
'use strict';

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -64,7 +64,7 @@ angular.element(document).ready(function() {
angular.module('NodeForm.templates', []).run(['$templateCache', function($templateCache) {
"use strict";
$templateCache.put("modules/core/views/header.client.view.html",
"<section class=\"navbar navbar-inverse\" data-ng-controller=HeaderController ng-hide=hideNav><div class=container><div class=navbar-header><button class=navbar-toggle type=button data-ng-click=toggleCollapsibleMenu()><span class=sr-only>Toggle navigation</span> <span>{{ 'MENU_BTN' | translate }}</span></button> <a href=\"https://www.tellform.com/#!/\" class=navbar-brand><img src=/static/modules/core/img/logo_white.svg height=100%></a></div><nav class=\"collapse navbar-collapse\" collapse=!isCollapsed role=navigation><ul class=\"nav navbar-nav\" data-ng-if=authentication.isAuthenticated()><li data-ng-repeat=\"item in menu.items | orderBy: 'position'\" data-ng-if=item.shouldRender(authentication.isAuthenticated()); ng-switch=item.menuItemType ui-route={{item.uiRoute}} class={{item.menuItemClass}} ng-class=\"{active: ($uiRoute)}\" dropdown=\"item.menuItemType === 'dropdown'\"><a ng-switch-when=dropdown class=dropdown-toggle dropdown-toggle><span data-ng-bind=item.title></span> <b class=caret></b></a><ul ng-switch-when=dropdown class=dropdown-menu><li data-ng-repeat=\"subitem in item.items | orderBy: 'position'\" data-ng-if=subitem.shouldRender(authentication.isAuthenticated()); ui-route={{subitem.uiRoute}} ng-class=\"{active: $uiRoute}\"><a href=/#!/{{subitem.link}} data-ng-bind=subitem.title></a></li></ul><a ng-switch-default href=/#!/{{item.link}} data-ng-bind=item.title></a></li></ul><ul class=\"nav navbar-nav navbar-right\" data-ng-hide=authentication.isAuthenticated()><li ng-hide=$root.signupDisabled ui-route=/signup ng-class=\"{active: $uiRoute}\"><a href=/#!/signup>{{ 'SIGNUP_TAB' | translate }}</a></li><li class=divider-vertical></li><li ui-route=/signin ng-class=\"{active: $uiRoute}\"><a href=/#!/signin>{{ 'SIGNIN_TAB' | translate }}</a></li></ul><ul class=\"nav navbar-nav navbar-right\" data-ng-show=authentication.isAuthenticated()><li class=dropdown uib-dropdown><a href=# class=dropdown-toggle data-toggle=dropdown dropdown-toggle><span>{{ 'MY_SETTINGS' | translate }}</span> <b class=caret></b></a><ul class=dropdown-menu><li><a href=/#!/settings/profile>{{ 'EDIT_PROFILE' | translate }}</a></li><li class=divider></li><li><a href=/#!/settings/password>{{ 'CHANGE_PASSWORD' | translate }}</a></li></ul></li><li><a href=\"/\" ng-click=signout()>{{ 'SIGNOUT_TAB' | translate }}</a></li></ul></nav></div></section>");
"<section class=\"navbar navbar-inverse\" data-ng-controller=HeaderController ng-hide=hideNav><div class=container><div class=navbar-header><button class=navbar-toggle type=button data-ng-click=toggleCollapsibleMenu()><span class=sr-only>Toggle navigation</span> <span>{{ 'MENU_BTN' | translate }}</span></button> <a href=\"/#!/\" class=navbar-brand><img src=/static/modules/core/img/logo_white.svg height=100%></a></div><nav class=\"collapse navbar-collapse\" collapse=!isCollapsed role=navigation><ul class=\"nav navbar-nav navbar-right\" data-ng-hide=authentication.isAuthenticated()><li ng-hide=$root.signupDisabled ui-route=/signup ng-class=\"{active: $uiRoute}\"><a href=/#!/signup>{{ 'SIGNUP_TAB' | translate }}</a></li><li class=divider-vertical></li><li ui-route=/signin ng-class=\"{active: $uiRoute}\"><a href=/#!/signin>{{ 'SIGNIN_TAB' | translate }}</a></li></ul><ul class=\"nav navbar-nav navbar-right\" data-ng-show=authentication.isAuthenticated()><li class=dropdown uib-dropdown><a href=# class=dropdown-toggle data-toggle=dropdown dropdown-toggle><span>{{ 'MY_SETTINGS' | translate }}</span> <b class=caret></b></a><ul class=dropdown-menu><li><a href=/#!/settings/profile>{{ 'EDIT_PROFILE' | translate }}</a></li><li class=divider></li><li><a href=/#!/settings/password>{{ 'CHANGE_PASSWORD' | translate }}</a></li></ul></li><li><a href=\"/\" ng-click=signout()>{{ 'SIGNOUT_TAB' | translate }}</a></li></ul></nav></div></section>");
$templateCache.put("modules/forms/admin/views/admin-form.client.view.html",
"<header data-ng-include=\"'/static/modules/core/views/header.client.view.html'\"></header><div class=container cg-busy=\"{promise:updatePromise,templateUrl:'modules/forms/admin/views/directiveViews/cgBusy/update-form-message-TypeB.html',message:'Updating form...', backdrop:false, wrapperClass:'.busy-updating-wrapper'}\"></div><section class=admin-form><script type=text/ng-template id=myModalContent.html><div class=\"modal-header\">\n" +
" <h2 class=\"modal-title hidden-md hidden-lg\">{{ 'ARE_YOU_SURE' | translate }}</h2>\n" +
@ -88,7 +88,7 @@ angular.module('NodeForm.templates', []).run(['$templateCache', function($templa
" </button>\n" +
" </div></script><div class=page-header style=\"padding-bottom: 1em\"><div class=\"col-xs-10 col-sm-8\"><h1 class=\"hidden-sm hidden-xs\" data-ng-bind=myform.title style=\"margin-bottom: 0px\"></h1><h2 class=\"hidden-md hidden-lg\" data-ng-bind=myform.title style=\"margin-bottom: 0px\"></h2></div><div class=\"col-xs-1 col-sm-2\"><small class=pull-right><button class=\"btn btn-danger\" ng-click=openDeleteModal()><i class=\"fa fa-trash-o\"></i> <span class=\"show-sm hidden-lg hidden-md hidden-xs\">{{ 'DELETE_FORM_SM' | translate}}</span> <span class=\"hidden-xs hidden-sm\">{{ 'DELETE_FORM_MD' | translate}}</span></button></small></div><div class=\"col-xs-1 col-sm-2\"><small class=pull-right><a class=\"btn btn-secondary view-form-btn\" href={{actualFormURL}}><span class=\"hidden-xs hidden-sm\">{{ 'VIEW' | translate }} <span ng-show=myform.isLive>{{ 'LIVE' | translate }}</span> <span ng-hide=myform.isLive>{{ 'PREVIEW' | translate }}</span></span> <span class=\"hidden-xs hidden-md hidden-lg\">View <span ng-if=myform.isLive>{{ 'LIVE' | translate }}</span> <span ng-if=!myform.isLive>{{ 'PREVIEW' | translate }}</span></span> <i class=\"status-light status-light-on fa fa-dot-circle-o\" ng-if=myform.isLive></i> <i class=\"status-light status-light-off fa fa-dot-circle-o\" ng-if=!myform.isLive></i></a></small></div></div><div class=row><div class=col-xs-12><uib-tabset active=activePill vertical=true type=pills><uib-tab ng-repeat=\"tab in tabData\" index=$index heading={{tab.heading}}><div class=row data-ng-include=\"'/static/modules/forms/admin/views/adminTabs/'+tab.templateName+'.html'\" onload=\"form_url = trustSrc(formURL)\"></div></uib-tab><uib-tab heading=Design index=5><div class=\"config-form design container\"><div class=row><div class=\"col-md-4 col-sm-12 container\"><div class=\"row field\"><div class=\"field-title col-sm-5\"><h5>{{ 'BACKGROUND_COLOR' | translate }}</h5></div><div class=\"field-input col-sm-6\"><input class=form-control colorpicker=hex ng-model=myform.design.colors.backgroundColor ng-style=\"{ 'background-color': myform.design.colors.backgroundColor }\"></div></div><div class=\"row field\"><div class=\"field-title col-sm-5\"><h5>{{ 'QUESTION_TEXT_COLOR' | translate }}</h5></div><div class=\"field-input col-sm-6\"><input class=form-control colorpicker=hex ng-model=myform.design.colors.questionColor ng-style=\"{ 'background-color': myform.design.colors.questionColor }\"></div></div><div class=\"row field\"><div class=\"field-title col-sm-5\"><h5>{{ 'ANSWER_TEXT_COLOR' | translate }}</h5></div><div class=\"field-input col-sm-6\"><input class=form-control colorpicker=hex ng-model=myform.design.colors.answerColor ng-style=\"{ 'background-color': myform.design.colors.answerColor }\"></div></div><div class=\"row field\"><div class=\"field-title col-sm-5\"><h5>{{ 'BTN_BACKGROUND_COLOR' | translate }}</h5></div><div class=\"field-input col-sm-6\"><input class=form-control colorpicker=hex ng-model=myform.design.colors.buttonColor ng-style=\"{ 'background-color': myform.design.colors.buttonColor }\"></div></div><div class=\"row field\"><div class=\"field-title col-sm-5\"><h5>{{ 'BTN_TEXT_COLOR' | translate }}</h5></div><div class=\"field-input col-sm-6\"><input class=form-control colorpicker=hex ng-model=myform.design.colors.buttonTextColor ng-style=\"{ 'background-color': myform.design.colors.buttonTextColor }\"></div></div></div><div class=\"col-md-8 hide-md hide-lg\"><iframe id=iframe ng-if=!!formURL src={{trustSrc(formURL)}} style=\"border: none; box-shadow: 0px 0px 10px 0px grey; overflow: hidden; height: 400px; width: 90%; position: absolute\"></iframe></div></div><div class=row><div class=\"col-sm-offset-4 col-sm-2\"><button class=\"btn btn-signup btn-rounded\" type=button ng-click=\"update(false, null)\"><i class=\"icon-arrow-left icon-white\"></i>{{ 'SAVE_CHANGES' | translate }}</button></div><div class=col-sm-1><button class=\"btn btn-secondary btn-rounded\" type=button ng-click=resetForm()><i class=\"icon-eye-open icon-white\"></i>{{ 'CANCEL' | translate }}</button></div></div></div></uib-tab></uib-tabset></div></div></section>");
$templateCache.put("modules/forms/admin/views/list-forms.client.view.html",
"<header data-ng-include=\"'/static/modules/core/views/header.client.view.html'\"></header><section class=overlay ng-if=showCreateModal ng-click=closeCreateModal()></section><section data-ng-controller=\"ListFormsController as ctrl\" data-ng-init=findAll() class=container><br><div class=row><div ng-click=openCreateModal() class=\"col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-1 col-md-3 col-md-offset-1 form-item create-new\"><div class=\"title-row col-xs-12\"><h4 class=\"fa fa-plus fa-6\"></h4></div><div class=\"col-xs-12 details-row\"><small class=list-group-item-text>{{ 'CREATE_A_NEW_FORM' | translate }}</small></div></div><form name=forms.createForm class=\"col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-1 col-md-3 col-md-offset-1 form-item create-new new-form\" ng-if=showCreateModal><div class=\"title-row row\"><div class=\"col-xs-5 field-title text-left\">Name</div><div class=\"col-xs-12 field-input\"><input name=title required ng-model=formTitle ng-pattern=languageRegExp ng-minlength=4 style=\"color:black\"></div></div><div class=\"details-row row\"><div class=\"col-xs-5 field-title text-left\">Language</div><div class=\"col-xs-12 field-input\"><div class=\"button custom-select\"><select style=color:black name=language required ng-model=formLanguage ng-init=\"formLanguage = user.language\"><option ng-repeat=\"language in languages\" value={{language}}>{{language}}</option></select></div></div></div><div class=\"details-row submit row\"><div class=\"col-xs-12 field-title text-center\"><button class=\"btn btn-primary\" ng-disabled=forms.createForm.$invalid ng-click=createNewForm()>{{ 'CREATE_FORM' | translate }}</button></div></div></form><div data-ng-repeat=\"form in myforms\" ng-style=\"{ 'background-color': form.design.colors.backgroundColor, 'color': form.design.colors.answerColor }\" class=\"col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-1 col-md-3 col-md-offset-1 form-item container\"><div class=row><span class=pull-right><i style=cursor:pointer class=\"fa fa-trash-o\" ng-click=removeForm($index)></i> <i style=cursor:pointer class=\"fa fa-files-o\" ng-click=duplicateForm($index)></i></span></div><div class=row><a data-ng-href=#!/forms/{{form._id}}/admin/create ng-style=\"{ 'color': form.design.colors.answerColor }\" class=\"title-row col-xs-12\"><h4 class=list-group-item-heading data-ng-bind=form.title></h4></a></div><div class=\"row footer\"><div class=\"col-xs-12 details-row\"><small class=list-group-item-text>{{ 'CREATED_ON' | translate }} <span data-ng-bind=\"form.created | date:'shortDate'\"></span></small></div></div></div></div></section>");
"<header data-ng-include=\"'/static/modules/core/views/header.client.view.html'\"></header><section class=overlay ng-if=showCreateModal ng-click=closeCreateModal()></section><section data-ng-controller=\"ListFormsController as ctrl\" data-ng-init=findAll() class=container><br><div class=row><div class=\"col-xs-4 col-xs-offset-4\"><h3 class=\"text-center forms-list-title\">My Forms</h3></div></div><div class=row><div ng-click=openCreateModal() class=\"col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-1 col-md-3 col-md-offset-1 form-item create-new\"><div class=\"title-row col-xs-12\"><h4 class=\"fa fa-plus fa-6\"></h4></div><div class=\"col-xs-12 details-row\"><small class=list-group-item-text>{{ 'CREATE_A_NEW_FORM' | translate }}</small></div></div><form name=forms.createForm class=\"col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-1 col-md-3 col-md-offset-1 form-item create-new new-form\" ng-if=showCreateModal><div class=\"title-row row\"><div class=\"col-xs-5 field-title text-left\">Name</div><div class=\"col-xs-12 field-input\"><input name=title required ng-model=formTitle ng-pattern=languageRegExp ng-minlength=4 style=\"color:black\"></div></div><div class=\"details-row row\"><div class=\"col-xs-5 field-title text-left\">Language</div><div class=\"col-xs-12 field-input\"><div class=\"button custom-select\"><select style=color:black name=language required ng-model=formLanguage ng-init=\"formLanguage = user.language\"><option ng-repeat=\"language in languages\" value={{language}}>{{language}}</option></select></div></div></div><div class=\"details-row submit row\"><div class=\"col-xs-12 field-title text-center\"><button class=\"btn btn-primary\" ng-disabled=forms.createForm.$invalid ng-click=createNewForm()>{{ 'CREATE_FORM' | translate }}</button></div></div></form><div data-ng-repeat=\"form in myforms\" class=\"col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-1 col-md-3 col-md-offset-1 form-item container\" ng-class=\"{'paused': !form.isLive}\"><div class=row><span class=pull-right><i style=cursor:pointer class=\"fa fa-trash-o\" ng-click=removeForm($index)></i> <i style=cursor:pointer class=\"fa fa-files-o\" ng-click=duplicateForm($index)></i></span></div><div class=row><a data-ng-href=#!/forms/{{form._id}}/admin/create class=\"title-row col-xs-12\"><h4 class=list-group-item-heading data-ng-bind=form.title></h4></a><div class=\"col-xs-12 responses-row\"><small class=list-group-item-text><span>{{ form.submissions.length }} responses</span></small> <small ng-if=!form.isLive class=list-group-item-text><span>Form Paused</span></small></div></div></div></div></section>");
$templateCache.put("modules/forms/base/views/submit-form.client.view.html",
"<section class=public-form ng-style=\"{ 'background-color': myform.design.colors.backgroundColor }\"><submit-form-directive myform=myform></submit-form-directive></section><script ng-if=myform.analytics.gaCode>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n" +
" (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n" +
@ -137,7 +137,7 @@ angular.module('NodeForm.templates', []).run(['$templateCache', function($templa
"<div class=\"field row\" ng-click=\"setActiveField(field._id, index, true)\"><div class=\"col-xs-12 field-title\" ng-style=\"{'color': design.colors.questionColor}\"><h3><small class=field-number>{{index+1}} <i class=\"fa fa-angle-double-right\" aria-hidden=true></i></small> {{field.title}} <span class=required-error ng-show=!field.required>{{ 'OPTIONAL' | translate }}</span></h3><small>{{ 'NEWLINE' | translate }}</small><p><small>{{field.description}}</small></p></div><div class=\"col-xs-12 field-input\"><small style=font-size:0.6em>Press SHIFT+ENTER to add a newline</small><textarea class=\"textarea focusOn\" type=text ng-model=field.fieldValue ng-model-options=\"{ debounce: 250 }\" ng-class=\"{ 'no-border': !!field.fieldValue }\" value={{field.fieldValue}} ng-required=field.required ng-disabled=field.disabled ng-focus=\"setActiveField(field._id, index, true)\" on-enter-or-tab-key=nextField() on-tab-and-shift-key=prevField() style=\"border: none; border-left: lightgrey dashed 2px\">\n" +
" </textarea></div></div><div><div class=\"btn btn-lg btn-default hidden-xs\" style=\"padding: 4px; margin-top:8px; background: rgba(255,255,255,0.5)\"><button ng-disabled=\"!field.fieldValue || forms.myForm.{{field.fieldType}}{{$index}}.$invalid\" ng-style=\"{'background-color':design.colors.buttonColor, 'color':design.colors.buttonTextColor}\" ng-click=$root.nextField() class=\"btn col-sm-5 col-xs-5\">{{ 'OK' | translate }} <i class=\"fa fa-check\"></i></button><div class=\"col-sm-3 col-xs-6\" style=margin-top:0.2em><small style=\"color:#ddd; font-size:70%\">{{ 'ENTER' | translate }}</small></div></div></div>");
$templateCache.put("modules/forms/base/views/directiveViews/field/textfield.html",
"<div class=\"textfield field row\" ng-click=\"setActiveField(field._id, index, true)\"><div class=\"col-xs-12 field-title row-fluid\" ng-style=\"{'color': design.colors.questionColor}\"><h3 class=col-xs-12><small class=field-number>{{index+1}} <i class=\"fa fa-angle-double-right\" aria-hidden=true></i></small> {{field.title}} <span class=required-error ng-show=!field.required>({{ 'OPTIONAL' | translate }})</span></h3><p class=col-xs-12><small>{{field.description}}</small></p></div><div class=\"col-xs-12 field-input\"><input ng-style=\"{'color': design.colors.answerColor, 'border-color': design.colors.answerColor}\" name={{field.fieldType}}{{index}} type={{input_type}} ng-pattern=validateRegex placeholder={{placeholder}} ng-class=\"{ 'no-border': !!field.fieldValue }\" class=\"focusOn text-field-input\" ng-model=field.fieldValue ng-model-options=\"{ debounce: 250 }\" value=field.fieldValue ng-focus=\"setActiveField(field._id, index, true)\" on-enter-or-tab-key=nextField() on-tab-and-shift-key=prevField() ng-required=field.required ng-disabled=field.disabled aria-describedby=inputError2Status></div><div class=col-xs-12><div ng-show=\"forms.myForm.{{field.fieldType}}{{index}}.$invalid && !!forms.myForm.{{field.fieldType}}{{index}}.$viewValue \" class=\"alert alert-danger\" role=alert><span class=\"glyphicon glyphicon-exclamation-sign\" aria-hidden=true></span> <span class=sr-only>Error:</span> <span ng-if=\"field.fieldType == 'email'\">{{ 'ERROR_EMAIL_INVALID' | translate }}</span> <span ng-if=field.validateRegex>{{ 'ERROR_NOT_A_NUMBER' | translate }}</span> <span ng-if=\"field.fieldType == 'link'\">{{ 'ERROR_URL_INVALID' | translate }}</span></div></div></div><div><div class=\"btn btn-lg btn-default col-xs-12 col-sm-4 hidden-xs\" style=\"padding: 4px; margin-top:8px; background: rgba(255,255,255,0.5)\"><button ng-disabled=\"!field.fieldValue || forms.myForm.{{field.fieldType}}{{$index}}.$invalid\" ng-style=\"{'background-color':design.colors.buttonColor, 'color':design.colors.buttonTextColor}\" ng-click=$root.nextField() class=\"btn col-sm-5 col-xs-5\">{{ 'OK' | translate }} <i class=\"fa fa-check\"></i></button><div class=\"col-xs-6 col-sm-3\" style=margin-top:0.2em><small style=\"color:#ddd; font-size:70%\">{{ 'ENTER' | translate }}</small></div></div></div><div class=\"textfield field row\" ng-click=\"setActiveField(field._id, index, true)\"><div class=\"col-xs-12 field-title row-fluid\" ng-style=\"{'color': design.colors.questionColor}\"><h3 class=col-xs-12><small class=field-number>{{index+1}} <i class=\"fa fa-angle-double-right\" aria-hidden=true></i></small> {{field.title}} <span class=required-error ng-show=!field.required>({{ 'OPTIONAL' | translate }})</span></h3><p class=col-xs-12><small>{{field.description}}</small></p></div><div class=\"col-xs-12 field-input\"><input ng-style=\"{'color': design.colors.answerColor, 'border-color': design.colors.answerColor}\" name={{field.fieldType}}{{index}} type={{input_type}} ng-pattern=validateRegex placeholder={{placeholder}} ng-class=\"{ 'no-border': !!field.fieldValue }\" class=\"focusOn text-field-input\" ng-model=field.fieldValue ng-model-options=\"{ debounce: 250 }\" value=field.fieldValue ng-focus=\"setActiveField(field._id, index, true)\" on-enter-or-tab-key=nextField() on-tab-and-shift-key=prevField() ng-required=field.required ng-disabled=field.disabled aria-describedby=inputError2Status></div><div class=col-xs-12><div ng-show=\"forms.myForm.{{field.fieldType}}{{index}}.$invalid && !!forms.myForm.{{field.fieldType}}{{index}}.$viewValue \" class=\"alert alert-danger\" role=alert><span class=\"glyphicon glyphicon-exclamation-sign\" aria-hidden=true></span> <span class=sr-only>Error:</span> <span ng-if=\"field.fieldType == 'email'\">{{ 'ERROR_EMAIL_INVALID' | translate }}</span> <span ng-if=field.validateRegex>{{ 'ERROR_NOT_A_NUMBER' | translate }}</span> <span ng-if=\"field.fieldType == 'link'\">{{ 'ERROR_URL_INVALID' | translate }}</span></div></div></div><div><div class=\"btn btn-lg btn-default col-xs-12 col-sm-4 hidden-xs\" style=\"padding: 4px; margin-top:8px; background: rgba(255,255,255,0.5)\"><button ng-disabled=\"!field.fieldValue || forms.myForm.{{field.fieldType}}{{$index}}.$invalid\" ng-style=\"{'background-color':design.colors.buttonColor, 'color':design.colors.buttonTextColor}\" ng-click=$root.nextField() class=\"btn col-sm-5 col-xs-5\">{{ 'OK' | translate }} <i class=\"fa fa-check\"></i></button><div class=\"col-xs-6 col-sm-3\" style=margin-top:0.2em><small style=\"color:#ddd; font-size:70%\">{{ 'ENTER' | translate }}</small></div></div></div>");
"<div class=\"textfield field row\" ng-click=\"setActiveField(field._id, index, true)\"><div class=\"col-xs-12 field-title row-fluid\" ng-style=\"{'color': design.colors.questionColor}\"><h3 class=col-xs-12><small class=field-number>{{index+1}} <i class=\"fa fa-angle-double-right\" aria-hidden=true></i></small> {{field.title}} <span class=required-error ng-show=!field.required>({{ 'OPTIONAL' | translate }})</span></h3><p class=col-xs-12><small>{{field.description}}</small></p></div><div class=\"col-xs-12 field-input\"><input ng-style=\"{'color': design.colors.answerColor, 'border-color': design.colors.answerColor}\" name={{field.fieldType}}{{index}} type={{input_type}} ng-pattern=validateRegex placeholder={{placeholder}} ng-class=\"{ 'no-border': !!field.fieldValue }\" class=\"focusOn text-field-input\" ng-model=field.fieldValue ng-model-options=\"{ debounce: 250 }\" value=field.fieldValue ng-focus=\"setActiveField(field._id, index, true)\" on-enter-or-tab-key=nextField() on-tab-and-shift-key=prevField() ng-required=field.required ng-disabled=field.disabled aria-describedby=inputError2Status></div><div class=col-xs-12><div ng-show=\"forms.myForm.{{field.fieldType}}{{index}}.$invalid && !!forms.myForm.{{field.fieldType}}{{index}}.$viewValue \" class=\"alert alert-danger\" role=alert><span class=\"glyphicon glyphicon-exclamation-sign\" aria-hidden=true></span> <span class=sr-only>Error:</span> <span ng-if=\"field.fieldType == 'email'\">{{ 'ERROR_EMAIL_INVALID' | translate }}</span> <span ng-if=field.validateRegex>{{ 'ERROR_NOT_A_NUMBER' | translate }}</span> <span ng-if=\"field.fieldType == 'link'\">{{ 'ERROR_URL_INVALID' | translate }}</span></div></div></div><div><div class=\"btn btn-lg btn-default col-xs-12 col-sm-4 hidden-xs\" style=\"padding: 4px; margin-top:8px; background: rgba(255,255,255,0.5)\"><button ng-disabled=\"!field.fieldValue || forms.myForm.{{field.fieldType}}{{$index}}.$invalid\" ng-style=\"{'background-color':design.colors.buttonColor, 'color':design.colors.buttonTextColor}\" ng-click=$root.nextField() class=\"btn col-sm-5 col-xs-5\">{{ 'OK' | translate }} <i class=\"fa fa-check\"></i></button><div class=\"col-xs-6 col-sm-3\" style=margin-top:0.2em><small style=\"color:#ddd; font-size:70%\">{{ 'ENTER' | translate }}</small></div></div></div>");
$templateCache.put("modules/forms/base/views/directiveViews/field/yes_no.html",
"<div class=\"field row radio\" ng-click=\"setActiveField(field._id, index, true)\" on-tab-and-shift-key=prevField() key-to-truthy key-char-truthy=y key-char-falsey=n field=field><div class=\"col-xs-12 field-title\" ng-style=\"{'color': design.colors.questionColor}\"><h3 class=row><small class=field-number>{{index+1}} <i class=\"fa fa-angle-double-right\" aria-hidden=true></i></small> {{field.title}} <span class=required-error ng-show=!field.required>{{ 'OPTIONAL' | translate }}</span></h3><p class=row>{{field.description}}</p></div><div class=\"col-xs-12 field-input\"><div class=\"row col-xs-12\"><label class=\"btn btn-default\" style=\"background: rgba(0,0,0,0.1); text-align:left\"><input type=radio value=true class=focusOn style=\"opacity: 0; margin-left: 0px\" ng-model=field.fieldValue ng-focus=\"setActiveField(field._id, index, true)\" ng-model-options=\"{ debounce: 250 }\" ng-required=field.required ng-change=$root.nextField() ng-disabled=\"field.disabled\"><div class=letter>{{ 'Y' | translate }}</div><span>{{ 'YES' | translate }}</span> <i ng-show=\"field.fieldValue === 'true'\" class=\"fa fa-check\" aria-hidden=true></i></label></div><div class=\"row col-xs-12\" style=\"margin-top: 10px\"><label class=\"btn btn-default\" style=\"background: rgba(0,0,0,0.1); text-align:left\"><input type=radio value=false style=\"opacity:0; margin-left:0px\" ng-model=field.fieldValue ng-model-options=\"{ debounce: 250 }\" ng-required=field.required ng-change=$root.nextField() ng-disabled=\"field.disabled\"><div class=letter>{{ 'N' | translate }}</div><span>{{ 'NO' | translate }}</span> <i ng-show=\"field.fieldValue === 'false'\" class=\"fa fa-check\" aria-hidden=true></i></label></div></div></div><br>");
$templateCache.put("modules/forms/base/views/directiveViews/form/submit-form.client.view.html",
@ -167,7 +167,7 @@ angular.module('NodeForm.templates', []).run(['$templateCache', function($templa
$templateCache.put("modules/users/views/verify/resend-verify-email.client.view.html",
"<section class=\"auth valign-wrapper\" data-ng-controller=VerifyController><section class=\"row valign\" ng-if=!isResetSent><div class=\"col-md-4 col-md-offset-4\"><div class=\"col-md-12 text-center\" style=\"padding-bottom: 50px\"><img src=/static/modules/core/img/logo_white.svg height=100px></div><div data-ng-show=error class=\"text-center text-danger\"><strong>{{error}}</strong></div><div class=col-md-12><form data-ng-submit=resendVerifyEmail() class=\"signin form-horizontal\" autocomplete=off><fieldset><div class=form-group><input id=email name=email class=form-control data-ng-model=credentials.email placeholder=\"{{ 'ENTER_ACCOUNT_EMAIL' | translate}}\"></div><div class=\"text-center form-group\"><button type=submit class=\"btn btn-signup btn-rounded btn-block\" ng-click=resendVerifyEmail()>{{ 'RESEND_VERIFICATION_EMAIL' | translate }}</button></div></fieldset></form></div></div></section><section class=\"row valign\" ng-if=isResetSent><div class=\"col-md-4 col-md-offset-4\"><div class=\"col-md-12 text-center\" style=\"padding-bottom: 50px\"><img src=/static/modules/core/img/logo_white.svg height=100px></div><h3 class=\"col-md-12 text-center\">Verification Email has been Sent</h3><div class=col-md-12><h2>{{ 'VERIFICATION_EMAIL_SENT' | translate }} {{username}}.<br>{{ 'NOT_ACTIVATED_YET' | translate }}</h2><p>{{ 'CHECK_YOUR_EMAIL' | translate }} <a href=mail:polydaic@gmail.com>polydaic@gmail.com</a></p><div class=\"text-center form-group\"><button type=submit class=\"btn btn-large btn-primary btn-rounded\"><a href=\"/#!/\" style=color:white>Continue</a></button></div></div></div></section></section>");
$templateCache.put("modules/users/views/verify/verify-account.client.view.html",
"<section class=auth data-ng-controller=VerifyController ng-init=validateVerifyToken()><section class=\"row text-center\" ng-if=isResetSent><div class=\"col-md-4 col-md-offset-4\"><div class=\"col-md-12 text-center\" style=\"padding-bottom: 50px\"><img src=/static/modules/core/img/logo_white.svg height=100px></div><div class=col-md-12><a href=/#!/signin class=\"btn btn-signup btn-rounded btn-block\">{{ 'CONTINUE_TO_LOGIN' | translate }}</a></div></div></section><section class=\"row text-center\" ng-if=!isResetSent><div class=\"col-md-4 col-md-offset-4\"><div class=\"col-md-12 text-center\" style=\"padding-bottom: 50px\"><img src=/static/modules/core/img/logo_white.svg height=100px></div><h3 class=col-md-12>{{ 'VERIFY_ERROR' | translate }}</h3><div class=col-md-12><a href=/#!/verify class=\"btn btn-rounded btn-default\">{{ 'REVERIFY_ACCOUNT_LINK' | translate }}</a></div><div class=col-sm-12><a href=/#!/signin class=\"btn btn-rounded btn-primary\">{{ 'SIGNIN_BTN' | translate }}</a></div></div></section></section>");
"<section class=auth data-ng-controller=VerifyController ng-init=validateVerifyToken()><section class=\"row text-center\" ng-if=isResetSent><div class=\"col-md-4 col-md-offset-4\"><div class=\"col-md-12 text-center\" style=\"padding-bottom: 50px\"><img src=/static/modules/core/img/logo_white.svg height=100px></div><h3 class=col-md-12>{{ 'VERIFY_SUCCESS' | translate }}</h3><div class=col-md-12><a href=/#!/signin class=\"btn btn-signup btn-rounded btn-block\">{{ 'CONTINUE_TO_LOGIN' | translate }}</a></div></div></section><section class=\"row text-center\" ng-if=!isResetSent><div class=\"col-md-4 col-md-offset-4\"><div class=\"col-md-12 text-center\" style=\"padding-bottom: 50px\"><img src=/static/modules/core/img/logo_white.svg height=100px></div><h3 class=col-md-12>{{ 'VERIFY_ERROR' | translate }}</h3><div class=col-md-12><a href=/#!/verify class=\"btn btn-rounded btn-default\">{{ 'REVERIFY_ACCOUNT_LINK' | translate }}</a></div><div class=col-sm-12><a href=/#!/signin class=\"btn btn-rounded btn-primary\">{{ 'SIGNIN_BTN' | translate }}</a></div></div></section></section>");
}]);
'use strict';

File diff suppressed because one or more lines are too long

View file

@ -34,7 +34,7 @@
on-tab-and-shift-key="prevField()"
ng-required="field.required"
ng-disabled="field.disabled"
aria-describedby="inputError2Status">
aria-describedby="inputError2Status"/ >
</div>
<div class="col-xs-12">
<div ng-show="forms.myForm.{{field.fieldType}}{{index}}.$invalid && !!forms.myForm.{{field.fieldType}}{{index}}.$viewValue " class="alert alert-danger" role="alert">

View file

@ -1,3 +1,5 @@
body {
overflow-x: hidden;
font-family: 'Source Sans Pro', sans-serif;
@ -34,9 +36,10 @@ body {
/*Navbar Custom CSS*/
.navbar {
min-height: 60px;
padding: 10px 0 10px 0;
}
.navbar-inverse {
background-color:#588EB4;
background-color:#3FA2F7;
border: 0;
color: white!important;
}

View file

@ -5,25 +5,11 @@
<span class="sr-only">Toggle navigation</span>
<span>{{ 'MENU_BTN' | translate }}</span>
</button>
<a href="https://www.tellform.com/#!/" class="navbar-brand">
<a href="/#!/" class="navbar-brand">
<img src="/static/modules/core/img/logo_white.svg" height="100%">
</a>
</div>
<nav class="collapse navbar-collapse" collapse="!isCollapsed" role="navigation">
<ul class="nav navbar-nav" data-ng-if="authentication.isAuthenticated()">
<li data-ng-repeat="item in menu.items | orderBy: 'position'" data-ng-if="item.shouldRender(authentication.isAuthenticated());" ng-switch="item.menuItemType" ui-route="{{item.uiRoute}}" class="{{item.menuItemClass}}" ng-class="{active: ($uiRoute)}" dropdown="item.menuItemType === 'dropdown'">
<a ng-switch-when="dropdown" class="dropdown-toggle" dropdown-toggle>
<span data-ng-bind="item.title"></span>
<b class="caret"></b>
</a>
<ul ng-switch-when="dropdown" class="dropdown-menu">
<li data-ng-repeat="subitem in item.items | orderBy: 'position'" data-ng-if="subitem.shouldRender(authentication.isAuthenticated());" ui-route="{{subitem.uiRoute}}" ng-class="{active: $uiRoute}">
<a href="/#!/{{subitem.link}}" data-ng-bind="subitem.title"></a>
</li>
</ul>
<a ng-switch-default href="/#!/{{item.link}}" data-ng-bind="item.title"></a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right" data-ng-hide="authentication.isAuthenticated()">
<li ng-hide="$root.signupDisabled" ui-route="/signup" ng-class="{active: $uiRoute}">
<a href="/#!/signup">{{ 'SIGNUP_TAB' | translate }}</a>

View file

@ -4,6 +4,13 @@
<section data-ng-controller="ListFormsController as ctrl" data-ng-init="findAll()" class="container">
<br>
<div class="row">
<div class="col-xs-4 col-xs-offset-4">
<h3 class="text-center forms-list-title">
My Forms
</h3>
</div>
</div>
<div class="row">
<div ng-click="openCreateModal()" class="col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-1 col-md-3 col-md-offset-1 form-item create-new">
<div class="title-row col-xs-12">
@ -47,8 +54,8 @@
</form>
<div data-ng-repeat="form in myforms"
ng-style="{ 'background-color': form.design.colors.backgroundColor, 'color': form.design.colors.answerColor }"
class="col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-1 col-md-3 col-md-offset-1 form-item container">
class="col-xs-6 col-xs-offset-3 col-sm-4 col-sm-offset-1 col-md-3 col-md-offset-1 form-item container"
ng-class="{'paused': !form.isLive}">
<div class="row">
<span class="pull-right">
@ -58,21 +65,19 @@
</div>
<div class="row">
<a data-ng-href="#!/forms/{{form._id}}/admin/create"
ng-style="{ 'color': form.design.colors.answerColor }"
class="title-row col-xs-12">
<h4 class="list-group-item-heading" data-ng-bind="form.title"></h4>
</a>
</div>
<div class="row footer">
<div class="col-xs-12 details-row">
<a data-ng-href="#!/forms/{{form._id}}/admin/create"
class="title-row col-xs-12">
<h4 class="list-group-item-heading" data-ng-bind="form.title"></h4>
</a>
<div class="col-xs-12 responses-row">
<small class="list-group-item-text">
{{ 'CREATED_ON' | translate }}
<span data-ng-bind="form.created | date:'shortDate'"></span>
<span> {{ form.submissions.length }} responses </span>
</small>
<br>
<br>
<small ng-if="!form.isLive" class="list-group-item-text">
<span> Form Paused </span>
</small>
</div>
</div>
</div>

View file

@ -435,18 +435,28 @@ section.public-form .form-submitted {
section.public-form .btn {
border: 1px solid;
}
.form-item {
border-radius: 5px;
text-align: center;
border-bottom: 6px inset #ccc;
background-color: #eee;
width: 180px;
/*width:100%;*/
position: relative;
height: 215px;
/*padding-bottom: 25%;*/
margin-bottom: 45px;
}
.form-item.paused {
background-color: red;
color: white;
}
.form-item.paused:hover {
background-color: darkred;
color: white;
}
.form-item.create-new input[type='text']{
width: inherit;
color:black;
@ -454,17 +464,22 @@ section.public-form .btn {
}
.form-item.create-new {
background-color: rgb(131,131,131);
background-color: #3FA2F7;
color: white;
}
.form-item.create-new:hover {
background-color: #276496;
}
/*CREATE-NEW FORM MODAL*/
.form-item.create-new.new-form {
background-color: rgb(300,131,131);
z-index: 11;
}
.form-item.create-new.new-form:hover {
background-color: rgb(300,100,100);
background-color: #3079b5;
}
.form-item.new-form input[type='text'] {
margin-top:0.2em;
@ -531,10 +546,23 @@ section.public-form .btn {
.activeField input {
background-color: transparent;
}
h3.forms-list-title {
color: #3FA2F7;
weight: 600;
margin-bottom: 3em;
}
.form-item {
color: #71AADD;
background-color: #E4F1FD;
}
.form-item:hover {
background-color: #3FA2F7;
color: #23527C;
}
.form-item:hover, .form-item.create-new:hover {
border-bottom: 8px inset #ccc;
.form-item.create-new:hover {
background-color: #d9d9d9;
color: white;
}
.form-item.create-new:hover {
@ -547,15 +575,17 @@ section.public-form .btn {
left: 30%;
}
.form-item .title-row{
.form-item .title-row {
position: relative;
top: 15px;
padding-top:3em;
padding-bottom:3.65em;
padding-bottom:1em;
}
.form-item .title-row h4 {
font-size: 1.3em;
}
.form-item .responses-row {
}
.form-item.create-new .title-row{
padding: 0;

View file

@ -63,68 +63,3 @@
</div>
</div>
</div>
<div class="textfield field row"
ng-click="setActiveField(field._id, index, true)">
<div class="col-xs-12 field-title row-fluid" ng-style="{'color': design.colors.questionColor}">
<h3 class="col-xs-12">
<small class="field-number">
{{index+1}}
<i class="fa fa-angle-double-right" aria-hidden="true"></i>
</small>
{{field.title}}
<span class="required-error" ng-show="!field.required">
({{ 'OPTIONAL' | translate }})
</span>
</h3>
<p class="col-xs-12">
<small>{{field.description}}</small>
</p>
</div>
<div class="col-xs-12 field-input">
<input ng-style="{'color': design.colors.answerColor, 'border-color': design.colors.answerColor}"
name="{{field.fieldType}}{{index}}"
type="{{input_type}}"
ng-pattern="validateRegex"
placeholder="{{placeholder}}"
ng-class="{ 'no-border': !!field.fieldValue }"
class="focusOn text-field-input"
ng-model="field.fieldValue"
ng-model-options="{ debounce: 250 }"
value="field.fieldValue"
ng-focus="setActiveField(field._id, index, true)"
on-enter-or-tab-key="nextField()"
on-tab-and-shift-key="prevField()"
ng-required="field.required"
ng-disabled="field.disabled"
aria-describedby="inputError2Status">
</div>
<div class="col-xs-12">
<div ng-show="forms.myForm.{{field.fieldType}}{{index}}.$invalid && !!forms.myForm.{{field.fieldType}}{{index}}.$viewValue " class="alert alert-danger" role="alert">
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
<span class="sr-only">Error:</span>
<span ng-if="field.fieldType == 'email'"> {{ 'ERROR_EMAIL_INVALID' | translate }} </span>
<span ng-if="field.validateRegex"> {{ 'ERROR_NOT_A_NUMBER' | translate }} </span>
<span ng-if="field.fieldType == 'link'"> {{ 'ERROR_URL_INVALID' | translate }} </span>
</div>
</div>
</div>
<div>
<div class="btn btn-lg btn-default col-xs-12 col-sm-4 hidden-xs"
style="padding: 4px; margin-top:8px; background: rgba(255,255,255,0.5)">
<button ng-disabled="!field.fieldValue || forms.myForm.{{field.fieldType}}{{$index}}.$invalid"
ng-style="{'background-color':design.colors.buttonColor, 'color':design.colors.buttonTextColor}"
ng-click="$root.nextField()"
class="btn col-sm-5 col-xs-5">
{{ 'OK' | translate }} <i class="fa fa-check"></i>
</button>
<div class="col-xs-6 col-sm-3" style="margin-top:0.2em">
<small style="color:#ddd; font-size:70%">
{{ 'ENTER' | translate }}
</small>
</div>
</div>
</div>