";var s="https://fireform.firebaseio.com/emailQConfirmation.json",f=new XMLHttpRequest;f.open("POST",s,!0),f.setRequestHeader("Content-type","application/x-www-form-urlencoded"),f.send(JSON.stringify(m))}if(that.emailNotification){m.emailNotification=that.emailNotification?that.emailNotification:void 0;var u="https://fireform.firebaseio.com/emailQNotification.json",d=new XMLHttpRequest;d.open("POST",u,!0),d.setRequestHeader("Content-type","application/x-www-form-urlencoded"),d.send(JSON.stringify(m))}o.onreadystatechange=function(){4==o.readyState&&(a.className+=" "+r,i&&i.disableInput||that.disableInput(that.submitElement),i&&i.callback&&i.callback(null,{url:n}))}},this.disableInput=function(t){var e=document.createAttribute("disabled");e.value="true",t.setAttributeNode(e)},n.onclick=this.submit,this):void this.error('Please add a submit button with a attr"')};
--------------------------------------------------------------------------------
/img/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SFDevLabs/fireform/9b00ce76cbc0f7a5ceb56629bfb85b0eb10b7862/img/.gitkeep
--------------------------------------------------------------------------------
/img/collect-data-with-fireform.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SFDevLabs/fireform/9b00ce76cbc0f7a5ceb56629bfb85b0eb10b7862/img/collect-data-with-fireform.png
--------------------------------------------------------------------------------
/img/fireform-logo-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SFDevLabs/fireform/9b00ce76cbc0f7a5ceb56629bfb85b0eb10b7862/img/fireform-logo-white.png
--------------------------------------------------------------------------------
/img/fireform-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SFDevLabs/fireform/9b00ce76cbc0f7a5ceb56629bfb85b0eb10b7862/img/fireform-logo.png
--------------------------------------------------------------------------------
/img/generate-fireform-code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SFDevLabs/fireform/9b00ce76cbc0f7a5ceb56629bfb85b0eb10b7862/img/generate-fireform-code.png
--------------------------------------------------------------------------------
/img/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SFDevLabs/fireform/9b00ce76cbc0f7a5ceb56629bfb85b0eb10b7862/img/loading.gif
--------------------------------------------------------------------------------
/img/paste-fireform-code-into-html.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SFDevLabs/fireform/9b00ce76cbc0f7a5ceb56629bfb85b0eb10b7862/img/paste-fireform-code-into-html.png
--------------------------------------------------------------------------------
/img/sf-dev-labs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SFDevLabs/fireform/9b00ce76cbc0f7a5ceb56629bfb85b0eb10b7862/img/sf-dev-labs.png
--------------------------------------------------------------------------------
/img/spark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SFDevLabs/fireform/9b00ce76cbc0f7a5ceb56629bfb85b0eb10b7862/img/spark.png
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | We will be in touch shortly.
",
43 | emailConfirmationBodyText:"Thanks for reaching out! We will be in touch shortly"
44 | }
45 | new Fireform('#FireFormContact', 'http://fireform/list/26/contactUsFF', options);
46 | }
47 |
48 | //might need this at some point to edit tmpls
49 | // $rootScope.initHighlighting= function(loggedin, loggedout){
50 | // // debugger
51 | // // setTimeout(function(){hljs.initHighlighting()},1000)//when in doubt setTimeout!! hljs.initHighlighting messes up {{angular-tmpl-var}} so we set timeout to make sure it happens after and in window scope
52 | // }
53 |
54 | $rootScope.getTmplUrlforVal= function(loggedin, loggedout, bool){
55 | return bool ? loggedin : loggedout;
56 | }
57 |
58 | $rootScope.timeoutSet= function(variable, value, duration){
59 | var that=this;
60 | $timeout(function(){
61 | that[variable]=value;
62 | }, duration);
63 | //return $rootScope.auth.user ? loggedin : loggedout;
64 | }
65 |
66 | $rootScope.setVarInScope=function(key, val){
67 | var scope=this;
68 | var scopefind=scope;
69 | for (var i = arguments.length - 1; i >= 2; i--) {
70 | if (scopefind[arguments[i]])
71 | scopefind=scopefind[arguments[i]];
72 | };
73 | scopefind[key]=val;
74 | }
75 |
76 |
77 |
78 | $rootScope.scrollTop=function(x, y){
79 | x=x?x:0,
80 | y=y?y:0,
81 | window.scrollTo(x,y)
82 | }
83 |
84 |
85 | $rootScope.JSON2CSV=JSON2CSV;
86 |
87 | }]);
88 |
89 |
90 | function JSON2CSV(objArray, label, quotes) {
91 | var objArray=_.map(objArray, function(val){
92 | return _.omit(val, '$$hashKey');
93 | }),
94 | array = typeof objArray != 'object' ? JSON.parse(objArray) : objArray,
95 | str = '',
96 | line = '';
97 |
98 |
99 |
100 |
101 | // quotes = quotes==="true"?true:false,
102 | // label = label==="true"?true:false;
103 | if (label) {
104 | var head = array[0];
105 | if (quotes) {
106 | for (var index in array[0]) {
107 | var value = index.value + "";
108 | line += '"' + value.replace(/"/g, '""') + '",';
109 | }
110 | } else {
111 | for (var index in array[0]) {
112 | line += index + ',';
113 | }
114 | }
115 |
116 | line = line.slice(0, -1);
117 | str += line + '\r\n';
118 | }
119 |
120 | for (var i = 0; i < array.length; i++) {
121 | var line = '', val;
122 |
123 | for (var index in array[i]) {
124 | if (array[i][index].type==="checkbox")
125 | val = array[i][index].checked;
126 | else
127 | val = array[i][index].value;
128 |
129 | if (quotes) {
130 | var value = val + "";
131 | line += '"' + value.replace(/"/g, '""') + '",';
132 | } else {
133 | line += val + ',';
134 | }
135 | }
136 |
137 | line = line.slice(0, -1);
138 | str += line + '\r\n';
139 | }
140 | window.open("data:text/csv;charset=utf-8," + escape(str))
141 | }
142 |
--------------------------------------------------------------------------------
/js/config.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // Declare app level module which depends on filters, and services
4 | angular.module('myApp.config', [])
5 |
6 | // version of this seed app is compatible with angularFire 0.6
7 | // see tags for other versions: https://github.com/firebase/angularFire-seed/tags
8 | .constant('version', '0.6')
9 |
10 | // where to redirect users if they need to authenticate (see module.routeSecurity)
11 | .constant('loginRedirectPath', '/login')
12 |
13 | .constant('signupRedirectPath', '/signup')
14 |
15 |
16 | // your Firebase URL goes here
17 | .constant('FBURL', 'https://fireform.firebaseio.com')
18 |
19 | //you can use this one to try out a demo of the seed
20 | // .constant('FBURL', 'https://angularfire-seed.firebaseio.com');
21 |
22 |
23 | /*********************
24 | * !!FOR E2E TESTING!!
25 | *
26 | * Must enable email/password logins and manually create
27 | * the test user before the e2e tests will pass
28 | *
29 | * user: test@test.com
30 | * pass: test123
31 | */
--------------------------------------------------------------------------------
/js/controllers-ck.js:
--------------------------------------------------------------------------------
1 | "use strict";angular.module("myApp.controllers",[]).controller("PublicHomeCtrl",["$rootScope","$scope","syncData",function(e,t,n){n("syncedValue").$bind(t,"syncedValue")}]).controller("docController",["$rootScope","$scope","syncData",function(e,t,n){n("syncedValue").$bind(t,"syncedValue")}]).controller("AppHomeCtrl",["$scope","loginService","syncData",function(e,t,n){e.Lists=n("users/"+e.auth.user.uid+"/lists",10);n("syncedValue").$bind(e,"syncedValue")}]).controller("LoginCtrl",["$scope","loginService","$location",function(e,t,n){e.email=null;e.pass=null;e.confirm=null;e.createMode=!1;e.login=function(n){e.err=null;e.email?e.pass?t.login(e.email,e.pass,function(t,r){e.err=t?t+"":null;t||n&&n(r)}):e.err="Please enter a password":e.err="Please enter an email address"}}]).controller("SignupCtrl",["$scope","loginService","$location","syncData",function(e,t,n,r){function i(){e.email?e.pass?e.formName?e.formName.search(" ")!==-1&&(e.err="Form names can not contain spaces."):e.err="Please enter a name for your first form":e.err="Please enter a password":e.err="Please enter an email address";return!e.err}e.email=null;e.pass=null;e.confirm=null;e.createMode=!1;e.createAccount=function(){e.err=null;i()&&t.createAccount(e.email,e.pass,function(i,s){i?e.err=i?i+"":null:e.login(function(){t.createProfile(s.uid,s.email);var i=r("users/"+s.uid+"/lists/"+e.formName);i.$set({id:e.formName,_created:String(new Date),welcomMessage:!0});n.path("/list/"+s.id+"/"+e.formName)})})};e.login=function(n){e.err=null;e.email?e.pass?t.login(e.email,e.pass,function(t,r){e.err=t?t+"":null;t||n&&n(r)}):e.err="Please enter a password":e.err="Please enter an email address"}}]).controller("AccountCtrl",["$scope","loginService","syncData","$location",function(e,t,n,r){function i(){return{email:e.auth.user.email,oldpass:e.oldpass,newpass:e.newpass,confirm:e.confirm,callback:function(t){if(t)e.err=t;else{e.oldpass=null;e.newpass=null;e.confirm=null;e.msg="Password updated!"}}}}n(["users",e.auth.user.uid]).$bind(e,"user");e.newList=null;e.Lists=n("users/"+e.auth.user.uid+"/lists",10);e.oldpass=null;e.newpass=null;e.confirm=null;e.reset=function(){e.err=null;e.msg=null};e.updatePassword=function(){e.reset();t.changePassword(i())}}]).controller("AddCtrl",["$scope","loginService","syncData","$location",function(e,t,n,r){n(["users",e.auth.user.uid]).$bind(e,"user");e.newList=null;e.addList=function(){if(e.newList){e.err=null;var t=n("users/"+e.auth.user.uid+"/lists/"+e.newList),i=e.auth.user.uid.replace("simplelogin:","");if(t.$getIndex().length){e.err="A form repositry with this name already exists!";return!1}if(e.newList.search(" ")!==-1){e.err="Form names can not contain spaces.";return!1}t.$set({id:e.newList,_created:String(new Date)});r.path("/list/"+i+"/"+e.newList);e.newList=null}}}]).controller("ListCtrl",["$scope","loginService","syncData","$location",function(e,t,n,r){n(["users",e.auth.user.uid]).$bind(e,"user");e.$location=r;e.Lists=n("users/"+e.auth.user.uid+"/lists",10)}]).controller("listViewCtrl",["$rootScope","$scope","loginService","syncData","$location","$timeout",function(e,t,n,r,i,s){r(["users",t.auth.user.uid]).$bind(t,"user");var o=t.auth.user.uid.replace("simplelogin:",""),u=i.$$path.replace("/list/"+o+"/","");t.ListView=r("users/"+t.auth.user.uid+"/lists/"+u);t.emailConfirmation=r("users/"+t.auth.user.uid+"/lists/"+u+"/emailConfirmation");t.emailNotification=r("users/"+t.auth.user.uid+"/lists/"+u+"/emailNotification");t.welcomMessage=r("users/"+t.auth.user.uid+"/lists/"+u+"/welcomMessage");t.setEmailNotification=function(){var e=t.emailNotification.$value?!1:!0;t.emailNotification.$set(e)};t.setEmailConfirmation=function(){var e=t.emailConfirmation.$value?!1:!0;t.emailConfirmation.$set(e)};t.removeWelcome=function(){t.welcomMessage.$set(!1)};t.$location=i;t.pageLoaded=!1;t.pageLoadedFade=!1;t.ListView.$on("loaded",function(e){t.pageLoadedFade=!0;s(function(){t.pageLoaded=!0},300)});t.addWelcomeRemoveMe=function(){t.welcomMessage.$set(!0);t.welcomAlert=""};t.deleteList=function(){t.ListView.$remove();i.path("/list")}}]).controller("listViewExampleCtrl",["$rootScope","$scope","loginService","syncData","$location","$timeout",function(e,t,n,r,i,s){t.ListView=r("example");t.$location=i;t.pageLoaded=!1;t.pageLoadedFade=!1;t.ListView.$on("loaded",function(e){t.pageLoadedFade=!0;s(function(){t.pageLoaded=!0},300)})}]);
--------------------------------------------------------------------------------
/js/controllers.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* Controllers */
4 |
5 | angular.module('myApp.controllers', [])
6 |
7 | .controller('PublicHomeCtrl', ['$rootScope', '$scope', 'syncData',
8 | function($rootScope, $scope, syncData) {
9 | syncData('syncedValue').$bind($scope, 'syncedValue');
10 | }
11 | ])
12 |
13 | .controller('docController', ['$rootScope', '$scope', 'syncData',
14 | function($rootScope, $scope, syncData) {
15 | syncData('syncedValue').$bind($scope, 'syncedValue');
16 | }
17 | ])
18 |
19 |
20 | .controller('AppHomeCtrl', ['$scope', 'loginService', 'syncData',
21 | function($scope, loginService, syncData) {
22 | //alert($scope.username);
23 | // constrain number of messages by limit into syncData
24 | // add the array into $scope.messages
25 | $scope.Lists = syncData('users/' + $scope.auth.user.uid + '/lists', 10);
26 | syncData('syncedValue').$bind($scope, 'syncedValue');
27 | }
28 | ])
29 |
30 | .controller('LoginCtrl', ['$scope', 'loginService', '$location',
31 | function($scope, loginService, $location) {
32 | $scope.email = null;
33 | $scope.pass = null;
34 | $scope.confirm = null;
35 | $scope.createMode = false;
36 |
37 | $scope.login = function(cb) {
38 | $scope.err = null;
39 | if (!$scope.email) {
40 | $scope.err = 'Please enter an email address';
41 | } else if (!$scope.pass) {
42 | $scope.err = 'Please enter a password';
43 | } else {
44 | loginService.login($scope.email, $scope.pass, function(err, user) {
45 | $scope.err = err ? err + '' : null;
46 | if (!err) {
47 | cb && cb(user);
48 | }
49 | });
50 | }
51 | }
52 | }
53 | ])
54 |
55 | .controller('SignupCtrl', ['$scope', 'loginService', '$location', 'syncData',
56 | function($scope, loginService, $location, syncData) {
57 | $scope.email = null;
58 | $scope.pass = null;
59 | $scope.confirm = null;
60 | $scope.createMode = false;
61 |
62 | $scope.createAccount = function() {
63 | $scope.err = null;
64 | if (assertValidLoginAttempt()) {
65 | loginService.createAccount($scope.email, $scope.pass, function(err, user) {
66 | if (err) {
67 | $scope.err = err ? err + '' : null;
68 | } else {
69 | // must be logged in before I can write to my profile
70 | $scope.login(function() {
71 | loginService.createProfile(user.uid, user.email);
72 |
73 | var newList = syncData('users/' + user.uid + '/lists/' + $scope.formName);
74 |
75 | //Create the form by setting the object in firebase
76 | newList.$set({
77 | id: $scope.formName,
78 | _created: String(new Date()),
79 | welcomMessage: true
80 | });
81 | $location.path('/list/'+user.id+"/"+$scope.formName);
82 | });
83 | }
84 | });
85 | }
86 | };
87 |
88 | $scope.login = function(cb) {
89 | $scope.err = null;
90 | if (!$scope.email) {
91 | $scope.err = 'Please enter an email address';
92 | } else if (!$scope.pass) {
93 | $scope.err = 'Please enter a password';
94 | } else {
95 | loginService.login($scope.email, $scope.pass, function(err, user) {
96 | $scope.err = err ? err + '' : null;
97 | if (!err) {
98 | cb && cb(user);
99 | }
100 | });
101 | }
102 | }
103 |
104 | function assertValidLoginAttempt() {
105 | if (!$scope.email) {
106 | $scope.err = 'Please enter an email address';
107 | } else if (!$scope.pass) {
108 | $scope.err = 'Please enter a password';
109 | } else if (!$scope.formName) {
110 | $scope.err = 'Please enter a name for your first form';
111 | }else if ($scope.formName.search(" ")!==-1) {
112 | $scope.err = 'Form names can not contain spaces.';
113 | }
114 | return !$scope.err;
115 | }
116 | }
117 | ])
118 |
119 | .controller('AccountCtrl', ['$scope', 'loginService', 'syncData', '$location',
120 | function($scope, loginService, syncData, $location) {
121 | syncData(['users', $scope.auth.user.uid]).$bind($scope, 'user');
122 |
123 | $scope.newList = null;
124 |
125 | // constrain number of messages by limit into syncData
126 | // add the array into $scope.messages
127 | $scope.Lists = syncData('users/' + $scope.auth.user.uid + '/lists', 10);
128 |
129 | // // add new messages to the list
130 | // $scope.addList = function() {
131 | // if ($scope.newList) {
132 | // $scope.Lists.$add({
133 | // text: $scope.newList
134 | // });
135 | // $scope.newList = null;
136 | // }
137 | // };
138 |
139 | $scope.oldpass = null;
140 | $scope.newpass = null;
141 | $scope.confirm = null;
142 |
143 | $scope.reset = function() {
144 | $scope.err = null;
145 | $scope.msg = null;
146 | };
147 |
148 | $scope.updatePassword = function() {
149 | $scope.reset();
150 | loginService.changePassword(buildPwdParms());
151 | };
152 |
153 | function buildPwdParms() {
154 | return {
155 | email: $scope.auth.user.email,
156 | oldpass: $scope.oldpass,
157 | newpass: $scope.newpass,
158 | confirm: $scope.confirm,
159 | callback: function(err) {
160 | if (err) {
161 | $scope.err = err;
162 | } else {
163 | $scope.oldpass = null;
164 | $scope.newpass = null;
165 | $scope.confirm = null;
166 | $scope.msg = 'Password updated!';
167 | }
168 | }
169 | }
170 | }
171 |
172 | }
173 | ])
174 |
175 | .controller('AddCtrl', ['$scope', 'loginService', 'syncData', '$location',
176 | function($scope, loginService, syncData, $location) {
177 | syncData(['users', $scope.auth.user.uid]).$bind($scope, 'user');
178 |
179 | $scope.newList = null;
180 |
181 |
182 | $scope.addList = function() {
183 | if ($scope.newList) {
184 | $scope.err = null;
185 | var newList = syncData('users/' + $scope.auth.user.uid + '/lists/' + $scope.newList);
186 | var uid= $scope.auth.user.uid.replace("simplelogin:","");
187 | //set new list. It will autosync with FB
188 | if (newList.$getIndex().length) {
189 | $scope.err = 'A form repositry with this name already exists!';
190 | return false;
191 | }
192 | //Check for spaces
193 | if ($scope.newList.search(" ")!==-1) {
194 | $scope.err = 'Form names can not contain spaces.';
195 | return false;
196 | }
197 | //Create the form by setting the object in firebase
198 | newList.$set({
199 | id: $scope.newList,
200 | _created: String(new Date()),
201 | // welcomMessage: true;
202 |
203 | });
204 | //redirect to the new form
205 | $location.path( "/list/"+uid+"/"+$scope.newList );
206 | $scope.newList = null;
207 | }
208 | };
209 |
210 |
211 | }
212 | ])
213 |
214 |
215 | .controller('ListCtrl', ['$scope', 'loginService', 'syncData', '$location',
216 | function($scope, loginService, syncData, $location) {
217 | syncData(['users', $scope.auth.user.uid]).$bind($scope, 'user');
218 | $scope.$location = $location;
219 | $scope.Lists = syncData('users/' + $scope.auth.user.uid + '/lists', 10);
220 | }
221 | ])
222 |
223 | .controller('listViewCtrl', ['$rootScope','$scope', 'loginService', 'syncData', '$location', '$timeout',
224 | function($rootScope, $scope, loginService, syncData, $location, $timeout) {
225 | syncData(['users', $scope.auth.user.uid]).$bind($scope, 'user');
226 | var uid= $scope.auth.user.uid.replace("simplelogin:","")
227 | ,loc = $location.$$path.replace('/list/'+uid+'/', '')
228 | $scope.ListView = syncData('users/' + $scope.auth.user.uid + '/lists/' + loc);
229 |
230 |
231 | //$scope.emailAuth = syncData('users/' + $scope.auth.user.uid
232 |
233 | $scope.emailConfirmation = syncData('users/' + $scope.auth.user.uid + '/lists/' + loc+'/emailConfirmation');
234 | $scope.emailNotification = syncData('users/' + $scope.auth.user.uid + '/lists/' + loc+'/emailNotification');
235 | $scope.welcomMessage = syncData('users/' + $scope.auth.user.uid + '/lists/' + loc+'/welcomMessage');
236 |
237 |
238 | $scope.setEmailNotification = function() {
239 | var val = $scope.emailNotification.$value?false:true;
240 | $scope.emailNotification.$set(val);
241 |
242 | }
243 | $scope.setEmailConfirmation = function() {
244 | var val = $scope.emailConfirmation.$value?false:true;
245 | $scope.emailConfirmation.$set(val);
246 | }
247 |
248 | $scope.removeWelcome = function() {
249 | $scope.welcomMessage.$set(false);
250 | }
251 |
252 | $scope.$location = $location;
253 |
254 | //This tells us when the page loads*/
255 | $scope.pageLoaded = false;
256 | $scope.pageLoadedFade = false;
257 |
258 | $scope.ListView.$on('loaded',function(data){
259 | $scope.pageLoadedFade = true;
260 | $timeout(function(){
261 | $scope.pageLoaded = true;
262 | },300);
263 |
264 | });
265 |
266 | //remove me
267 | $scope.addWelcomeRemoveMe = function() {
268 | $scope.welcomMessage.$set(true);
269 |
270 |
271 | $scope.welcomAlert='';
272 | }
273 |
274 | //delete this form. by calling remove on the firebase object
275 | $scope.deleteList = function() {
276 | $scope.ListView.$remove();
277 | $location.path( "/list");
278 | }
279 | }
280 | ])
281 | .controller('listViewExampleCtrl', ['$rootScope','$scope', 'loginService', 'syncData', '$location', '$timeout',
282 | function($rootScope, $scope, loginService, syncData, $location, $timeout) {
283 | $scope.ListView = syncData('example');
284 | $scope.$location = $location;
285 |
286 |
287 |
288 | //This tells us when the page loads*/
289 | $scope.pageLoaded = false;
290 | $scope.pageLoadedFade = false;
291 | $scope.ListView.$on('loaded',function(data){
292 | $scope.pageLoadedFade = true;
293 | $timeout(function(){
294 | $scope.pageLoaded = true;
295 | },300);
296 | });
297 | }
298 | ]);
--------------------------------------------------------------------------------
/js/directives.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | /* Directives */
4 |
5 | angular.module("myApp.directives", [])
6 |
7 | // .directive("tmplAuthInclude", function(waitForAuth, $rootScope) {
8 | // return {
9 | // restrict: 'E',
10 | // templateUrl: function(el, attr){
11 | // waitForAuth.then(function() {
12 | // return $rootScope.auth.user? attr.loggedinSrc : attr.loggedoutSrc;
13 | // })
14 | // }
15 | // };
16 | // })
17 | .directive("bodyClassInject", function($rootScope) {
18 | return {
19 | restrict: 'A',
20 | link: function(scope, el, attr){
21 | $rootScope.bodyClass=attr.bodyClassInject
22 | }
23 | };
24 | })
25 | .directive("bodyClassClick", function($rootScope) {
26 | return {
27 | restrict: 'A',
28 | link: function(scope, el, attr){
29 | $rootScope.bodyClass=scope.bodyClass;
30 | }
31 | };
32 | })
33 | .directive("tabletop", function($rootScope) {
34 | return {
35 | restrict: 'A',
36 | link: function(scope, el, attr){
37 | //Row Header
38 |
39 | var rowsHeader = scope.$parent.rowsHeader,
40 | rows=scope.$parent.rows,
41 | valueF=scope.valueF;
42 | scope.$parent.predicate={col:"_time",value:'value', reverse: true} , //This sets the default sort to most recent
43 | valueF._time.value=new Date(scope.valueF._time.value); //Make our a date a time object
44 |
45 | var keys = _.union(//union (join with no duplicates) the new keys with the building list
46 | _.pluck(rowsHeader,'fireformName'),
47 | _.keys(valueF)
48 | );
49 |
50 | scope.$parent.rowsHeader= _.map(keys, function(key){
51 | var map
52 | if (valueF[key])
53 | map=valueF[key];
54 | else
55 | map= _.findWhere(rowsHeader, {fireformName:key});
56 |
57 | if (map===undefined) return {};///saftey for malformed data;
58 | map.fireformName=key
59 | return map;
60 | });
61 | //Rows
62 |
63 | scope.$parent.rows.push(valueF) //Make our a date a time object
64 | //Kill the element. Crude but effective.
65 | el.remove();
66 | }
67 | };
68 | })
69 |
70 | .directive("highlight", function($rootScope) {
71 | return {
72 | restrict: 'A',
73 | link: function(scope, el, attr){
74 | //debugger
75 | var m=el.html()
76 | .replace("{{location}}",scope.$location.absUrl())
77 | .replace("{{email}}",scope.auth.user.email)
78 | .replace("{{options}}",'e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var F=function(n){return function(t,r,e){var u={},i=null==r?j.identity:k(r);return A(t,function(r,a){var o=i.call(e,r,a,t);n(u,o,r)}),u}};j.groupBy=F(function(n,t,r){(j.has(n,t)?n[t]:n[t]=[]).push(r)}),j.indexBy=F(function(n,t,r){n[t]=r}),j.countBy=F(function(n,t){j.has(n,t)?n[t]++:n[t]=1}),j.sortedIndex=function(n,t,r,e){r=null==r?j.identity:k(r);for(var u=r.call(e,t),i=0,a=n.length;a>i;){var o=i+a>>>1;r.call(e,n[o])=0})})},j.difference=function(n){var t=c.apply(e,o.call(arguments,1));return j.filter(n,function(n){return!j.contains(t,n)})},j.zip=function(){for(var n=j.max(j.pluck(arguments,"length").concat(0)),t=new Array(n),r=0;n>r;r++)t[r]=j.pluck(arguments,""+r);return t},j.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},j.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=j.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}if(y&&n.indexOf===y)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},j.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},j.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=new Array(e);e>u;)i[u++]=n,n+=r;return i};var R=function(){};j.bind=function(n,t){var r,e;if(_&&n.bind===_)return _.apply(n,o.call(arguments,1));if(!j.isFunction(n))throw new TypeError;return r=o.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(o.call(arguments)));R.prototype=n.prototype;var u=new R;R.prototype=null;var i=n.apply(u,r.concat(o.call(arguments)));return Object(i)===i?i:u}},j.partial=function(n){var t=o.call(arguments,1);return function(){return n.apply(this,t.concat(o.call(arguments)))}},j.bindAll=function(n){var t=o.call(arguments,1);if(0===t.length)throw new Error("bindAll must be passed function names");return A(t,function(t){n[t]=j.bind(n[t],n)}),n},j.memoize=function(n,t){var r={};return t||(t=j.identity),function(){var e=t.apply(this,arguments);return j.has(r,e)?r[e]:r[e]=n.apply(this,arguments)}},j.delay=function(n,t){var r=o.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},j.defer=function(n){return j.delay.apply(j,[n,1].concat(o.call(arguments,1)))},j.throttle=function(n,t,r){var e,u,i,a=null,o=0;r||(r={});var c=function(){o=r.leading===!1?0:new Date,a=null,i=n.apply(e,u)};return function(){var l=new Date;o||r.leading!==!1||(o=l);var f=t-(l-o);return e=this,u=arguments,0>=f?(clearTimeout(a),a=null,o=l,i=n.apply(e,u)):a||r.trailing===!1||(a=setTimeout(c,f)),i}},j.debounce=function(n,t,r){var e,u,i,a,o;return function(){i=this,u=arguments,a=new Date;var c=function(){var l=new Date-a;t>l?e=setTimeout(c,t-l):(e=null,r||(o=n.apply(i,u)))},l=r&&!e;return e||(e=setTimeout(c,t)),l&&(o=n.apply(i,u)),o}},j.once=function(n){var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},j.wrap=function(n,t){return function(){var r=[n];return a.apply(r,arguments),t.apply(this,r)}},j.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},j.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},j.keys=w||function(n){if(n!==Object(n))throw new TypeError("Invalid object");var t=[];for(var r in n)j.has(n,r)&&t.push(r);return t},j.values=function(n){for(var t=j.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},j.pairs=function(n){for(var t=j.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},j.invert=function(n){for(var t={},r=j.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},j.functions=j.methods=function(n){var t=[];for(var r in n)j.isFunction(n[r])&&t.push(r);return t.sort()},j.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},j.pick=function(n){var t={},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},j.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var u in n)j.contains(r,u)||(t[u]=n[u]);return t},j.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]===void 0&&(n[r]=t[r])}),n},j.clone=function(n){return j.isObject(n)?j.isArray(n)?n.slice():j.extend({},n):n},j.tap=function(n,t){return t(n),n};var S=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;n instanceof j&&(n=n._wrapped),t instanceof j&&(t=t._wrapped);var u=l.call(n);if(u!=l.call(t))return!1;switch(u){case"[object String]":return n==String(t);case"[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]==n)return e[i]==t;var a=n.constructor,o=t.constructor;if(a!==o&&!(j.isFunction(a)&&a instanceof a&&j.isFunction(o)&&o instanceof o))return!1;r.push(n),e.push(t);var c=0,f=!0;if("[object Array]"==u){if(c=n.length,f=c==t.length)for(;c--&&(f=S(n[c],t[c],r,e)););}else{for(var s in n)if(j.has(n,s)&&(c++,!(f=j.has(t,s)&&S(n[s],t[s],r,e))))break;if(f){for(s in t)if(j.has(t,s)&&!c--)break;f=!c}}return r.pop(),e.pop(),f};j.isEqual=function(n,t){return S(n,t,[],[])},j.isEmpty=function(n){if(null==n)return!0;if(j.isArray(n)||j.isString(n))return 0===n.length;for(var t in n)if(j.has(n,t))return!1;return!0},j.isElement=function(n){return!(!n||1!==n.nodeType)},j.isArray=x||function(n){return"[object Array]"==l.call(n)},j.isObject=function(n){return n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],function(n){j["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),j.isArguments(arguments)||(j.isArguments=function(n){return!(!n||!j.has(n,"callee"))}),"function"!=typeof/./&&(j.isFunction=function(n){return"function"==typeof n}),j.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},j.isNaN=function(n){return j.isNumber(n)&&n!=+n},j.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==l.call(n)},j.isNull=function(n){return null===n},j.isUndefined=function(n){return n===void 0},j.has=function(n,t){return f.call(n,t)},j.noConflict=function(){return n._=t,this},j.identity=function(n){return n},j.times=function(n,t,r){for(var e=Array(Math.max(0,n)),u=0;n>u;u++)e[u]=t.call(r,u);return e},j.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};var I={escape:{"&":"&","<":"<",">":">",'"':""","'":"'"}};I.unescape=j.invert(I.escape);var T={escape:new RegExp("["+j.keys(I.escape).join("")+"]","g"),unescape:new RegExp("("+j.keys(I.unescape).join("|")+")","g")};j.each(["escape","unescape"],function(n){j[n]=function(t){return null==t?"":(""+t).replace(T[n],function(t){return I[n][t]})}}),j.result=function(n,t){if(null==n)return void 0;var r=n[t];return j.isFunction(r)?r.call(n):r},j.mixin=function(n){A(j.functions(n),function(t){var r=j[t]=n[t];j.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),z.call(this,r.apply(j,n))}})};var N=0;j.uniqueId=function(n){var t=++N+"";return n?n+t:t},j.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\t|\u2028|\u2029/g;j.template=function(n,t,r){var e;r=j.defaults({},r,j.templateSettings);var u=new RegExp([(r.escape||q).source,(r.interpolate||q).source,(r.evaluate||q).source].join("|")+"|$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return a+=n.slice(i,o).replace(D,function(n){return"\\"+B[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),u&&(a+="';\n"+u+"\n__p+='"),i=o+t.length,t}),a+="';\n",r.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=new Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o}if(t)return e(t,j);var c=function(n){return e.call(this,n,j)};return c.source="function("+(r.variable||"obj")+"){\n"+a+"}",c},j.chain=function(n){return j(n).chain()};var z=function(n){return this._chain?j(n).chain():n};j.mixin(j),A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];j.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],z.call(this,r)}}),A(["concat","join","slice"],function(n){var t=e[n];j.prototype[n]=function(){return z.call(this,t.apply(this._wrapped,arguments))}}),j.extend(j.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this);
6 | //# sourceMappingURL=underscore-min.map
--------------------------------------------------------------------------------
/list/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Fireform
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
62 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Fireform",
3 | "author": "Jeff Jenkins & Christine Ricks",
4 | "version": "0.0.1",
5 | "private": true,
6 | "scripts": {
7 | "start": "node app.js"
8 | },
9 | "dependencies": {
10 | "express": "3.4.8",
11 | "jade": "*",
12 | "stylus": "*",
13 | "nib": "*"
14 | }
15 | }
--------------------------------------------------------------------------------
/package.jsoncop.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Fireform",
3 | "author": "Jeff Jenkins & Christine Ricks",
4 | "version": "0.0.1",
5 | "private": true,
6 | "scripts": {
7 | "start": "sudo nodemon index.js"
8 | },
9 | "dependencies": {
10 | "express": "3.4.8",
11 | "connect": "*",
12 | "jade": "*",
13 | "stylus": "*",
14 | "nib": "*",
15 | "watchr": "*"
16 | }
17 | }
--------------------------------------------------------------------------------
/partials/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SFDevLabs/fireform/9b00ce76cbc0f7a5ceb56629bfb85b0eb10b7862/partials/.gitkeep
--------------------------------------------------------------------------------
/partials/account.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
Account
5 |
26 |
27 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/partials/add.html:
--------------------------------------------------------------------------------
1 |
2 |
19 |
--------------------------------------------------------------------------------
/partials/app-header.html:
--------------------------------------------------------------------------------
1 |
2 |
29 |
30 |
--------------------------------------------------------------------------------
/partials/docs.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
Docs
5 |
12 |
13 |
14 | Getting Started
15 | The easiest way to get started is to drop the following code into your webpage.
16 |
17 |
18 | <script type="application/javascript" src="https://src.fireform.org/fireform.js"></script>
19 | <script type="application/javascript">
20 | new Fireform('#MySelector', 'http://fireform/formRepositoryLink');
21 | </script>
22 |
23 |
24 |
25 | Change the DOM selector to point to your <form> tag and the formRepositoryLink to a fireform link.
26 | Fireform will listen for a click event on the form's type="submit" input. Once submitted; the form's content will be uploaded, the submit button will be disabled and the success class will be added to the form.
27 |
28 | You can submit the form with javascript too:
29 |
36 |
37 | <script type="application/javascript">
38 | var fireform = new Fireform('#MySelector', 'http://fireform/formRepositoryLink');
39 | fireform.submit();
40 | </script>
41 |
42 |
43 |
44 | Full Working Example
45 |
46 | <!doctype html>
47 | <body>
48 | <form id="MySelector">
49 | <input type="text" name="givenname" placeholder="Name">
50 | <input type="text" name="message" placeholder="Message">
51 | <input type="submit">
52 | </form>
53 |
54 | <script type="application/javascript" src="https://src.fireform.org/fireform.js"></script>
55 | <script type="application/javascript">
56 |
57 | var options = {
58 | simpleValidation:false,
59 | formValidationClass:"custom-submit-success",
60 | callback:function(err, val) { console.log(err,"callback") }
61 | }
62 | new Fireform('#MySelector', 'http://fireform.org/publicexample', options)
63 | </script>
64 | </body>
65 |
66 |
67 |
68 |
69 | Options
70 | You can pass an options object into the Fireform function.
71 |
72 |
73 | <script type="application/javascript">
74 | options={
75 |
76 | successClass:'success-class',
77 | failedClass:'failed-class',
78 | formValidationClass:'validation-class',
79 | inputValidationClass:'validation-class',
80 | simpleValidation:true
81 |
82 | emailNotification: 'myemail@example.com'
83 |
84 | emailConfirmationName:'emailInputName'
85 | emailConfirmationSubject:'Subject Text'
86 | emailConfirmationBodyHTML:'Body HTML'
87 | emailConfirmationBodyText:'Body Text'
88 | callback: function(err, val){ }
89 | }
90 |
91 | new Fireform('#MySelector', 'http://fireform/formRepositoryLink', options);
92 | </script>
93 |
94 |
95 | *Email Notifications and Confirmations must be activated on the form's table page.
96 |
97 |
98 |
99 |
119 |
120 |
121 |
122 | Examples
123 | Example Form Page
124 |
125 | Example Results Table
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
141 |
--------------------------------------------------------------------------------
/partials/footer.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | SF Dev Labs
4 | Released by SF Dev Labs under the MIT license
5 |
6 |
7 |
8 |
13 |
14 |
15 |
16 |
17 |
18 |
Contact/Feedback
19 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/partials/list-view.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{ListView.id}}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
‹ Back to all forms
20 |
21 |
22 |
Form Options
23 |
Download CSV
24 |
Get Code
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | Email Options
33 |
34 |
46 |
47 |
48 |
49 |
51 |
52 |
54 |
55 |
57 |
58 |
60 |
61 |
62 |
64 |
65 |
67 |
68 |
70 |
71 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
No data submitted yet.
82 |
83 |
84 |
85 |
86 |
87 |
178 |
179 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
195 |
196 |
198 |
199 |
201 |
202 |
204 |
205 |
206 |
208 |
209 |
211 |
212 |
214 |
215 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
Edit {{ListView.id}}
229 |
230 |
231 | Please update update your site's Fireform code!
232 | Email Options
233 |
234 |
246 |
247 |
248 |
249 | CSV Export Options
250 |
260 |
261 |
262 |
Delete Form
263 |
264 |
265 | Are you sure you want to delete "{{ListView.id}}"?
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
--------------------------------------------------------------------------------
/partials/lists.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
23 |
--------------------------------------------------------------------------------
/partials/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/partials/public-header.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/partials/public-home.html:
--------------------------------------------------------------------------------
1 |
Login
2 |
3 |
4 |
5 |
6 |
Fireform
7 |
8 | Hook your website <form> into a hosted private backend.
9 |
10 | -
11 |
12 | Generate code for your form
13 |
14 | -
15 |
16 | Paste the code into your HTML
17 |
18 | -
19 |
20 | Collect and see your data
21 |
22 |
23 | Create a Form
24 |
25 |
26 |
27 |
28 | See an example.
29 |
43 |
44 |
45 |
46 |
47 | Powered by
48 |
49 | -
50 |
51 |
52 | -
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/partials/signup.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/partials/snippet/boiler-confirmation.html:
--------------------------------------------------------------------------------
1 | Boilerplate Form
2 |
25 |
26 |
27 | <!doctype html>
28 | <body>
29 | <form id="MySelector">
30 | <input type="text" name="givenname" placeholder="Name">
31 | <input type="email" name="inputexample" placeholder="Email">
32 | <input type="submit">
33 | </form>
34 |
35 | <script src="http://src.fireform.org/fireform.min.js"></script>
36 | <script >
37 |
38 | options={
39 | emailConfirmationName:"inputexample",
40 | emailConfirmationFrom:"{{auth.user.email}}",
41 | emailConfirmationSubject:"Thanks for Signing Up",
42 | emailConfirmationBodyHTML:"<p>You have been signed up!</p>",
43 | emailConfirmationBodyText:"You have been signed up!"
44 | }
45 | new Fireform('#MySelector', '{{$location.absUrl()}}', options)
46 | </script>
47 | </body>
48 |
--------------------------------------------------------------------------------
/partials/snippet/boiler-notification-confirmation.html:
--------------------------------------------------------------------------------
1 | Boilerplate Form
2 |
26 |
27 | <!doctype html>
28 | <body>
29 | <form id="MySelector">
30 | <input type="text" name="givenname" placeholder="Name">
31 | <input type="email" name="inputexample" placeholder="Email">
32 | <input type="submit">
33 | </form>
34 |
35 | <script type="application/javascript" src="http://src.fireform.org/fireform.min.js"></script>
36 | <script type="application/javascript">
37 |
38 | options={
39 | emailNotification:"{{auth.user.email}}",
40 | emailConfirmationName:"inputexample",
41 | emailConfirmationFrom:"{{auth.user.email}}",
42 | emailConfirmationSubject:"Thanks for Signing Up",
43 | emailConfirmationBodyHTML:"<p>You have been signed up!</p>",
44 | emailConfirmationBodyText:"You have been signed up!"
45 | }
46 | new Fireform('#MySelector', '{{$location.absUrl()}}', options)
47 | </script>
48 | </body>
49 |
--------------------------------------------------------------------------------
/partials/snippet/boiler-notification.html:
--------------------------------------------------------------------------------
1 | Boilerplate Form
2 |
21 |
22 |
23 | <!doctype html>
24 | <body>
25 | <form id="MySelector">
26 | <input type="text" name="givenname" placeholder="Name">
27 | <input type="text" name="message" placeholder="Message">
28 | <input type="submit">
29 | </form>
30 |
31 | <script src="http://src.fireform.org/fireform.min.js"></script>
32 | <script>
33 |
34 | options={
35 | emailNotification:"{{auth.user.email}}",
36 | }
37 | new Fireform('#MySelector', '{{$location.absUrl()}}', options)
38 | </script>
39 | </body>
40 |
--------------------------------------------------------------------------------
/partials/snippet/boiler.html:
--------------------------------------------------------------------------------
1 | Boilerplate Form
2 |
3 |
24 |
25 |
26 |
27 | <!doctype html>
28 | <body>
29 | <form id="MySelector">
30 | <input type="text" name="givenname" placeholder="Name">
31 | <input type="text" name="message" placeholder="Message">
32 | <input type="submit">
33 | </form>
34 |
35 | <script src="http://src.fireform.org/fireform.min.js"></script>
36 | <script >
37 |
38 | var options = {
39 | simpleValidation:false,
40 | formValidationClass:"custom-submit-success",
41 | callback:function(err, val){ console.log(err,"callback") }
42 | }
43 | new Fireform('#MySelector', '{{$location.absUrl()}}', options)
44 | </script>
45 | </body>
46 |
--------------------------------------------------------------------------------
/partials/snippet/default-confirmation.html:
--------------------------------------------------------------------------------
1 | JavaScript Snippet
2 |
3 | Copy this snippet and paste it into your HTML underneath your <form>.
4 |
5 | <script src="http://src.fireform.org/fireform.min.js"></script>
6 | <script>
7 | options={
8 | emailConfirmationName:"InputName",
9 | emailConfirmationFrom:"{{auth.user.email}}",
10 | emailConfirmationSubject:"Thanks for Signing Up",
11 | emailConfirmationBodyHTML:"<p>You have been signed up!</p>",
12 | emailConfirmationBodyText:"You have been signed up!"
13 | }
14 | new Fireform('#MySelector', '{{$location.absUrl()}}', options);
15 | </script>
16 |
17 |
--------------------------------------------------------------------------------
/partials/snippet/default-notification-confirmation.html:
--------------------------------------------------------------------------------
1 | JavaScript Snippet
2 |
3 | Copy this snippet and paste it into your HTML underneath your <form>.
4 |
20 |
21 | <script src="http://src.fireform.org/fireform.min.js"></script>
22 | <script>
23 | options={
24 | emailNotification:"{{auth.user.email}}",
25 | emailConfirmationName:"InputName",
26 | emailConfirmationFrom:"{{auth.user.email}}",
27 | emailConfirmationSubject:"Thanks for signing up",
28 | emailConfirmationBodyHTML:"<p>You have been signed up!</p>",
29 | emailConfirmationBodyText:"You have been signed up!"
30 | }
31 | new Fireform('#MySelector', '{{$location.absUrl()}}', options);
32 | </script>
33 |
--------------------------------------------------------------------------------
/partials/snippet/default-notification.html:
--------------------------------------------------------------------------------
1 | JavaScript Snippet
2 |
3 | Copy this snippet and paste it into your HTML underneath your <form>.
4 |
13 |
14 |
15 |
16 |
17 | <script src="http://src.fireform.org/fireform.min.js"></script>
18 | <script >
19 | options={
20 | emailNotification:"{{auth.user.email}}",
21 | }
22 | new Fireform('#MySelector', '{{$location.absUrl()}}', options);
23 | </script>
24 |
--------------------------------------------------------------------------------
/partials/snippet/default.html:
--------------------------------------------------------------------------------
1 | JavaScript Snippet
2 |
3 |
12 |
13 |
14 |
15 | <script src="http://src.fireform.org/fireform.min.js"></script>
16 | <script>
17 | new Fireform('#MySelector', '{{$location.absUrl()}}');
18 | </script>
19 |
--------------------------------------------------------------------------------
/partials/snippetBoil.html:
--------------------------------------------------------------------------------
1 | Boilerplate Form
2 |
3 | <!doctype html>
4 | <body>
5 | <form id="MySelector">
6 | <input type="text" name="givenname" placeholder="Name">
7 | <input type="text" name="message" placeholder="Message">
8 | <input type="submit">
9 | </form>
10 |
11 | <script type="application/javascript" src="http://fireform.org/fireform.js"></script>
12 | <script type="application/javascript">
13 | /* See more options at http://fireform.org/docs */
14 | {{email}}
15 | var options = {
16 | simpleValidation:false,
17 | successClass: "custom-submit-success",
18 | callback:function(err, val){console.log(err,'callback'){}
19 | }
20 | new Fireform('#MySelector', '{{location}}', options)
21 | </script>
22 | </body>
23 |
--------------------------------------------------------------------------------