From 7f27c12fce3cc63e7e0b0566b3d3a822b3536b2d Mon Sep 17 00:00:00 2001 From: rjy7 Date: Sat, 24 Jul 2010 20:24:16 +0000 Subject: [PATCH] Merge r1133 from http://svn.mannlib.cornell.edu/svn/vivo/branches/rel-1.1-maint --- .../edit/forms/addGrantRoleToPerson.jsp | 39 +++++++++++-------- .../edit/forms/addRoleToPersonTwoStage.jsp | 18 ++++++--- .../js/customFormWithAdvanceTypeSelection.js | 10 ----- 3 files changed, 36 insertions(+), 31 deletions(-) diff --git a/productMods/edit/forms/addGrantRoleToPerson.jsp b/productMods/edit/forms/addGrantRoleToPerson.jsp index 206e9410..7d6298d1 100644 --- a/productMods/edit/forms/addGrantRoleToPerson.jsp +++ b/productMods/edit/forms/addGrantRoleToPerson.jsp @@ -58,9 +58,6 @@ This is intended to create a set of statements like: -<%-- grantLabel is required if we are doing an update --%> -<%= request.getAttribute("objectUri")== null?"":"\"nonempty\"," %> - <% // set role type based on predicate String subjectName = ((Individual) request.getAttribute("subject")).getName(); if ( ((String)request.getAttribute("predicateUri")).endsWith("hasPrincipalInvestigatorRole") ) { %> @@ -76,6 +73,22 @@ if ( ((String)request.getAttribute("predicateUri")).endsWith("hasPrincipalInvest Investigator investigator entry for <%= subjectName %> <% } %> + + + "> + + + + + + + + + + + + + @@ -264,18 +277,6 @@ PREFIX core: <${vivoCore}> - - "> - - - - - - - - - -

${formHeading}

@@ -285,8 +286,14 @@ PREFIX core: <${vivoCore}> <%-- DO NOT CHANGE IDS, CLASSES, OR HTML STRUCTURE IN THIS FORM WITHOUT UNDERSTANDING THE IMPACT ON THE JAVASCRIPT! --%>
" > -

+

+ <%-- Store this value in a hidden field, because the displayed field is disabled and don't submit. This ensures that when + returning from a validation error, we retain the value. --%> + + + +

(Verify this match)

<%-- Field value populated by JavaScript --%> diff --git a/productMods/edit/forms/addRoleToPersonTwoStage.jsp b/productMods/edit/forms/addRoleToPersonTwoStage.jsp index c6c9a712..d8032647 100644 --- a/productMods/edit/forms/addRoleToPersonTwoStage.jsp +++ b/productMods/edit/forms/addRoleToPersonTwoStage.jsp @@ -149,7 +149,7 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp. <%-- label and type required if we are doing an add or a repair, but not an edit --%> <%= (mode == 1 || mode == 3) ?"\"nonempty\"," : "" %> -<%= (mode == 1 || mode == 3) ?"\"nonempty\"," : "" %> +<%= (mode == 1 || mode == 3) ?"\"nonempty\"" : "" %> <%-- @@ -259,7 +259,7 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp. "urisInScope" : { "inverseRolePredicate" : "${inversePredicate}" }, "literalsInScope": { }, "urisOnForm" : [ "roleActivity", "roleActivityType" ], - "literalsOnForm" : [ "activityLabel", "roleLabel", "startYear", "endYear", "existingActivityLabel" ], + "literalsOnForm" : [ "activityLabel", "roleLabel", "startYear", "endYear" ], "filesOnForm" : [ ], "sparqlForLiterals" : { }, "sparqlForUris" : { }, @@ -377,11 +377,13 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp. "> + + @@ -393,16 +395,22 @@ public static Log log = LogFactory.getLog("edu.cornell.mannlib.vitro.webapp.jsp. <% }else{ %>

${titleText} ${roleActivityTypeLabel} entry for <%= subjectName %>

- <%-- DO NOT CHANGE IDS, CLASSES, OR HTML STRUCTURE IN THIS FORM WITHOUT UNDERSTANDING THE IMPACT ON THE JAVASCRIPT! --%> " > -

+

-

+

+ <%-- Store these values in hidden fields, because the displayed fields are disabled and don't submit. This ensures that when + returning from a validation error, we retain the values. --%> + + + + +
<%-- RY maybe make this a label and input field. See what looks best. --%>

(Verify this match)

diff --git a/productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js b/productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js index cbcf01c7..712be1dc 100644 --- a/productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js +++ b/productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js @@ -136,10 +136,6 @@ var customForm = { }, initFormFullView: function() { - - if (this.editMode == 'edit') { - this.initFormEditView(); - } this.setType(); this.fullViewOnly.show(); @@ -182,12 +178,6 @@ var customForm = { }, - initFormEditView: function() { - // These are not editable: only properties of the role are editable. - this.typeSelector.attr('disabled', 'disabled'); - this.relatedIndLabel.attr('disabled', 'disabled'); - }, - // Bind event listeners that persist over the life of the page. Event listeners // that depend on the view should be initialized in the view setup method. bindEventListeners: function() {