Do not use a for= id on a label without an input element
authorKarl O. Pinc <kop@karlpinc.com>
Sun, 29 Sep 2024 21:03:48 +0000 (16:03 -0500)
committerKarl O. Pinc <kop@karlpinc.com>
Sun, 29 Sep 2024 21:03:48 +0000 (16:03 -0500)
src/pgwui_common/templates/auth_base.mak

index 7217d0bcb74b33cab343c7506ea2af6110241998..35c87ed0f1a25547d4753b2de34b9f0868981fb7 100644 (file)
 
 <%def name="user_row(tab_index, havecreds, user)">
       <tr>
-        <%self.lib:td_label for_id="user_id">Username</%self.lib:td_label>
-          % if havecreds:
-            <%self.lib:td_input tab_index="${tab_index}" tab_inc="${0}">
-              <span id="user_id">${user}</span>
-            </%self.lib:td_input>
-          % else:
-            <%self.lib:td_input tab_index="${tab_index}">
-              <input name="user"
-                     tabindex="${tab_index.val}"
-                     id="user_id"
-                     type="text"
-                     size="30"
-                     value=""
-                     />
-            </%self.lib:td_input>
-          % endif
+        % if havecreds:
+          <%self.lib:td_label>Username</%self.lib:td_label>
+          <%self.lib:td_input tab_index="${tab_index}" tab_inc="${0}">
+            <span id="user_id">${user}</span>
+          </%self.lib:td_input>
+        % else:
+          <%self.lib:td_label for_id="user_id">Username</%self.lib:td_label>
+          <%self.lib:td_input tab_index="${tab_index}">
+            <input name="user"
+                   tabindex="${tab_index.val}"
+                   id="user_id"
+                   type="text"
+                   size="30"
+                   value=""
+                   />
+          </%self.lib:td_input>
+        % endif
       </tr>
 </%def>