forked from Meteor-Community-Packages/meteor-autoform
-
Notifications
You must be signed in to change notification settings - Fork 1
/
autoform.js
25 lines (18 loc) · 794 Bytes
/
autoform.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* global AutoForm:true, FormPreserve */
AutoForm = AutoForm || {};
// formPreserve is used to keep current form data across hot code
// reloads for any forms that are currently rendered
AutoForm.formPreserve = new FormPreserve("autoforms");
AutoForm.reactiveFormData = new FormData();
AutoForm._inputTypeDefinitions = {}; //for storing input type definitions added by AutoForm.addInputType
AutoForm._formTypeDefinitions = {}; //for storing submit type definitions added by AutoForm.addFormType
arrayTracker = new ArrayTracker();
// Used by AutoForm._forceResetFormValues; temporary hack
AutoForm._destroyForm = {};
// reactive templates
globalDefaultTemplate = "bootstrap3";
defaultTypeTemplates = {};
deps = {
defaultTemplate: new Tracker.Dependency(),
defaultTypeTemplates: {}
};