[Koha-patches] [PATCH] Fix for Bug 6306 - It is not possible edit news

Owen Leonard oleonard at myacpl.org
Fri May 20 21:39:50 CEST 2011


---
 .../prog/en/modules/tools/koha-news.tt             |   12 ++++++------
 tools/koha-news.pl                                 |    2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt
index 19242ed..57a545e 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt
@@ -82,11 +82,11 @@ Edit News Item[% ELSE %]Add News Item[% END %][% ELSE %]News[% END %]</div>
             </li>
             <li>
                 <label for="title">Title</label>
-                <input id="title" size="30" type="text" name="title" value="[% title %]" />
+                <input id="title" size="30" type="text" name="title" value="[% new_detail.title %]" />
             </li>
             <li>
                 <label for="timestamp">Publication date</label>
-                <input id="timestamp" type="text" name="timestamp" size="15" value="[% timestamp %]" />
+                <input id="timestamp" type="text" name="timestamp" size="15" value="[% new_detail.timestamp %]" />
                 <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="timestampButton" style="cursor: pointer;" />
                 <script type="text/javascript">
                     Calendar.setup(
@@ -101,7 +101,7 @@ Edit News Item[% ELSE %]Add News Item[% END %][% ELSE %]News[% END %]</div>
             </li>
             <li>
                 <label for="expirationdate">Expiration date</label>
-                <input id="expirationdate" type="text" name="expirationdate" size="15" value="[% expirationdate %]" />
+                <input id="expirationdate" type="text" name="expirationdate" size="15" value="[% new_detail.expirationdate %]" />
                 <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="openCalendar" style="cursor: pointer;" />
                 <script type="text/javascript">
                     Calendar.setup(
@@ -116,14 +116,14 @@ Edit News Item[% ELSE %]Add News Item[% END %][% ELSE %]News[% END %]</div>
             </li>
             <li>
                 <label for="number">Appear in position </label>
-                [% IF ( number ) %]
-                    <input id="number" size="3" name="number" type="text" checked="checked" value="[% number %]" />
+                [% IF ( new_detail.number ) %]
+                    <input id="number" size="3" name="number" type="text" checked="checked" value="[% new_detail.number %]" />
                 [% ELSE %]
                     <input id="number" size="3" name="number" type="text" />
                 [% END %]
             </li>
             <li><label for="new">News</label>
-            <textarea name="new" id="new"  cols="75" rows="10">[% new %]</textarea></li>
+            <textarea name="new" id="new"  cols="75" rows="10">[% new_detail.new %]</textarea></li>
             </ol>
 			</fieldset>
   
diff --git a/tools/koha-news.pl b/tools/koha-news.pl
index 2451934..afc5268 100755
--- a/tools/koha-news.pl
+++ b/tools/koha-news.pl
@@ -79,7 +79,7 @@ if ( $op eq 'add_form' ) {
             op => 'edit',
             id => $new_detail->{'idnew'}
         );
-        $template->param($new_detail);
+        $template->{VARS}->{'new_detail'} = $new_detail;
     }
     else {
         $template->param( op => 'add' );
-- 
1.7.3



More information about the Koha-patches mailing list