From be65629194346db9c49d804dc40fdf08cb860fe0 Mon Sep 17 00:00:00 2001 From: rjy7 Date: Wed, 14 Apr 2010 21:28:10 +0000 Subject: [PATCH] NIHVIVO-377 When a custom form fails validation due to a missing organization, the server generates an error appropriate to the non-Javascript version of the form, and the Javascript then modifies it for the Javascript version of the form. --- .../webapp/edit/n3editing/PersonHasPositionValidator.java | 6 +++--- .../vitro/webapp/web/jsptags/InputElementFormattingTag.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/PersonHasPositionValidator.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/PersonHasPositionValidator.java index d46aea326..7cf1c2efa 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/PersonHasPositionValidator.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/PersonHasPositionValidator.java @@ -9,10 +9,10 @@ import com.hp.hpl.jena.rdf.model.Literal; public class PersonHasPositionValidator implements N3Validator { - private static String DUPLICATE_ERROR = "Must choose an existing organization or create a new one, not both."; - private static String MISSING_ORG_ERROR = "Must specify an organization."; + private static String DUPLICATE_ERROR = "Must select an existing organization or create a new one, not both."; + private static String MISSING_ORG_ERROR = "Must either select an existing organization or create a new one."; private static String MISSING_ORG_TYPE_ERROR = "Must select a type for the new organization."; - private static String MISSING_ORG_NAME_ERROR = "Must select a name for the new organization."; + private static String MISSING_ORG_NAME_ERROR = "Must specify a name for the new organization."; public Map validate(EditConfiguration editConfig, EditSubmission editSub){ // Map existingUris = editConfig.getUrisInScope(); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/web/jsptags/InputElementFormattingTag.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/web/jsptags/InputElementFormattingTag.java index b7d4d6aa1..1a9575394 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/web/jsptags/InputElementFormattingTag.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/web/jsptags/InputElementFormattingTag.java @@ -524,7 +524,7 @@ public class InputElementFormattingTag extends TagSupport { } if( errorStr!=null && !errorStr.equals("")) { - out.println("

"+errorStr+"

"); + out.println("

"+errorStr+"

"); } } catch (IOException ex) { log.error("Error in doStartTag: " + ex.getMessage());