From 609dd4ba45dd15f93e41a8a1300548a5059a87b0 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 17 Jul 2013 15:02:43 +0200 Subject: [PATCH] Bug 10038: fix doubled 'default' entry when creating a new authority type Test plan: - Create a new authority type - Click MARC structure - Verify the pull down has only 1 entry for Default - Go on the authority type home (admin/authtypes.pl) - Click on the "MARC structure" link for the default type - Verify the pull down has only 1 entry for Default This patch adds a sort (on the authtypecode) for these 2 lists. Signed-off-by: Bernardo Gonzalez Kriegel Comment: Works as described. No koha-qa errors. When creating a new framework it would be better to have Default on top, but one is way better than two :) Signed-off-by: Katrin Fischer Agreed, one is better than two :) All tests and QA script pass. Signed-off-by: Galen Charlton (cherry picked from commit b04118df82a20eeec71bfb99349ab28943011c42) Signed-off-by: Tomas Cohen Arazi --- admin/auth_tag_structure.pl | 3 ++- .../prog/en/modules/admin/auth_tag_structure.tt | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/admin/auth_tag_structure.pl b/admin/auth_tag_structure.pl index 906f8d3e82..e84b45959a 100755 --- a/admin/auth_tag_structure.pl +++ b/admin/auth_tag_structure.pl @@ -57,7 +57,7 @@ my ($template, $loggedinuser, $cookie) # get authtype list my $authtypes = getauthtypes; my @authtypesloop = (); -foreach my $thisauthtype ( keys %{$authtypes} ) { +foreach my $thisauthtype ( sort keys %{$authtypes} ) { push @authtypesloop, { value => $thisauthtype, selected => $thisauthtype eq $authtypecode, @@ -209,6 +209,7 @@ if ($op eq 'add_form') { push @existingauthtypeloop,\%line; } } + @existingauthtypeloop = sort { lc($a->{authtypetext}) cmp lc($b->{authtypetext}) }@existingauthtypeloop; $template->param(existingauthtypeloop => \@existingauthtypeloop, authtypecode => $authtypecode, ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt index fc617893c5..70744ff529 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_tag_structure.tt @@ -192,9 +192,12 @@ return false; Create authority framework for [% authtypecode %] using @@ -211,7 +214,6 @@ return false;

Select an authority framework