Bugzilla – Attachment 20553 Details for
Bug 10038
Doubled 'default' entry when creating a new authority type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10038: Doubled 'default' entry when creating a new authority type
Bug-10038-Doubled-default-entry-when-creating-a-ne.patch (text/plain), 3.18 KB, created by
Jonathan Druart
on 2013-08-22 13:48:07 UTC
(
hide
)
Description:
Bug 10038: Doubled 'default' entry when creating a new authority type
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-08-22 13:48:07 UTC
Size:
3.18 KB
patch
obsolete
>From e47e825c430eec0077f6d8036f2cc0d7abc7b0d3 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 17 Jul 2013 15:02:43 +0200 >Subject: [PATCH] Bug 10038: 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. >--- > admin/auth_tag_structure.pl | 3 ++- > .../intranet-tmpl/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 906f8d3..e84b459 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 fc61789..70744ff 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; > <input type="hidden" name="authtypecode" value="[% authtypecode %]" /> > Create authority framework for [% authtypecode %] using > <select name="existingauthtypecode"> >- <option value="">Default</option> > [% FOREACH existingauthtypeloo IN existingauthtypeloop %] >- <option value="[% existingauthtypeloo.value %]">[% existingauthtypeloo.authtypetext %]</option> >+ [% IF existingauthtypeloo.value == "" %] >+ <option value="" selected="selected">[% existingauthtypeloo.authtypetext %]</option> >+ [% ELSE %] >+ <option value="[% existingauthtypeloo.value %]">[% existingauthtypeloo.authtypetext %]</option> >+ [% END %] > [% END %] > </select> > <input type="submit" value="OK" class="submit" /> >@@ -211,7 +214,6 @@ return false; > <h2>Select an authority framework</h2> > <form action="[% script_name %]" method="post"> > <select name="authtypecode"> >- <option value="">Default</option> > [% FOREACH authtypeloo IN authtypeloop %] > [% IF ( authtypeloo.selected ) %] > <option value="[% authtypeloo.value %]" selected="selected">[% authtypeloo.authtypetext %]</option> >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10038
:
19719
|
20553
|
21565
|
21596