From 7f7b302fbbcff487e0ca571566132949006717b5 Mon Sep 17 00:00:00 2001 From: rjy7 Date: Thu, 15 Jul 2010 14:25:42 +0000 Subject: [PATCH] NIHVIVO-797 In roles form, re-enable disabled fields on submit because they are required in the edit config. --- .../edit/forms/js/customFormWithAdvanceTypeSelection.js | 7 +++++++ productMods/templates/entity/roleShortView.jsp | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js b/productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js index d020461e..44d7766b 100644 --- a/productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js +++ b/productMods/edit/forms/js/customFormWithAdvanceTypeSelection.js @@ -132,6 +132,13 @@ var customForm = { // These should not be editable: only properties of the role are editable. this.typeSelector.attr('disabled', 'disabled'); this.relatedIndLabel.attr('disabled', 'disabled'); + + this.form.submit(function() { + // Re-enable these fields so they get submitted, since they are required + // in the edit config. + customForm.typeSelector.attr('disabled', ''); + customForm.relatedIndLabel.attr('disabled', ''); + }); }, // Bind event listeners that persist over the life of the page. diff --git a/productMods/templates/entity/roleShortView.jsp b/productMods/templates/entity/roleShortView.jsp index 34dfa168..9b0df1b0 100644 --- a/productMods/templates/entity/roleShortView.jsp +++ b/productMods/templates/entity/roleShortView.jsp @@ -11,8 +11,9 @@ personToRolePredicate: URI of the person to role predicate. roleToPersonPredicate: URI of the role to person predicate. roleActivityToRolePredicate: URI of the activity to role predicate. - roleLabelForPerson: human readable label for person when viewing from non-person side of role. Some short views - don't specify this value because the role name is displayed instead. + roleLabelForPerson: human readable label for person when viewing from non-person side of role. Most short views + don't specify this value because the role name is displayed instead. Grant-related short views specify + this value because there is no specific role name. roleActivityLabel: human readable label of activity used for error messages --%>