From cb14df3cf7e90f53e9d3f158dde3321a73d17d4d Mon Sep 17 00:00:00 2001 From: rjy7 Date: Wed, 21 Jul 2010 14:20:03 +0000 Subject: [PATCH] Merge r967 from http://svn.mannlib.cornell.edu/svn/vivo/branches/rel-1.1-maint --- .../js/customFormWithAdvanceTypeSelection.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js b/productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js index fc332933..6340f98c 100644 --- a/productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js +++ b/productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js @@ -85,13 +85,16 @@ var customForm = { initFormView: function() { - var typeVal = this.typeSelector.val(); - - if (this.findValidationErrors()) { - this.initFormWithValidationErrors(); - //this.initFormFullView(); + var typeVal = this.typeSelector.val(); + + // Put this case first, because in edit mode with + // validation errors we just want initFormFullView. + if (this.editMode == 'edit') { + this.initFormFullView(); + } + else if (this.findValidationErrors()) { + this.initFormWithValidationErrors(); } - // this.formSteps == 1 includes edit mode. // If type is already selected when the page loads (Firefox retains value // on a refresh), go directly to full view. Otherwise user has to reselect // twice to get to full view.