NIHVIVO-629 Changes to grant form for autocomplete selection

This commit is contained in:
rjy7 2010-07-12 20:40:18 +00:00
parent 9cec915859
commit c8badcf64a
2 changed files with 8 additions and 4 deletions

View file

@ -190,10 +190,10 @@ PREFIX core: <${vivoCore}> SELECT ?individual WHERE {<${subjectUri}> core:hasPri
<form id="addGrantRoleToPerson" action="<c:url value="/edit/processRdfForm2.jsp"/>" >
<v:input type="text" id="label" name="grantLabel" label="Grant Name ${requiredHint}" cssClass="acSelector" size="50" />
<p><v:input type="text" id="label" name="grantLabel" label="Grant Name ${requiredHint}" cssClass="acSelector" size="50" /></p>
<div class="acSelection">
<p class="inline"><label></label><span class="acSelectionInfo"></span></p>
<p class="inline"><label>Selected Grant:</label><span class="acSelectionInfo"></span><a href="<c:url value="/individual?uri=" />" class="verifyMatch">(Verify this match)</a></p>
<%-- bdc34: for some odd reason id and name should not be grant in this input element. --%>
<input type="hidden" id="grant" name="grant" class="acReceiver" value="" /> <!-- Field value populated by JavaScript -->
</div>

View file

@ -226,7 +226,11 @@ var customForm = {
this.acSelectorWrapper.hide();
this.acSelector.attr('disabled', 'disabled');
this.acSelection.find('label').html('Selected ' + this.getSelectedTypeName() + ':');
// If only one form step, type is pre-selected, and this label is coded in the html.
if (this.formSteps > 1) {
this.acSelection.find('label').html('Selected ' + this.getSelectedTypeName() + ':');
}
this.acSelection.show();
this.acReceiver.val(uri);