Bug 26988: (follow-up) Adjust code to use api field names

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 4388d20fb1)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
This commit is contained in:
Nick Clemens 2020-11-11 02:53:46 +00:00 committed by Andrew Fuerste-Henry
parent 22b314a97c
commit d8f4c896fb
1 changed files with 3 additions and 3 deletions

View File

@ -308,12 +308,12 @@ $(document).ready(function() {
success: function( data ){
var dropdown = "";
$.each(data, function(index,library) {
if( preselected == library.branchcode ){
if( preselected == library.library_id ){
selected = ' selected="selected" ';
} else { selected = ""; }
dropdown += '<option value="'+library.branchcode+'"'+selected+'>'+library.branchname+'</option>';
dropdown += '<option value="'+library.library_id+'"'+selected+'>'+library.name+'</option>';
});
this_dropdown.html( dropdown);
this_dropdown.html(dropdown);
this_dropdown.data("loaded",1);
$(".loading_"+hold_id).hide();
},