[Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 5540, editing slip news changes to librarian interface

Nicole Engard nengard at bywatersolutions.com
Fri Dec 24 19:39:13 CET 2010


From: Owen Leonard <oleonard at myacpl.org>

The script checks for a language-specific OPAC message and, if none
is found, preselects none of the "display location" options. This
results in the first item in the <select> behing highlighted by
default, "Librarian interface." If we want to select "slip," we
must add an explicit check for it.

Signed-off-by: Nicole Engard <nengard at bywatersolutions.com>
---
 .../prog/en/modules/tools/koha-news.tmpl           |    2 +-
 tools/koha-news.pl                                 |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tmpl
index eb73bd2..342e51b 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tmpl
@@ -55,7 +55,7 @@ Edit News Item<!-- TMPL_ELSE -->Add News Item<!-- /TMPL_IF --><!-- TMPL_ELSE -->
             <label for="lang">Display Location</label>
             <select id="lang" name="lang">
                 <option value="koha">Librarian interface</option>
-		<option value="slip">Slip</option>
+                <!-- TMPL_IF NAME="slip" --><option value="slip" selected="selected">Slip</option><!-- TMPL_ELSE --><option value="slip">Slip</option><!-- /TMPL_IF -->
                 <!-- TMPL_LOOP name="lang_list" -->
                     <!-- TMPL_IF name="selected" --><option value="<!-- TMPL_VAR name="language" -->" selected="selected">OPAC (<!-- TMPL_VAR name="language" -->)</option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR name="language" -->">OPAC (<!-- TMPL_VAR name="language" -->)</option><!-- /TMPL_IF -->
                 <!-- /TMPL_LOOP -->
diff --git a/tools/koha-news.pl b/tools/koha-news.pl
index ff4a32f..2451934 100755
--- a/tools/koha-news.pl
+++ b/tools/koha-news.pl
@@ -74,6 +74,7 @@ my $op = $cgi->param('op');
 if ( $op eq 'add_form' ) {
     $template->param( add_form => 1 );
     if ($id) {
+        if($new_detail->{lang} eq "slip"){ $template->param( slip => 1); }
         $template->param( 
             op => 'edit',
             id => $new_detail->{'idnew'}
-- 
1.5.6.5



More information about the Koha-patches mailing list