LT-253: Added Collection to store Additional Findings in the database. Set up some form components that store temporary UI state
This commit is contained in:
1 parent
022c534895
commit
40062e2e9d
35 files changed
+599
-216
No files matched your search
@@ -0,0 +1,28 @@
|
||||
import { Template } from 'meteor/templating';
|
||||
|
||||
/**
|
||||
* A global Blaze UI helper function to return whether or not a
|
||||
* field is required based on the Template's specified currentSchema
|
||||
*/
|
||||
Template.registerHelper('stateDataWithKey', function(context) {
|
||||
const instance = Template.instance();
|
||||
|
||||
if (!context) {
|
||||
return {
|
||||
state: instance.state,
|
||||
invalidKeys: instance.invalidKeys,
|
||||
validationContext: instance.validationContext,
|
||||
currentSchema: instance.currentSchema,
|
||||
isModified: instance.isModified
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
key: context,
|
||||
state: instance.state,
|
||||
invalidKeys: instance.invalidKeys,
|
||||
validationContext: instance.validationContext,
|
||||
currentSchema: instance.currentSchema,
|
||||
isModified: instance.isModified
|
||||
};
|
||||
});
|
||||
Reference in new issue
Block a user