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:
Erik Ziegler committed 2016-07-22 11:12:04 +02:00
1 parent 022c534895
commit 40062e2e9d
35 files changed
+599 -216

No files matched your search

@@ -0,0 +1,19 @@
import { Template } from 'meteor/templating';
/**
* A global Blaze UI helper function to return whether or not a key is part of the invalidKeys dictionary
*/
Template.registerHelper('isInvalidKey', function(context, format, options) {
if (!context) {
return;
}
const instance = Template.instance();
if (!instance.invalidKeys) {
return;
}
// Show error message if key is at first index
var firstInvalidKey = instance.invalidKeys.get(0);
return (firstInvalidKey && firstInvalidKey.name === context)
});