From f6defdf25acb6c7be9c25f8e18e5126e5bb0874c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 6 Mar 2014 17:08:37 +0100 Subject: [PATCH] Bug 766: Use the new plugin to generate sort dropdown list - memberentry Now we can use the method plugin from the memberentry form. Test plan: 1/ Create a patron and verify sort1 and sort2 dropdown list are correctly generated. 2/ Select values. 3/ Save. 4/ Edit the patron and verify the selected values are displayed. Signed-off-by: Bernardo Gonzalez Kriegel Works as described. Signed-off-by: Katrin Fischer Signed-off-by: Galen Charlton --- .../prog/en/modules/members/memberentrygen.tt | 17 +++++------------ members/memberentry.pl | 3 +-- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index 694432e960..c4d0c6a114 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -1,3 +1,4 @@ +[% USE AuthorisedValues %] [% IF ( opduplicate ) %][% SET focusAction = "clearDupe" %][% END %] [% USE KohaDates %] [% INCLUDE 'doc-head-open.inc' %] @@ -958,12 +959,8 @@ - [% IF ( CGIsort1 ) %] - [% CGIsort1 %] - [% ELSE %] - - [% IF ( mandatorysort1 ) %]Required[% END %] - [% END %] + [% AuthorisedValues.BuildDropbox("sort1", "Bsort1", sort1, { class => focusAction, size => 20 } ) %] + [% IF ( mandatorysort1 ) %]Required[% END %] [% END %] [% UNLESS nosort2 %] @@ -974,12 +971,8 @@ - [% IF ( CGIsort2 ) %] - [% CGIsort2 %] - [% ELSE %] - - [% IF ( mandatorysort2 ) %]Required[% END %] - [% END %] + [% AuthorisedValues.BuildDropbox("sort2", "Bsort2", sort2, { class => focusAction, size => 20 } ) %] + [% IF ( mandatorysort2 ) %]Required[% END %] [% END %] diff --git a/members/memberentry.pl b/members/memberentry.pl index ff92447533..3b042e3d94 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -630,9 +630,8 @@ $template->param( sort1 => $data{'sort1'}); # shouldn't this be in an "else" st $CGIsort = buildCGIsort("Bsort2","sort2",$data{'sort2'}); if ($CGIsort) { $template->param(CGIsort2 => $CGIsort); -} else { - $template->param( sort2 => $data{'sort2'}); } +$template->param( sort2 => $data{'sort2'}); if ($nok) { foreach my $error (@errors) { -- 2.39.5