The International Food Policy Research Institute (IFPRI) seeks a qualified candidate to fill the position of Policy Advisor for a two-year, exempt appointment based in Lilongwe, Malawi.
The Policy Advisor will provide strategic policy analysis and advisory support on issues related to food systems, agriculture, nutrition, rural transformation, and economic development in Malawi. The position will play a leading role in strengthening the use of evidence in policy processes, supporting policy dialogue and stakeholder engagement, strengthening partnerships and policy networks, mobilizing resources for policy-relevant engagement, enhancing policymaking capacity, and facilitating the translation of research into policy and practice.
Essential Duties
Specific duties and responsibilities include but are not limited to:
Policy analytics and advice
·Provide strategic policy advice to government counterparts and development partners on policy opportunities, risks, trade-offs, and implementation challenges.
·Advise the Country Program Leader on emerging policy priorities, evidence needs, and opportunities to strengthen the policy relevance and impact of IFPRI's work in Malawi.
·Draft policy papers, briefing notes, and recommendations to support evidence-based decision-making.
·Track evolving policy priorities, reform processes, and regional policy initiatives, and identify opportunities to strengthen policy design and implementation through evidence.
·Assess the effectiveness of policies and programs and identify opportunities to improve design, implementation, and impact.
Policy engagement and stakeholder relations
·Support the country program’s efforts to strengthen evidence-informed policymaking through policy dialogue, stakeholder engagement, and knowledge exchange.
·Build and maintain productive relationships with relevant ministries, departments and agencies (MDAs), development partners, research institutions, civil society organizations, and private-sector stakeholders.
·Consult with stakeholders and incorporate diverse perspectives into policy analysis and recommendations.
·Represent IFPRI in policy dialogue platforms, technical working groups, regional forums, and international policy processes.
·Support engagement with regional and continental initiatives that are relevant to Malawi's policy priorities.
·Promote collaboration between policymakers, researchers, and development practitioners to facilitate the use of evidence in policy processes.
·Design and support policy engagement and communication activities that strengthen stakeholder understanding and promote evidence-informed decision-making.
Capacity strengthening
·Design and support initiatives aimed at strengthening policy analysis, evidence use, and policymaking capacity among government institutions and other policy stakeholders.
·Facilitate training, mentoring, technical assistance, and knowledge-sharing activities that strengthen local policy capabilities.
·Promote mutual learning and exchange among policymakers, researchers, and development partners.
·Support institutional efforts to strengthen the long-term use of evidence in policy formulation, implementation, and evaluation.
Research-to-policy engagement and resource mobilization
·Inform the development of policy-relevant research agendas that respond to policymaker needs.
·Support the translation of research findings into actionable policy recommendations and practical guidance for decision-makers.
·Contribute to the dissemination and uptake of research through policy briefs, stakeholder consultations, workshops, and other outreach activities.
·Contribute to resource mobilization efforts, including identifying funding opportunities and developing competitive proposals for policy-relevant research and engagement activities.
·Collaborate with partners within IFPRI, across CGIAR, and externally to expand research and funding partnerships.
·Support internal and external reporting, including donor reporting and work plan development
Required Qualifications
·Master's degree in Economics, Public Policy, Agricultural Economics, Political Science, Development Studies, or a related social science discipline, plus 8 years of relevant professional experience following the degree.
·2 years of management experience is required.
·Demonstrated track record of policy analysis, policy engagement, and the application of research evidence to policymaking processes.
·Strong understanding of development policy, public institutions, and policy processes in Africa.
·Strong analytical, policy analysis, and critical-thinking skills, with demonstrated ability to translate complex evidence into actionable policy recommendations.
·Experience in policy engagement related to agriculture, food systems, rural development, economic transformation, or related sectors.
·Excellent written and verbal communication skills, including demonstrated excellence in policy writing, presentations, and stakeholder engagement.
·Strong stakeholder management and influencing skills, with experience working effectively with policymakers, researchers, donors, civil society organizations, and development partners.
·Demonstrated experience operating in multicultural and international development environments.
·Experience designing or supporting capacity-strengthening initiatives for government institutions or policy stakeholders.
·Experience contributing to proposal development and resource mobilization is desirable.
·Knowledge of policy formulation and implementation processes in developing-country contexts, preferably Malawi.
·Willingness to travel as required.
Preferred Qualifications
·Experience with CGIAR institutions.
·Demonstrated professional network among Malawian policymakers and development stakeholders.
·Work experience in Malawi.
·Knowledge of Chichewa.
Physical Demand
& Work environment:
·Employee will sit in an upright position for a long period of time with little opportunity to move/stretch
·Employee will lift between 0-10pounds
·Employee is required to have close visual acuity to perform activities such as: preparing and analyzing data and figures; transcribing; viewing computer terminal; extensive reading
Salary Range: The expected salary range for this job requisition is between $85,600 -$107,000. In determining your salary, we will consider your experience and other job-related factors.
The International Food Policy Research Institute (IFPRI) is an equal employment opportunity employer - F/M/Disability/Vet/Sexual Orientation/Gender Identity.
", "identifier" : { "name" : "International Food Policy Research Inst.", "value" : "3846", "@type" : "PropertyValue" }, "@context" : "http://schema.org", "@type" : "JobPosting" } Policy Advisor Location Lilongwe, Malawi Recruitment Type International Position Code 26-113 Apply NowThe International Food Policy Research Institute (IFPRI) seeks a qualified candidate to fill the position of Policy Advisor for a two-year, exempt appointment based in Lilongwe, Malawi.The Policy Advisor will provide strategic policy analysis and advisory support on issues related to food systems, agriculture, nutrition, rural transformation, and economic development in Malawi. The position will play a leading role in strengthening the use of evidence in policy processes, supporting policy dialogue and stakeholder engagement, strengthening partnerships and policy networks, mobilizing resources for policy-relevant engagement, enhancing policymaking capacity, and facilitating the translation of research into policy and practice.
Essential Duties
Specific duties and responsibilities include but are not limited to:Policy analytics and advice· Provide strategic policy advice to government counterparts and development partners on policy opportunities, risks, trade-offs, and implementation challenges.· Advise the Country Program Leader on emerging policy priorities, evidence needs, and opportunities to strengthen the policy relevance and impact of IFPRI's work in Malawi.· Draft policy papers, briefing notes, and recommendations to support evidence-based decision-making.· Track evolving policy priorities, reform processes, and regional policy initiatives, and identify opportunities to strengthen policy design and implementation through evidence.· Assess the effectiveness of policies and programs and identify opportunities to improve design, implementation, and impact.Policy engagement and stakeholder relations· Support the country program’s efforts to strengthen evidence-informed policymaking through policy dialogue, stakeholder engagement, and knowledge exchange.· Build and maintain productive relationships with relevant ministries, departments and agencies (MDAs), development partners, research institutions, civil society organizations, and private-sector stakeholders.· Consult with stakeholders and incorporate diverse perspectives into policy analysis and recommendations.· Represent IFPRI in policy dialogue platforms, technical working groups, regional forums, and international policy processes.· Support engagement with regional and continental initiatives that are relevant to Malawi's policy priorities.· Promote collaboration between policymakers, researchers, and development practitioners to facilitate the use of evidence in policy processes.· Design and support policy engagement and communication activities that strengthen stakeholder understanding and promote evidence-informed decision-making.Capacity strengthening· Design and support initiatives aimed at strengthening policy analysis, evidence use, and policymaking capacity among government institutions and other policy stakeholders.· Facilitate training, mentoring, technical assistance, and knowledge-sharing activities that strengthen local policy capabilities.· Promote mutual learning and exchange among policymakers, researchers, and development partners.· Support institutional efforts to strengthen the long-term use of evidence in policy formulation, implementation, and evaluation.Research-to-policy engagement and resource mobilization· Inform the development of policy-relevant research agendas that respond to policymaker needs.· Support the translation of research findings into actionable policy recommendations and practical guidance for decision-makers.· Contribute to the dissemination and uptake of research through policy briefs, stakeholder consultations, workshops, and other outreach activities.· Contribute to resource mobilization efforts, including identifying funding opportunities and developing competitive proposals for policy-relevant research and engagement activities.· Collaborate with partners within IFPRI, across CGIAR, and externally to expand research and funding partnerships.· Support internal and external reporting, including donor reporting and work plan development
Required Qualifications
· Master's degree in Economics, Public Policy, Agricultural Economics, Political Science, Development Studies, or a related social science discipline, plus 8 years of relevant professional experience following the degree.· 2 years of management experience is required.· Demonstrated track record of policy analysis, policy engagement, and the application of research evidence to policymaking processes.· Strong understanding of development policy, public institutions, and policy processes in Africa.· Strong analytical, policy analysis, and critical-thinking skills, with demonstrated ability to translate complex evidence into actionable policy recommendations.· Experience in policy engagement related to agriculture, food systems, rural development, economic transformation, or related sectors.· Excellent written and verbal communication skills, including demonstrated excellence in policy writing, presentations, and stakeholder engagement.· Strong stakeholder management and influencing skills, with experience working effectively with policymakers, researchers, donors, civil society organizations, and development partners.· Demonstrated experience operating in multicultural and international development environments.· Experience designing or supporting capacity-strengthening initiatives for government institutions or policy stakeholders.· Experience contributing to proposal development and resource mobilization is desirable.· Knowledge of policy formulation and implementation processes in developing-country contexts, preferably Malawi.· Willingness to travel as required.
Preferred Qualifications
· Experience with CGIAR institutions.· Demonstrated professional network among Malawian policymakers and development stakeholders.· Work experience in Malawi.· Knowledge of Chichewa.
Physical Demand
& Work environment:· Employee will sit in an upright position for a long period of time with little opportunity to move/stretch· Employee will lift between 0-10pounds· Employee is required to have close visual acuity to perform activities such as: preparing and analyzing data and figures; transcribing; viewing computer terminal; extensive readingSalary Range: The expected salary range for this job requisition is between $85,600 - $107,000. In determining your salary, we will consider your experience and other job-related factors.The International Food Policy Research Institute (IFPRI) is an equal employment opportunity employer - F/M/Disability/Vet/Sexual Orientation/Gender Identity. Back Share Apply Now (function () { 'use strict'; socialShare.init(); })(); CwsDWRFacade._path = 'https://phf.tbe.taleo.net/phf04/ats/dwr-cws'; var DWRFacade = CwsDWRFacade; $(function () { if (typeof moveToNextStep !== 'undefined') { $('.oracletaleocwsv2-arrow-nav-next').trigger('click'); } }); $("[data-bs-toggle='modal']").click(function () { var d_tar = $(this).attr('data-target'); $(d_tar).show(); var modal_he = $(d_tar).find('.modal-dialog .modal-content').height(); var win_height = $(window).height(); var marr = win_height - modal_he; $('.modal-dialog').css('margin-top', marr / 2); }); // This is needed for fixing beforeShow // (function ($) { // $.extend($.datepicker, { // // // Reference the orignal function so we can override it and call it later // _inlineDatepicker2: $.datepicker._inlineDatepicker, // // // Override the _inlineDatepicker method // _inlineDatepicker: function (target, inst) { // // // Call the original // this._inlineDatepicker2(target, inst); // // var beforeShow = $.datepicker._get(inst, 'beforeShow'); // // if (beforeShow) { // beforeShow.apply(target, [target, inst]); // } // } // }); // }(jQuery)); // The following needed to re-purpose Today button for Clean behavior (function ($) { $.extend($.datepicker, { // Reference the orignal function so we can override it and call it later if needed _gotoToday2: $.datepicker._gotoToday, // Override the _gotoToday method - clean and close _gotoToday: function (target, inst) { $(target).closest('.form-group').find('.input-group input').val(''); $(target).fadeOut(); } }); }(jQuery)); //jQuery Calendar jQuery(document).ready(function($) { $('.oracletaleocwsv2-datepicker.oracletaleocwsv2-datepicker-single').datepicker({ beforeShowDay:function(date) { try { var thisDate = $.datepicker.parseDate('m/d/y', $(this).closest('.form-group').find('.input-group input').val()); return [true, thisDate && date.getTime() == thisDate.getTime() ? "oracletaleocwsv2-dp-highlight" : ""]; } catch (e) {} return [true, ''];}, onSelect:function(dateText, inst) { $(this).closest('.form-group').find('.input-group input').val(dateText).change(); $(this).datepicker(); $(this).fadeOut(); }, altField:'',altFormat:'',appendText:'',changeMonth:true,changeYear:true,closeText:'\'Close\'',constrainInput:true,currentText:'Clear',dateFormat:'m/d/y',monthYearDateFormat:'MM/yy',dayNames:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],dayNamesShort:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],dayNamesMin:['Su','Mo','Tu','We','Th','Fr','Sa'],defaultDate:null,duration:'normal',firstDay:0,gotoCurrent:false,hideIfNoPrevNext:false,isRTL:false,maxDate:null,minDate:null,monthNames:['January','February','March','April','May','June','July','August','September','October','November','December'],monthNamesShort:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],navigationAsDateFormat:false,nextText:'Next',numberOfMonths:1,prevText:'Previous',shortYearCutoff:'+10',showAnim:'show',showButtonPanel:true,showCurrentAtPos:0,showMonthAfterYear:false,showOptions:{},showOtherMonths:false,stepMonths:1,yearRange:'1931:2091'});}); //jQuery Calendar jQuery(document).ready(function($) { $('.oracletaleocwsv2-datepicker.oracletaleocwsv2-datepicker-range').datepicker({ beforeShowDay:function(date) { try { var date1 = $.datepicker.parseDate('m/d/y', $(this).closest('.form-group').find('.form-inline .input-group .oracletaleocwsv2-to-field').val()); var date2 = $.datepicker.parseDate('m/d/y', $(this).closest('.form-group').find('.form-inline .input-group .oracletaleocwsv2-from-field').val()); return [true, date1 && ((date.getTime() == date1.getTime()) || (date2 && date >= date1 && date <= date2)) ? "oracletaleocwsv2-dp-highlight" : ""]; } catch (e) {} return [true, ''];}, onSelect:function(dateText, inst) { //populate the appropriate text boxes based on datepicker selection var date1 = ""; var date2 = ""; try { date1 = $.datepicker.parseDate('m/d/y', $(this).closest('.form-group').find('.form-inline .input-group .oracletaleocwsv2-to-field').val()); date2 = $.datepicker.parseDate('m/d/y', $(this).closest('.form-group').find('.form-inline .input-group .oracletaleocwsv2-from-field').val()); } catch (e) {} if (!date1 || date2) { $(this).closest('.form-group').find('.form-inline .input-group .oracletaleocwsv2-to-field').val(dateText); $(this).closest('.form-group').find('.form-inline .input-group .oracletaleocwsv2-from-field').val(""); $(this).datepicker(); } else { $(this).closest('.form-group').find('.form-inline .input-group .oracletaleocwsv2-from-field').val(dateText); $(this).datepicker(); $(this).fadeOut(); } }, altField:'',altFormat:'',appendText:'',changeMonth:true,changeYear:true,closeText:'\'Close\'',constrainInput:true,currentText:'Clear',dateFormat:'m/d/y',monthYearDateFormat:'MM/yy',dayNames:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],dayNamesShort:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],dayNamesMin:['Su','Mo','Tu','We','Th','Fr','Sa'],defaultDate:null,duration:'normal',firstDay:0,gotoCurrent:false,hideIfNoPrevNext:false,isRTL:false,maxDate:null,minDate:null,monthNames:['January','February','March','April','May','June','July','August','September','October','November','December'],monthNamesShort:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],navigationAsDateFormat:false,nextText:'Next',numberOfMonths:1,prevText:'Previous',shortYearCutoff:'+10',showAnim:'show',showButtonPanel:true,showCurrentAtPos:0,showMonthAfterYear:false,showOptions:{},showOtherMonths:false,stepMonths:1,yearRange:'1931:2091'});}); //Org today's date function getOrgTodayDate() { var todayDay = 6 var todayMonth = 10 var todayYear = 2026 var todayDate = new Date(todayYear, todayMonth, todayDay); return todayDate; } function checkForm(buttonElement, formElement, spinnerId) { var snapVal = $("div.snapshotContentDiv").html(); $('input#snapshotContent').val(snapVal); if (!validateFormInput(formElement)) { return false; } $(".fa-ban").attr('disabled', true); $(buttonElement).attr('disabled', true); $('#' + spinnerId).css('display', 'inline-block'); $(formElement).submit(); //chrome and safari needs this return false; //since we are submitting form above return false to prevent browser onclick submit } function isValidationRequiredForCurrentActiveStep(element) { if (!element) return; var currentActiveStepinApplyRequisition = $(".oracletaleocwsv2-step.oracletaleocwsv2-active"); if (!currentActiveStepinApplyRequisition.length) return true; var currentStep = $(element).closest(".oracletaleocwsv2-step"); if (!currentStep.length) return true; var elementStepNo = parseInt(currentStep[0].id.replace("step-", "")); var activeStepNo = parseInt(currentActiveStepinApplyRequisition[0].id.replace("step-", "")); return elementStepNo <= activeStepNo; } // Overriding standard messages jQuery.extend(jQuery.validator.messages, { required: "Required field", email: "Enter valid email", email_valid: "Enter valid email", date: "Enter valid date", equalTo: "Value does not match", number: "Enter valid number" }); // Overriding standard required method to check for -1's jQuery.validator.methods.required = function(value, element, param) { if ("select" === element.nodeName.toLowerCase()) { var val = $(element).val(); return (val && val.length > 0 && val != "-1") || $(element).is(":disabled"); } return checkable(element) ? getLength(value, element) > 0 : $.trim(value).length > 0; } function getLength(value, element) { switch (element.nodeName.toLowerCase()) { case "select": return $("option:selected", element).length; case "input": if (checkable(element)) { return findByName(element.name).filter(":checked").length; } } return value.length; } function findByName(name) { return $('#oracletaleocwsv2-wrapper').find("[name='" + name + "']"); } function checkable(element) { return /radio|checkbox/i.test(element.type); } function getFocus(fieldName) { fieldName.focus(); } // field itself checks for maxlength jQuery.validator.methods.maxlength = function(value, element, param) { return true; } function validateFormInput(elementToValidate) { // if elementToValidate is not form, need to call initialize on the parent form var formElement = elementToValidate; if (!$(formElement).is('form')) { formElement = $(elementToValidate).closest('form'); } var validator = $(formElement).validate({ rules: { required: true, cwsPassword_2: { equalTo: '#cwsPassword' }, newPassword2: { equalTo: '#newPassword1' }, email: { email_valid: true }, cwsv2_profile_picture_upload_content_required: { profile_picture_upload_required: true }, cwsv2_resume_upload_content_required: { resume_upload_required: true }, cwsv2_work_history: { min_work_history: true }, cwsv2_education_history: { min_education_history: true }, cwsv2_residence_history: { min_residence_history: true }, cwsv2_reference: { min_reference: true }, cwsv2_certificate: { min_cert_and_license: true }, cc305Date: { cc305_date: true }, cwsPassword: { minlength: $('[name=minPasswordLength]').val(), cwsPassword_valid: true }, newPassword1: { minlength: $('[name=minPasswordLength]').val(), cwsPassword_valid: true } }, messages: { email: { email_valid: "Enter valid email" }, cc305Date: { cc305_date: "Invalid date" }, cwsv2_work_history: { min_work_history: "Additional Work History is required" }, cwsv2_education_history: { min_education_history: "Additional Education History is required" }, cwsv2_residence_history: { min_residence_history: "Additional Residence History is required" }, cwsv2_reference: { min_reference: "Additional Reference is required" }, cwsv2_certificate: { min_cert_and_license: "Additional Certificate and License is required" }, cwsv2_profile_picture_upload_content_required: { profile_picture_upload_required: "Required field" }, cwsv2_resume_upload_content_required: { resume_upload_required: "Required field" }, cwsPassword: { minlength: $('[name=minPasswordLengthError]').val(), cwsPassword_valid: $('[name=nonAbcCharsInPasswordError]').val() }, newPassword1: { minlength: $('[name=minPasswordLengthError]').val(), cwsPassword_valid: $('[name=nonAbcCharsInPasswordError]').val() }, consentAgreement_checkbox_container: "This field must be checked to save job alert" }, ignoreTitle: true, ignore: ":hidden:not('#cwsv2_work_history, #cwsv2_education_history, #cwsv2_residence_history, #cwsv2_reference, #cwsv2_certificate, #cwsv2_profile_picture_upload_content_required, #cwsv2_resume_upload_content_required, .cwsv2_validate_rlent_date, .cwsv2_validate_rlent_date_from_to, .cwsv2_work_history_instance, .cwsv2_education_history_instance, .cwsv2_residence_history_instance, .cwsv2_reference_instance, .cwsv2_certificate_instance, .cwsv2_double_entry_field_container, .cwsv2_encrypted_integer_container, .cwsv2_required_checkbox_container, .cwsv2_force_validation'),.cwsv2_ignore_validation", errorClass: "text-danger", errorElement: 'label', focusInvalid: false, errorPlacement: function (label, elem) { if (($(elem).attr("required") && $(elem).attr("aria-label")) !== undefined) { var prevAriaValue = $(elem).attr("aria-label") + " " + $(elem).attr("required"); } else { var prevAriaValue = ""; } label.attr({"for": elem, "role":"alert", "tabindex":"0", "aria-live":"polite", "aria-label":prevAriaValue}); var siblingPlaceholder = elem.nextAll('.oracletaleocwsv2-error-text:first'); var siblingPlaceholderInput = elem.nextAll('.oracletaleocwsv2-error-text:first').prevAll().find('input,textarea,select').filter('[required]:visible').first().focus(); getFocus(siblingPlaceholderInput); siblingPlaceholder.css("display", "block"); if (siblingPlaceholder.length > 0) { siblingPlaceholder.html(label); } else { var parentPlaceholder = elem.parent().nextAll('.oracletaleocwsv2-error-text:first'); var parentPlaceholderInput = elem.nextAll('.oracletaleocwsv2-error-text:first').prevAll().find('input,textarea,select').filter('[required]:visible').first().focus(); parentPlaceholder.css("display", "block"); if (parentPlaceholder.length > 0) { parentPlaceholder.html(label); getFocus(elem); } else { label.insertAfter(elem); } } }, invalidHandler: function (form, validator) { if (!validator.numberOfInvalids()) return; var errorElement = $(validator.errorList[0].element); var displayElement = errorElement; // if error element is hidden, scroll to its last sibling button or instance if (errorElement.is(":visible")) { displayElement = errorElement.parent(); getFocus(errorElement); } else { displayElement = errorElement.siblings('.btn:last'); getFocus(displayElement); } if (!displayElement.is(":visible")) { displayElement = errorElement.closest('.oracletaleocwsv2-instance'); } if (!displayElement.is(":visible")) { displayElement = errorElement.closest(":visible"); } $('html, body').animate({ scrollTop: displayElement.offset().top }, 1000); } }); jQuery.validator.addMethod("email_valid", function(value, element) { if (this.optional(element)) { return true; } for (var k = 0; k < value.length; k++) { var ch = value.charAt(k); if (" \r\n\t[]".indexOf(ch) >= 0) { return false; } } var index = value.indexOf('@'); if (index <= 0) { return false; } var index2 = value.indexOf('.', index); if (index2 <= index) { return false; } return true; }); jQuery.validator.addMethod("cwsPassword_valid", function (value, element) { var checkNonAlpha = $('[name=nonAbcCharsInPassword]').val(); if (checkNonAlpha == "true") { var passwd = $.trim(value); return this.optional(element) || !((/^[a-zA-Z]+$/).test(passwd)) || (/^[*]{10,10}$/).test(value); } else { return true; } }); jQuery.validator.addMethod("min_education_history", function(value, element) { if (!isValidationRequiredForCurrentActiveStep(element)) { return true; } var educationContent = $('.oracletaleocwsv2-step.oracletaleocwsv2-active').children('.oracletaleocwsv2-dynamic-content-education'); if (educationContent === undefined || educationContent.length === 0) { var webPage = $('#TBE_theForm').find('input[name="WebPage"]').val(); if(webPage == "MYINF_V2"){ educationContent = $('.oracletaleocwsv2-dynamic-content-education'); } } if (educationContent.length > 0) { var educationLength = $('.oracletaleocwsv2-instance[data-type=education]').length; var minEducation = $('[name=cwsMinEducationCount]').val(); if (educationLength >= minEducation) { return true; } else { return false; } } return true; }); jQuery.validator.addMethod("min_work_history", function(value, element) { if (!isValidationRequiredForCurrentActiveStep(element)) { return true; } var workContent = $('.oracletaleocwsv2-step.oracletaleocwsv2-active').children('.oracletaleocwsv2-dynamic-content-work'); if (workContent === undefined || workContent.length === 0) { var webPage = $('#TBE_theForm').find('input[name="WebPage"]').val(); if(webPage == "MYINF_V2"){ workContent = $('.oracletaleocwsv2-dynamic-content-work'); } } if (workContent.length > 0) { var workLength = $('.oracletaleocwsv2-instance[data-type=work]').length; var minWork = $('[name=cwsMinWorkCount]').val(); if (workLength >= minWork) { return true; } else { return false; } } return true; }); function hasRequiredFields(element, classSelector) { var containsRequired; $(element).siblings(classSelector).children('.well').find('input, select, textarea').each(function(i) { if ($(this).prop('required')) { containsRequired = true; return false; } }); return containsRequired; } jQuery.validator.addMethod("min_residence_history", function(value, element) { if (!isValidationRequiredForCurrentActiveStep(element)) { return true; } var residenceContent = $('.oracletaleocwsv2-step.oracletaleocwsv2-active').children('.oracletaleocwsv2-dynamic-content-residence'); if (residenceContent === undefined || residenceContent.length === 0) { var webPage = $('#TBE_theForm').find('input[name="WebPage"]').val(); if(webPage === "MYINF_V2"){ residenceContent = $('.oracletaleocwsv2-dynamic-content-residence'); } } if (residenceContent.length > 0) { var residenceLength = $('.oracletaleocwsv2-instance[data-type=residence]').length; var minResidence = $('[name=cwsMinResidenceCount]').val(); if (residenceLength >= minResidence) { return true; } else { return false; } } return true; }); jQuery.validator.addMethod("min_reference", function(value, element) { if (!isValidationRequiredForCurrentActiveStep(element)) { return true; } var referenceContent = $('.oracletaleocwsv2-step.oracletaleocwsv2-active').children('.oracletaleocwsv2-dynamic-content-reference'); if ( referenceContent === undefined || referenceContent.length === 0) { var webPage = $('#TBE_theForm').find('input[name="WebPage"]').val(); if(webPage === "MYINF_V2"){ referenceContent = $('.oracletaleocwsv2-dynamic-content-reference'); } } if (referenceContent.length > 0) { var referenceLength = $('.oracletaleocwsv2-instance[data-type=reference]').length; var minReference = $('[name=cwsMinReferenceCount]').val(); if (referenceLength >= minReference) { return true; } else { return false; } } return true; }); jQuery.validator.addMethod("min_cert_and_license", function(value, element) { if (!isValidationRequiredForCurrentActiveStep(element)) { return true; } var certContent = $('.oracletaleocwsv2-step.oracletaleocwsv2-active').children('.oracletaleocwsv2-dynamic-content-certificate'); if (certContent === undefined || certContent.length === 0) { var webPage = $('#TBE_theForm').find('input[name="WebPage"]').val(); if(webPage === "MYINF_V2"){ certContent = $('.oracletaleocwsv2-dynamic-content-certificate'); } } if (certContent.length > 0) { var certLength = $('.oracletaleocwsv2-instance[data-type=certificate]').length; var minCert = $('[name=cwsMinCertificateCount]').val(); if (certLength >= minCert) { return true; } else { return false; } } return true; }); jQuery.validator.addMethod("validate_date_no_future", function(value, element) { if (!isValidationRequiredForCurrentActiveStep(element)) { return true; } var isValid = true; var monthYear = $(element).val(); var delimiterPos = monthYear.search("/"); var month = monthYear.substring(0, delimiterPos); var year = monthYear.substring(delimiterPos + 1, monthYear.length); var d = new Date(); //incrementing month as it is 0 based var currentMonth = d.getMonth() + 1; var currentYear = d.getFullYear(); var elementId = $(element).attr("id"); var isEducationDateTo = (elementId.indexOf("EDUCATION_dateTo") >= 0); if (isEducationDateTo) { var isEducationDateToValid = (year <= (currentYear + 5) ) || (year == 9000); if (!isEducationDateToValid) { isValid = false; } } else { var isDateToInFuture = (month > currentMonth && year >= currentYear) && !((elementId == "workDateTo" || elementId == "dateTo") && year == 9000); if (isDateToInFuture) { isValid = false; } } return isValid; }, "Cannot be future date"); jQuery.validator.addMethod("validate_from_less_than_to_date", function(value, element) { if (!isValidationRequiredForCurrentActiveStep(element)) { return true; } var isValid = true; if ($(element).attr("id").search("ateFrom") > 0) { return isValid; } var toDateVal = $(element).val(); if (!toDateVal) { return isValid; } var delimiterPos = toDateVal.search("/"); var toMonth = toDateVal.substring(0, delimiterPos); var toYear = toDateVal.substring(delimiterPos + 1, toDateVal.length); var fromDateVal = $(element).parents('.well').find("input[type='hidden'][id*='ateFrom']").val(); if (fromDateVal) { var delimiterPosFrom = fromDateVal.search("/"); if (delimiterPosFrom > 0) { var fromMonth = fromDateVal.substring(0, delimiterPosFrom); var fromYear = fromDateVal.substring(delimiterPosFrom + 1, fromDateVal.length); var fromDate = new Date(); fromDate.setMonth(fromMonth - 1); fromDate.setYear(fromYear); fromDate.setDate(15); fromDate.setHours(0); fromDate.setMinutes(0); fromDate.setSeconds(0); var toDate = new Date(); toDate.setMonth(toMonth - 1); toDate.setYear(toYear); toDate.setDate(15); toDate.setHours(0); toDate.setMinutes(0); toDate.setSeconds(0); if (fromDate > toDate) { isValid = false; } } } return isValid; }, "Start date cannot be after the end date"); jQuery.validator.addMethod("resume_upload_required", function(value, element) { if (!isValidationRequiredForCurrentActiveStep(element)) { return true; } var resumeContent = $(element).closest('.oracletaleocwsv2-dynamic-content-resume'); if (resumeContent.length > 0 && resumeContent.is(':visible')) { var resumeLength = $('.oracletaleocwsv2-instance[data-type=resume]').length; if (resumeLength >= 1) { return true; } else { return false; } } return true; }); jQuery.validator.addMethod("profile_picture_upload_required", function(value, element) { if (!isValidationRequiredForCurrentActiveStep(element)) { return true; } var profilePictureContent = $(element).closest('.oracletaleocwsv2-dynamic-content-profile_picture'); if (profilePictureContent.length > 0 && profilePictureContent.is(':visible')) { var profilePictureLength = $('.oracletaleocwsv2-instance[data-type=profile_picture]').length; if (profilePictureLength >= 1) { return true; } else { return false; } } return true; }); jQuery.validator.addMethod("cc305_date", function(value, element) { var noIssue = true; if ($(element).val().trim() == "") { noIssue = false; } var oldVal = $(element).val(); $(element).datepicker("setDate", $(element).datepicker("getDate")); if (oldVal != $(element).val()) { $(element).val(oldVal); noIssue = false; } return this.optional( element ) || noIssue; }); jQuery.validator.addMethod("todays_date", function(value, element) { if ($(element).val().trim() == "") { return true; } var currentVal = $(element).val(); var todayDate = $.datepicker.formatDate('m/d/y', getOrgTodayDate()); if (currentVal != todayDate) { return false; } return true; }); jQuery.validator.addMethod("valid_date", function(value, element) { if ($(element).val().trim() == "") { return true; } var parsedDate = undefined; try { parsedDate = $.datepicker.parseDate('m/d/y', $(element).val()); } catch (e) { } if (parsedDate == undefined) { return false; } return true; }); jQuery.validator.addMethod("education_history_required_instance", function(value, element) { if (!isValidationRequiredForCurrentActiveStep(element)) { return true; } var educationInstanceContent = $('.oracletaleocwsv2-step.oracletaleocwsv2-active').find('.cwsv2_education_history_instance'); var isValid = true; if (educationInstanceContent.length > 0) { $(element).closest('.oracletaleocwsv2-instance').children('.well').find('input, select, textarea').each(function(i) { if ($(this).prop('required')) { var element = this; var value = $(this).val(); if ("select" === element.nodeName.toLowerCase()) { var val = $(element).val(); isValid = (val && val.length > 0 && val != "-1") || $(element).is(":disabled"); } else { isValid = checkable(element) ? getLength(value, element) > 0 : $.trim(value).length > 0; } if (!isValid) { return false; } } }); } return isValid; }, "Required fields missing"); jQuery.validator.addMethod("work_history_required_instance", function(value, element) { if (!isValidationRequiredForCurrentActiveStep(element)) { return true; } var workInstanceContent = $('.oracletaleocwsv2-step.oracletaleocwsv2-active').find('.cwsv2_work_history_instance'); var isValid = true; if (workInstanceContent.length > 0) { $(element).closest('.oracletaleocwsv2-instance').children('.well').find('input, select, textarea').each(function(i) { if ($(this).prop('required')) { var element = this; var value = $(this).val(); if ("select" === element.nodeName.toLowerCase()) { var val = $(element).val(); isValid = (val && val.length > 0 && val != "-1") || $(element).is(":disabled"); } else { isValid = checkable(element) ? getLength(value, element) > 0 : $.trim(value).length > 0; } if (!isValid) { return false; } } }); } return isValid; }, "Required fields missing"); jQuery.validator.addMethod("residence_history_required_instance", function(value, element) { if (!isValidationRequiredForCurrentActiveStep(element)) { return true; } var residenceInstanceContent = $('.oracletaleocwsv2-step.oracletaleocwsv2-active').find('.cwsv2_residence_history_instance'); var isValid = true; if (residenceInstanceContent.length > 0) { $(element).closest('.oracletaleocwsv2-instance').children('.well').find('input, select, textarea').each(function(i) { if ($(this).prop('required')) { var element = this; var value = $(this).val(); if ("select" === element.nodeName.toLowerCase()) { var val = $(element).val(); isValid = (val && val.length > 0 && val != "-1") || $(element).is(":disabled"); } else { isValid = checkable(element) ? getLength(value, element) > 0 : $.trim(value).length > 0; } if (!isValid) { return false; } } }); } return isValid; }, "Required fields missing"); jQuery.validator.addMethod("reference_required_instance", function(value, element) { if (!isValidationRequiredForCurrentActiveStep(element)) { return true; } var referenceInstanceContent = $('.oracletaleocwsv2-step.oracletaleocwsv2-active').find('.cwsv2_reference_instance'); var isValid = true; if (referenceInstanceContent.length > 0) { isValid = validateRequiredFields(element); } return isValid; }, "Required fields missing"); jQuery.validator.addMethod("cert_and_license_required_instance", function(value, element) { if (!isValidationRequiredForCurrentActiveStep(element)) { return true; } var certInstanceContent = $('.oracletaleocwsv2-step.oracletaleocwsv2-active').find('.cwsv2_certificate_instance'); var isValid = true; if (certInstanceContent.length > 0) { isValid = validateRequiredFields(element); } return isValid; }, "Required fields missing"); var validateRequiredFields = function(element) { var isValid = true; $(element).closest('.oracletaleocwsv2-instance').children('.well').find('input, select, textarea').each(function(i) { if ($(this).prop('required')) { var element = this; var value = $(this).val(); if ("select" === element.nodeName.toLowerCase()) { var val = $(element).val(); isValid = (val && val.length > 0 && val != "-1") || $(element).is(":disabled"); } else { isValid = checkable(element) ? getLength(value, element) > 0 : $.trim(value).length > 0; } if (!isValid) { return false; } } }); return isValid; }; jQuery.validator.addMethod("cwsv2_double_entry_field_validation", function(value, element) { if (!isValidationRequiredForCurrentActiveStep(element)) { return true; } var divContainer = $(element).parent(); if (divContainer.is(':visible')) { var isChanged = divContainer.find('[id*="_CHANGED"]'); if (isChanged.val() == "true") { var isValidationValue = divContainer.find('[id*="_validated"]'); if (isValidationValue.length < 1) { var maskedId = "[id*=\"masked_\"]"; var fieldToValidate = divContainer.find(".cwsv2_double_entry_field:not('" + maskedId + "')"); var checkField = $(element).siblings("#" + $(fieldToValidate).attr('id') + "_checkField:not('" + maskedId + "')"); if (checkField.length > 0) { return $(fieldToValidate).val() == $(checkField).val(); } } } } return true; }, "Value does not match"); jQuery.validator.addMethod("cwsv2_encrypted_integer_validation", function(value, element) { if (!isValidationRequiredForCurrentActiveStep(element)) { return true; } var divContainer = $(element).parent(); if (divContainer.is(':visible')) { var isChanged = divContainer.find('[id*="_CHANGED"]'); if (isChanged.val() == "true") { var isValidationValue = divContainer.find('[id*="_validated"]'); if (isValidationValue.length < 1) { var maskedId = "[id*=\"masked_\"]"; var fieldToValidate = divContainer.find(".cwsv2_encrypted_integer:not('" + maskedId + "')"); if (fieldToValidate.length > 0) { return this.optional(fieldToValidate.get(0)) || /^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(fieldToValidate.val()); } } } } return true; }, "Enter valid number"); jQuery.validator.addMethod("cwsv2_required_checkbox_validation", function(value, element) { if (!isValidationRequiredForCurrentActiveStep(element)) { return true; } var checkboxElementContainer = $(element).parent(); if (checkboxElementContainer.is(':visible')) { var checkboxElement = $(checkboxElementContainer).find('input[type="checkbox"]'); if (checkboxElement.length > 0) { return $(checkboxElement).is(':checked'); } } return true; }, "This box must be checked"); jQuery.validator.addClassRules({ cwsv2_work_history_instance: { work_history_required_instance: true }, cwsv2_validate_rlent_date: { validate_date_no_future: true }, cwsv2_validate_rlent_date_from_to: { validate_from_less_than_to_date: true }, cwsv2_education_history_instance: { education_history_required_instance: true }, cwsv2_residence_history_instance: { residence_history_required_instance: true }, cwsv2_reference_instance: { reference_required_instance: true }, cwsv2_certificate_instance: { cert_and_license_required_instance: true }, cwsv2_double_entry_field_container: { cwsv2_double_entry_field_validation: true }, cwsv2_decimal: { number: true }, cwsv2_integer: { number: true }, cwsv2_encrypted_integer_container: { cwsv2_encrypted_integer_validation: true }, cwsv2_required_checkbox_container: { cwsv2_required_checkbox_validation: true }, cwsv2_email: { email_valid: true } }); // if element is form, use full form validation, if element is section, validate only its contents if ($(elementToValidate).is('form')) { if (!$(elementToValidate).valid()) { return false; } } else { var status = true; $(elementToValidate).find("input, select, textarea").each(function () { if (!validator.element($(this))) { status = false; } }); return status; } return true; } // Same code as in csrfInclude.jsp var TBE_OBJ ={}; TBE_OBJ.CSRF={}; TBE_OBJ.CSRF.enabled=false; TBE_OBJ.CSRF.tokenParam = '_csrf'; TBE_OBJ.CSRF.tokenValue = 'v1:;1793984605148:;834BdjpPT7HjghoE4hhB22n2/VFdG0XWUIkWCweRseQ='; TBE_OBJ.CSRF.enabled=true; var jq = $; if (typeof $ == 'undefined') { jq = jQuery; } if(typeof jq !=='undefined') { jq(document).ready(function () { appendCsrfTokenToForms(TBE_OBJ.CSRF.tokenParam, TBE_OBJ.CSRF.tokenValue,'phf.tbe.taleo.net'); }); } $('.scroll').jscroll({ nextSelector: 'a.jscroll-next:last', loadingHtml: "", callback: function(){ if(window.fbAsyncInit) { fbAsyncInit(); } } }); // if two jscroll objects on one page, they should be initialized separately $('.scroll-my-jobs').jscroll({ nextSelector: 'a.jscroll-next:last', autoTrigger: false, loadingHtml: "" }); $('.scroll-suggested-jobs').jscroll({ nextSelector: 'a.jscroll-next:last', autoTrigger: false, loadingHtml: "" }); $(function () { $('.orderbyPicker').on('change', function () { var colSelected = $(this).find("option:selected").val(); var sortSelected = $('.sortOrderbyPicker').find("option:selected").val(); location.href = colSelected + "&" + sortSelected; }); }); $(function () { $('.sortOrderbyPicker').on('change', function () { var sortSelected = $('.orderbyPicker').find("option:selected").val(); var selected = $(this).find("option:selected").val(); location.href = sortSelected + "&" + selected; }); });