VIVO627 submission validation for default template for multiple content types fixed to check for number of content types

This commit is contained in:
hudajkhan 2013-12-09 11:03:58 -05:00
parent b0c0c71cdb
commit 1ee2f64f13

View file

@ -905,9 +905,11 @@ var pageManagementUtils = {
validationErrorMsg = pageManagementUtils.selectContentType + " <br /> "; validationErrorMsg = pageManagementUtils.selectContentType + " <br /> ";
} else { } else {
//If there are multiple content types, and the default template option is selected, then display error message //If there are multiple content types, and the default template option is selected, then display error message
var selectedTemplateValue = $('input:radio[name=selectedTemplate]:checked').val(); if(pageContentSections.length > 1) {
if(selectedTemplateValue == "default") { var selectedTemplateValue = $('input:radio[name=selectedTemplate]:checked').val();
validationErrorMsg += pageManagementUtils.multipleContentWithDefaultTemplateError; if(selectedTemplateValue == "default") {
validationErrorMsg += pageManagementUtils.multipleContentWithDefaultTemplateError + "<br/>";
}
} }
//For each, based on type, validate if a validation function exists //For each, based on type, validate if a validation function exists
$.each(pageContentSections, function(i) { $.each(pageContentSections, function(i) {