VIVO-400, VIVO-398 and VIVO-399

This commit is contained in:
tworrall 2013-10-22 16:57:42 -04:00
parent 2d728af10b
commit 3ac664dd7e
4 changed files with 158 additions and 88 deletions

View file

@ -25,6 +25,7 @@ var advisorRelUtils = {
this.form = $('#personHasAdvisingRelationship');
this.adRelshiplabel = $('#advisingRelLabel');
this.advisee = $('#advisee');
this.fauxLabel = $('#maskLabelBuilding');
this.subjArea = $('#SubjectArea');
this.firstName = $('#firstName');
this.lastName = $('#lastName');
@ -56,6 +57,7 @@ var advisorRelUtils = {
this.form.submit(function() {
advisorRelUtils.resolveAdviseeNames();
advisorRelUtils.buildAdvisingRelLabel();
});
},
@ -75,9 +77,16 @@ var advisorRelUtils = {
lastName = this.advisee.val();
name = lastName;
if (firstName) {
name += ', ' + firstName;
}
// we don't want the user to see the label getting built, so hide the acSelector
// field and display a bogus field that just has the last name in it.
this.fauxLabel.val(lastName);
this.advisee.hide();
this.fauxLabel.show();
this.advisee.val(name);
this.lastName.val(lastName);
}

View file

@ -124,6 +124,7 @@ Set this flag on the input acUriReceiver where you would like this behavior to o
<p >
<label for="advisee">${i18n().advisee_capitalized}: ${i18n().last_name} ${requiredHint}<span style="padding-left:322px">${i18n().first_name} ${requiredHint}</span></label>
<input class="acSelector" size="50" type="text" acGroupName="advisee" id="advisee" name="adviseeLabel" value="${adviseeLabelValue}" >
<input type="text" size="50" id="maskLabelBuilding" name="maskLabelBuilding" value="" style="display:none" >
<input size="30" type="text" id="firstName" name="firstName" value="${firstNameValue}" ><br />
<input type="hidden" id="lastName" name="lastName" value="">
<input class="display" type="hidden" acGroupName="advisee" id="adviseeDisplay" name="adviseeLabelDisplay" value="${adviseeLabelDisplayValue}" >