Bug 16807: Frameworks unordered in dropdown when adding/editing a biblio
authorNick Clemens <nick@bywatersolutions.com>
Fri, 24 Jun 2016 13:57:07 +0000 (09:57 -0400)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 8 Jul 2016 13:05:50 +0000 (13:05 +0000)
To test:
Start to add or edit a biblio
Open the dropdown to change framework
Notice the order
Refresh the page - notice the order changes
Apply patch
Order is alphabetical
Refresh the page
Order does not change

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as described

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

cataloguing/addbiblio.pl
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt

index f0263ef..ef7b845 100755 (executable)
@@ -746,21 +746,7 @@ if ($frameworkcode eq 'FA'){
 }
 
 
-# Getting the list of all frameworks
-# get framework list
-my $frameworks = getframeworks;
-my @frameworkcodeloop;
-foreach my $thisframeworkcode ( keys %$frameworks ) {
-       my %row = (
-               value         => $thisframeworkcode,
-               frameworktext => $frameworks->{$thisframeworkcode}->{'frameworktext'},
-       );
-       if ($frameworkcode eq $thisframeworkcode){
-               $row{'selected'} = 1;
-               }
-       push @frameworkcodeloop, \%row;
-} 
-$template->param( frameworkcodeloop => \@frameworkcodeloop,
+$template->param( frameworkcodeloop => GetFrameworksLoop( $frameworkcode ) ,
        breedingid => $breedingid );
 
 # ++ Global
index a7f5300..0dcd73e 100644 (file)
@@ -500,7 +500,7 @@ function Changefwk(FwkList) {
                         [% ELSE %]
                             <i class="fa fa-fw">&nbsp;</i>
                         [% END %]
-                        [% frameworkcodeloo.frameworktext %]
+                        [% frameworkcodeloo.description %]
                     </a>
                 </li>
             [% END %]