Use table row abstractions
authorKarl O. Pinc <kop@karlpinc.com>
Sat, 3 Aug 2024 21:15:40 +0000 (16:15 -0500)
committerKarl O. Pinc <kop@karlpinc.com>
Sat, 3 Aug 2024 21:15:40 +0000 (16:15 -0500)
src/pgwui_copy/templates/copy.mak

index 1b638d04fd753146df84a17e4955174e1fec8ffa..2e6d622d13fb36570339359046c641d30a4d2fa7 100644 (file)
 
 <%def name="schema_row(tab_index)">
   <tr>
-    <td class="label">
-      <label for="schema_id">Schema To Copy:</label>
-    </td>
-    <td>
+    <%self.lib:td_label for_id="schema_id">Schema To Copy</%self.lib:td_label>
+    <%self.lib:td_input tab_index="${tab_index}">
       <input id="schema_id"
              name="schema"
              tabindex="${tab_index.val}"
              size="30"
              value="${schema}"
              />
-    </td>
+    </%self.lib:td_input>
   </tr>
-  <% tab_index.inc() %>
 </%def>
 
 <%def name="from_db_row(tab_index)">
   <tr>
-    <td class="label">
-      <label for="from_db_id">From Database:</label>
-    </td>
-    <td>
+    <%self.lib:td_label for_id="from_db_id">From Database</%self.lib:td_label>
+    <%self.lib:td_input tab_index="${tab_index}">
       <input id="from_db_id"
              name="from_db"
              tabindex="${tab_index.val}"
              size="30"
              value="${from_db}"
              />
-    </td>
+    </%self.lib:td_input>
   </tr>
-  <% tab_index.inc() %>
 </%def>
 
 <%def name="to_db_row(tab_index)">
   <tr>
-    <td class="label">
-      <label for="to_db_id">To Database:</label>
-    </td>
-    <td>
+    <%self.lib:td_label for_id="to_db_id">To Database</%self.lib:td_label>
+    <%self.lib:td_input tab_index="${tab_index}">
       <input id="to_db_id"
              name="to_db"
              tabindex="${tab_index.val}"
              size="30"
              value="${to_db}"
              />
-    </td>
+    </%self.lib:td_input>
   </tr>
-  <% tab_index.inc() %>
 </%def>
 
 <%def name="overwrite_row(tab_index)">
   <tr>
-    <td class="label">
-      <label for="overwrite_id">Overwrite destination schema<span
-                                style="caution">*</span>:</label>
-    </td>
-    <td>
+    <%self.lib:td_label for_id="overwrite_id">
+      Overwrite destination schema<span style="caution">*</span>
+    </%self.lib:td_label>
+    <%self.lib:td_input tab_index="${tab_index}">
       <input name="overwrite"
              tabindex="${tab_index.val}"
              id="overwrite_id"
              type="checkbox"
              ${overwrite | n}
              />
-    </td>
+    </%self.lib:td_input>
   </tr>
-  <% tab_index.inc() %>
 </%def>
 
 <%def name="force_row(tab_index)">
   <tr>
-    <td class="label">
-      <label for="force_id">Allow Copy To Sensitive DBs:</label>
-      </td>
-    <td>
+    <%self.lib:td_label for_id="force_id">
+      Allow Copy To Sensitive DBs
+    </%self.lib:td_label>
+    <%self.lib:td_input tab_index="${tab_index}">
       <input name="force"
              tabindex="${tab_index.val}"
              id="force_id"
              type="checkbox"
              ${force | n}
               />
-    </td>
+    </%self.lib:td_input>
   </tr>
-  <% tab_index.inc() %>
 </%def>
 
 <%block name="page_heading">