var wmform_251380 = (function() { var scope = {validateAndReturnMessage: null, currentStep: null,urenregistratie: null,verstuurd: null}; with(scope) { urenregistratie = (function() { var scope = {voor_en_achternaam_leerling: null,emailadres: null,bsn_nummer: null,naam_werk_of_praktijkopleider: null,naam_opleiding_en_naam_onderwijsinstelling: null,startdatum_opleiding: null,einddatum_opleiding: null,afwezigheid_ziekte_vakantie: null,beroepsprestaties_nummer_vermelden: null,selecteer_het_aantal_dagen_waar_je_uren_voor_wilt_registreren: null,versturen: null, checkConditions: null, visible: true, validate: null,required_validator: null,date_validator: null}; with(scope) { voor_en_achternaam_leerling = (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":"voor_en_achternaam_leerling"}, {"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; })(); bsn_nummer = (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":"bsn_nummer"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); naam_werk_of_praktijkopleider = (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; })(); naam_opleiding_en_naam_onderwijsinstelling = (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_opleiding_en_naam_onderwijsinstelling"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); startdatum_opleiding = (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":"startdatum_opleiding"}, {"MISSING":"Dit veld is verplicht"} ); date_validator( {"fragment":"startdatum_opleiding"}, {"ILLEGAL_DATE":"Dit is geen geldige datum"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); einddatum_opleiding = (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":"einddatum_opleiding"}, {"MISSING":"Dit veld is verplicht"} ); date_validator( {"fragment":"einddatum_opleiding"}, {"ILLEGAL_DATE":"Dit is geen geldige datum"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); afwezigheid_ziekte_vakantie = (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":"afwezigheid_ziekte_vakantie"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); beroepsprestaties_nummer_vermelden = (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":"beroepsprestaties_nummer_vermelden"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); selecteer_het_aantal_dagen_waar_je_uren_voor_wilt_registreren = (function() { var scope = {count: null,repeat0: null,repeat1: null,repeat2: null,repeat3: null, checkConditions: null, visible: true, validate: null,number_validator: null,number_range_validator: null}; with(scope) { count = (function() { var scope = {value: '1', validate: null, errors: {}, visible: true, checkConditions: null, validated: false, condition: true}; with(scope) { originalvalue = '1'; validate = function() { this.errors = {}; number_validator( {"fragment":"count"}, {"INVALID_NUMBER":"Vul a.u.b. een getal in"} ); number_range_validator( {"fragment":"count","minimumValue":"null","maximumValue":"null"}, {"NUMBER_OUT_OF_RANGE":"Het ingevulde getal is te klein of te groot"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); repeat0 = (function() { var scope = {datum: null,leeractiviteit: null,tijdsduur: null,naam_en_functie: null, checkConditions: null, visible: true, validate: null,required_validator: null,date_validator: null}; with(scope) { checkConditions = function() { this.visible = (selecteer_het_aantal_dagen_waar_je_uren_voor_wilt_registreren.count.value > 0); return true; }; datum = (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":"datum"}, {"MISSING":"Dit veld is verplicht"} ); date_validator( {"fragment":"datum"}, {"ILLEGAL_DATE":"Dit is geen geldige datum"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); leeractiviteit = (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":"leeractiviteit"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); tijdsduur = (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":"tijdsduur"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); naam_en_functie = (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_en_functie"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); required_validator = function(parameters, languageLabels) { return ag_251380.required_validator(this, parameters, languageLabels); } date_validator = function(parameters, languageLabels) { return ag_251380.date_validator(this, parameters, languageLabels); } } return scope; })(); repeat1 = (function() { var scope = {datum: null,leeractiviteit: null,tijdsduur: null,naam_en_functie: null, checkConditions: null, visible: true, validate: null,required_validator: null,date_validator: null}; with(scope) { checkConditions = function() { this.visible = (selecteer_het_aantal_dagen_waar_je_uren_voor_wilt_registreren.count.value > 1); return true; }; datum = (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":"datum"}, {"MISSING":"Dit veld is verplicht"} ); date_validator( {"fragment":"datum"}, {"ILLEGAL_DATE":"Dit is geen geldige datum"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); leeractiviteit = (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":"leeractiviteit"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); tijdsduur = (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":"tijdsduur"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); naam_en_functie = (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_en_functie"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); required_validator = function(parameters, languageLabels) { return ag_251380.required_validator(this, parameters, languageLabels); } date_validator = function(parameters, languageLabels) { return ag_251380.date_validator(this, parameters, languageLabels); } } return scope; })(); repeat2 = (function() { var scope = {datum: null,leeractiviteit: null,tijdsduur: null,naam_en_functie: null, checkConditions: null, visible: true, validate: null,required_validator: null,date_validator: null}; with(scope) { checkConditions = function() { this.visible = (selecteer_het_aantal_dagen_waar_je_uren_voor_wilt_registreren.count.value > 2); return true; }; datum = (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":"datum"}, {"MISSING":"Dit veld is verplicht"} ); date_validator( {"fragment":"datum"}, {"ILLEGAL_DATE":"Dit is geen geldige datum"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); leeractiviteit = (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":"leeractiviteit"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); tijdsduur = (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":"tijdsduur"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); naam_en_functie = (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_en_functie"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); required_validator = function(parameters, languageLabels) { return ag_251380.required_validator(this, parameters, languageLabels); } date_validator = function(parameters, languageLabels) { return ag_251380.date_validator(this, parameters, languageLabels); } } return scope; })(); repeat3 = (function() { var scope = {datum: null,leeractiviteit: null,tijdsduur: null,naam_en_functie: null, checkConditions: null, visible: true, validate: null,required_validator: null,date_validator: null}; with(scope) { checkConditions = function() { this.visible = (selecteer_het_aantal_dagen_waar_je_uren_voor_wilt_registreren.count.value > 3); return true; }; datum = (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":"datum"}, {"MISSING":"Dit veld is verplicht"} ); date_validator( {"fragment":"datum"}, {"ILLEGAL_DATE":"Dit is geen geldige datum"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); leeractiviteit = (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":"leeractiviteit"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); tijdsduur = (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":"tijdsduur"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); naam_en_functie = (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_en_functie"}, {"MISSING":"Dit veld is verplicht"} ); return this.errors; }; checkConditions = function() { this.visible = true; }; } return scope; })(); required_validator = function(parameters, languageLabels) { return ag_251380.required_validator(this, parameters, languageLabels); } date_validator = function(parameters, languageLabels) { return ag_251380.date_validator(this, parameters, languageLabels); } } return scope; })(); number_validator = function(parameters, languageLabels) { return ag_251380.number_validator(this, parameters, languageLabels); } number_range_validator = function(parameters, languageLabels) { return ag_251380.number_range_validator(this, parameters, languageLabels); } } 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_251380.required_validator(this, parameters, languageLabels); } date_validator = function(parameters, languageLabels) { return ag_251380.date_validator(this, parameters, languageLabels); } } return scope; })(); currentStep = function() { return urenregistratie; }; 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_251380'] == 'undefined' || !WebmanagerFormStateRegistry['wmform_251380']) { WebmanagerFormStateRegistry['wmform_251380'] = wmform_251380; }; }; ag_251380 = new Object(); ag_251380.required_validator = function(scope,parameters, languageLabels) { if (scope[parameters.fragment].value == undefined || scope[parameters.fragment].value === "") { scope[parameters.fragment].errors["MISSING"] = languageLabels["MISSING"]; } } ag_251380.date_validator = function(scope,parameters, languageLabels) { var dateValue = scope[parameters.fragment].value; if (dateValue != undefined && dateValue != "") { dateValue = dateValue.replace(/-/gi, '/'); splitted = dateValue.split('/'); if (splitted.length == 3) { dd = splitted[0]; mm = splitted[1]; yyyy = splitted[2]; var d = new Date(mm + "/" + dd + "/" + yyyy); isDate = (d.getMonth() + 1 == mm && d.getDate() == dd && d.getFullYear() == yyyy); if (!isDate) { scope[parameters.fragment].errors["ILLEGAL_DATE"] = languageLabels["ILLEGAL_DATE"]; } } else { scope[parameters.fragment].errors["ILLEGAL_DATE"] = languageLabels["ILLEGAL_DATE"]; } } } ag_251380.number_validator = function(scope,parameters, languageLabels) { if (scope[parameters.fragment].value != undefined && scope[parameters.fragment].value !== "") { var value = scope[parameters.fragment].value + ''; if (!value.match(/^-{0,1}[0-9]+\.?[0-9]*$/)) { scope[parameters.fragment].errors["INVALID_NUMBER"] = languageLabels["INVALID_NUMBER"]; } else { scope[parameters.fragment].value = parseFloat(value); } } } ag_251380.number_range_validator = function(scope,parameters, languageLabels) { if (scope[parameters.fragment].value != undefined && scope[parameters.fragment].value !== "") { value = scope[parameters.fragment].value; minValue = parseFloat(parameters.minimumValue); maxValue = parseFloat(parameters.maximumValue); if (parameters.minimumValue != '') { if (value < minValue) { scope[parameters.fragment].errors["NUMBER_OUT_OF_RANGE"] = languageLabels["NUMBER_OUT_OF_RANGE"]; } } if (parameters.maximumValue != '') { if (value > maxValue) { scope[parameters.fragment].errors["NUMBER_OUT_OF_RANGE"] = languageLabels["NUMBER_OUT_OF_RANGE"]; } } } }