[Koha-patches] [PATCH] Fix for Bug 6458 - incorrect parsing result in translation processing

Owen Leonard oleonard at myacpl.org
Tue Sep 13 16:08:25 CEST 2011


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.
---
 .../prog/en/modules/tools/csv-profiles.tt          |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt
index 7432bf6..f3c5192 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt
@@ -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 %]
-- 
1.7.3



More information about the Koha-patches mailing list