Bug 7180: (follow-up) fix getAuthValueDropbox should display the selected value

If the no AV match the name/category or if no category is defined, the
input field should contain the value.

Signed-off-by: Pierre Angot <tredok.pierre@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
Jonathan Druart 2013-03-20 12:32:07 +01:00 committed by Galen Charlton
parent 2f2d7b9368
commit f87f2579d2
1 changed files with 2 additions and 2 deletions

View File

@ -216,7 +216,7 @@ function calcNewsuggTotal(){
function getAuthValueDropbox( name, cat, destination, selected ) {
if (cat == null || cat == "") {
$(destination).replaceWith(' <input type="text" name="' + name + '" />' );
$(destination).replaceWith(' <input type="text" name="' + name + '" value="' + selected + '" />' );
return;
}
$.ajax({
@ -229,7 +229,7 @@ function getAuthValueDropbox( name, cat, destination, selected ) {
async: false,
success: function(data){
if(data === "0"){
$(destination).replaceWith(' <input type="text" name="' + name + '" />' );
$(destination).replaceWith(' <input type="text" name="' + name + '" value="' + selected + '" />' );
}else{
$(destination).replaceWith(data);
}