Avoid empty ID attribute in SELECT element
authorDan Scott <dan@coffeecode.net>
Wed, 4 May 2011 00:51:44 +0000 (20:51 -0400)
committerDan Scott <dan@coffeecode.net>
Wed, 4 May 2011 00:51:44 +0000 (20:51 -0400)
The current code appears to always generate an empty id="" attribute,
as the "id" variable never gets populated. For now, protect against
the empty ID attribute.

Signed-off-by: Dan Scott <dan@coffeecode.net>

Open-ILS/web/templates/default/opac/parts/org_selector.tt2

index aa99e91..2daf63a 100644 (file)
@@ -17,7 +17,7 @@
     #   PROCESS build_org_selector id='selector-id' name='selector-name'
     BLOCK build_org_selector;
 %]
-    <select id='[% id %]' name='[% name %]'>
+    <select [% IF id %] id='[% id %]' [% END %] name='[% name %]'>
     [% PROCESS build_org_selector_options walker=(org_unit || ctx.aou_tree) value=value %]
     </select>
 [%  END %]