var wmform_204578 = (function() { var scope = {validateAndReturnMessage: null, currentStep: null,je_vraag: null,verstuurd: null}; with(scope) { je_vraag = (function() { var scope = {wmfragment_9: null,personeelsnummer: null,naam: null,emailadres: null,ondersteuning: null,wmfragment_4: null,wmfragment_5: null,omschrijving: null,versturen: null, checkConditions: null, visible: true, validate: null,required_validator: null}; with(scope) { wmfragment_9 = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); personeelsnummer = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; required_validator( {"fragment":"personeelsnummer"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); naam = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; required_validator( {"fragment":"naam"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); emailadres = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; required_validator( {"fragment":"emailadres"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); ondersteuning = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; required_validator( {"fragment":"ondersteuning"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); wmfragment_4 = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { var oldVisible = visible; this.visible = ((je_vraag.ondersteuning.condition && (!(je_vraag.ondersteuning.value instanceof Array) && je_vraag.ondersteuning.value == 'Ik wil een afspraak maken voor praktijktoetsing' || (je_vraag.ondersteuning.value instanceof Array) && je_vraag.ondersteuning.value.indexOf('Ik wil een afspraak maken voor praktijktoetsing') != -1))); if (oldVisible != visible) { if (!visible) { this.originalvalue = value; value = null; } else { value = this.originalvalue; } } return (oldVisible != visible); }; } return scope; })(); wmfragment_5 = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { var oldVisible = visible; this.visible = ((je_vraag.ondersteuning.condition && (!(je_vraag.ondersteuning.value instanceof Array) && je_vraag.ondersteuning.value == 'Ik wil een herkansing aanvragen' || (je_vraag.ondersteuning.value instanceof Array) && je_vraag.ondersteuning.value.indexOf('Ik wil een herkansing aanvragen') != -1))); if (oldVisible != visible) { if (!visible) { this.originalvalue = value; value = null; } else { value = this.originalvalue; } } return (oldVisible != visible); }; } return scope; })(); omschrijving = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; required_validator( {"fragment":"omschrijving"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); versturen = (function() { var scope = {value: '', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = ''; validate = function() { this.errors = {}; return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); required_validator = function(parameters, languageLabels) { return ag_204578.required_validator(this, parameters, languageLabels); } } return scope; })(); currentStep = function() { return je_vraag; }; validateAndReturnMessage = function(inputName,value) { var fragmentObj = getObject(currentStep(),inputName); if (fragmentObj != null) { fragmentObj.value = value; return fragmentObj.validate(); } }; getObject = function(obj, expression) { if (typeof obj != 'undefined' && obj != null) { var index = expression.indexOf('.'); if (index == -1) { return obj[expression]; } else { return getObject(obj[expression.substring(0,index)],expression.substring(index+1, expression.length)); } } else { return null; } } } return scope; })(); if (typeof WebmanagerFormStateRegistry != 'undefined') { if (typeof WebmanagerFormStateRegistry['wmform_204578'] == 'undefined' || !WebmanagerFormStateRegistry['wmform_204578']) { WebmanagerFormStateRegistry['wmform_204578'] = wmform_204578; }; }; ag_204578 = new Object(); ag_204578.required_validator = function(scope,parameters, languageLabels) { if (scope[parameters.fragment].value == undefined || scope[parameters.fragment].value === "") { scope[parameters.fragment].errors["MISSING"] = languageLabels["MISSING"]; } }