mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
fix to lookup of repeatable authority values; clear source input field(s) so trial value is not inadvertently added e.g. by Next button.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@4496 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -205,6 +205,7 @@ function DSpaceChoicesLoad(form)
|
||||
var isClosed = form.elements['paramIsClosed'].value == 'true';
|
||||
var contextPath = form.elements['contextPath'].value;
|
||||
var fail = form.elements['paramFail'].value;
|
||||
var valueInput = form.elements['paramValueInput'].value;
|
||||
var nonAuthority = "";
|
||||
if (form.elements['paramNonAuthority'] != null)
|
||||
nonAuthority = form.elements['paramNonAuthority'].value;
|
||||
@@ -213,12 +214,25 @@ function DSpaceChoicesLoad(form)
|
||||
if (value.length == 0)
|
||||
{
|
||||
var of = window.opener.document.getElementById(formID);
|
||||
var valueInput = form.elements['paramValueInput'].value;
|
||||
if (isName)
|
||||
value = makePersonName(of.elements[dspace_makeFieldInput(valueInput,'_last')].value,
|
||||
of.elements[dspace_makeFieldInput(valueInput,'_first')].value);
|
||||
else
|
||||
value = of.elements[valueInput].value;
|
||||
|
||||
// if this is a repeating input, clear the source value so that e.g.
|
||||
// clicking "Next" on a submit-describe page will not *add* the proposed
|
||||
// lookup text as a metadata value:
|
||||
if (isRepeating)
|
||||
{
|
||||
if (isName)
|
||||
{
|
||||
of.elements[dspace_makeFieldInput(valueInput,'_last')].value = null;
|
||||
of.elements[dspace_makeFieldInput(valueInput,'_first')].value = null;
|
||||
}
|
||||
else
|
||||
of.elements[valueInput].value = null;
|
||||
}
|
||||
}
|
||||
|
||||
// start spinner
|
||||
|
Reference in New Issue
Block a user