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 <bgkriegel@gmail.com>

Works as described.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
Jonathan Druart 2014-03-06 17:08:37 +01:00 committed by Galen Charlton
parent 915788ff77
commit f6defdf25a
2 changed files with 6 additions and 14 deletions

View File

@ -1,3 +1,4 @@
[% USE AuthorisedValues %]
[% IF ( opduplicate ) %][% SET focusAction = "clearDupe" %][% END %]
[% USE KohaDates %]
[% INCLUDE 'doc-head-open.inc' %]
@ -958,12 +959,8 @@
<label for="sort1">
[% END %]
Sort 1: </label>
[% IF ( CGIsort1 ) %]
[% CGIsort1 %]
[% ELSE %]
<input type="text" id="sort1" name="sort1" size="20" value="[% sort1 %]" class="[% focusAction %]" />
[% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
[% END %]
[% AuthorisedValues.BuildDropbox("sort1", "Bsort1", sort1, { class => focusAction, size => 20 } ) %]
[% IF ( mandatorysort1 ) %]<span class="required">Required</span>[% END %]
</li>
[% END %]
[% UNLESS nosort2 %]
@ -974,12 +971,8 @@
<label for="sort2">
[% END %]
Sort 2: </label>
[% IF ( CGIsort2 ) %]
[% CGIsort2 %]
[% ELSE %]
<input type="text" id="sort2" name="sort2" size="20" value="[% sort2 %]" class="[% focusAction %]" />
[% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
[% END %]
[% AuthorisedValues.BuildDropbox("sort2", "Bsort2", sort2, { class => focusAction, size => 20 } ) %]
[% IF ( mandatorysort2 ) %]<span class="required">Required</span>[% END %]
</li>
[% END %]
</ol>

View File

@ -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) {