Bug 11392: (follow-up) fix syntax error in template
authorGalen Charlton <gmc@esilibrary.com>
Fri, 23 May 2014 15:02:27 +0000 (15:02 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 23 May 2014 15:09:23 +0000 (15:09 +0000)
In the two FOREACH loops introduced by the patch, wrap
the module and action names with quotes.  This fixes a
problem where parsing the template crashes with the following
error:

  Template process failed: file error - parse error - .../viewlog.tt line 83: unexpected token (RETURN)
    [% FOREACH actx IN [ ADD DELETE MODIFY ISSUE RETURN CREATE ] %] at .../C4/Templates.pm line 132.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt

index 19d0321..6f49b05 100644 (file)
@@ -71,7 +71,7 @@
                                                                <label for="modules">Module:</label>
                                                                <select name="modules" id="modules" multiple="multiple">
                                                                        <option value="" selected="selected">All</option>
-                                                                        [% FOREACH modx IN [ CATALOGUING AUTHORITIES MEMBERS ACQUISITIONS SERIAL CIRCULATION LETTER FINES SYSTEMPREFERENCE ] %]
+                                                                        [% FOREACH modx IN [ 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'CIRCULATION' 'LETTER' 'FINES' 'SYSTEMPREFERENCE' ] %]
                                                                         <option value="[% modx %]">[% PROCESS translate_log_module module=modx %]</option>
                                                                         [% END %]
                                                                </select>
@@ -80,7 +80,7 @@
                                                                <label for="action">Action:</label>
                                                                <select name="action" id="action">
                                                                        <option value ="">All</option>
-                                                                        [% FOREACH actx IN [ ADD DELETE MODIFY ISSUE RETURN CREATE ] %]
+                                                                        [% FOREACH actx IN [ 'ADD' 'DELETE' 'MODIFY' 'ISSUE' 'RETURN' 'CREATE' ] %]
                                                                         <option value="[% actx %]">[% PROCESS translate_log_action action=actx %]</option>
                                                                         [% END %]
                                                                </select>