Fix for Bug 6458 - incorrect parsing result in translation processing
authorOwen Leonard <oleonard@myacpl.org>
Tue, 13 Sep 2011 13:33:05 +0000 (09:33 -0400)
committerChris Cormack <chrisc@catalyst.net.nz>
Tue, 13 Sep 2011 22:09:15 +0000 (10:09 +1200)
Fixing improperly nested template logic inside HTML tags in
CSV profiles template

Also fixing improperly scoped template variable which prevented
the current profile from being preselected under the edit tab.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt

index 7432bf6..f3c5192 100644 (file)
@@ -101,7 +101,11 @@ function reloadPage(p) {
                                                    <li><label for="new_encoding">Encoding: </label>
                                                    <select name="encoding" id="new_encoding">
                                                        [% FOREACH encoding IN encodings %]
-                                                           <option[% IF ( encoding == 'utf8' ) %] selected="selected" [% END %]>[% encoding.encoding %]</option>
+                                                               [% IF ( encoding == 'utf8' ) %]
+                                                                       <option selected="selected">[% encoding.encoding %]</option>
+                                                               [% ELSE %]
+                                                                       <option>[% encoding.encoding %]</option>
+                                                               [% END %]
                                                        [% END %]
                                                    </select></li>
 
@@ -129,7 +133,7 @@ function reloadPage(p) {
                                                    <select id="modify_profile_name" name="profile_name" onchange="javascript:reloadPage(this)">
                                                        <option value="0">-- Choose One --</option>
                                                        [% FOREACH existing_profile IN existing_profiles %]
-                                                       [% IF ( export_format_id == selected_profile_id ) %]
+                                                       [% IF ( existing_profile.export_format_id == selected_profile_id ) %]
                                                        <option value="[% existing_profile.export_format_id %]" selected="selected">[% existing_profile.profile %]</option>
                                                        [% ELSE %]
                                                        <option value="[% existing_profile.export_format_id %]">[% existing_profile.profile %]</option>
@@ -231,7 +235,6 @@ function reloadPage(p) {
                                                    <select name="subfield_separator" id="subfield_separator">
                                 <option value=":">Colon (:)</option>
 
-
                                 [% IF ( selected_subfield_separator == ',' ) %]
                                 <option value="," selected="selected">Comma (,)</option>
                                 [% ELSE %]