Only put db_changed into a hidden variable when the component needs it
authorKarl O. Pinc <kop@karlpinc.com>
Wed, 31 Jul 2024 18:27:10 +0000 (13:27 -0500)
committerKarl O. Pinc <kop@karlpinc.com>
Wed, 31 Jul 2024 18:27:10 +0000 (13:27 -0500)
src/pgwui_common/templates/auth_base.mak

index 0245964de8f3ca62df9e691d91622b0c7bfb80ef..098b54a11666bf754377724610be6f5428e5c001 100644 (file)
            name="csrf_token"
            value="${csrf_token}"
            />
-    % if db_changed is not None and db_changed is not UNDEFINED:
-    <%doc>This is a hack.  It should be fixed so that only double-upload
-    detecting forms unconditionally generate this element.</%doc>
-    <input type="hidden"
-           name="db_changed"
-           value="${db_changed}"
-           />
-    % endif
+    ${caller.body()}
 </%def>
 
 <%doc> All the *_row() defs take a tab_index and, as a side effect,
 <%def name="main_form(tab_index)">
   <form action="" enctype="multipart/form-data" method="post">
     <div>
-    ${self.hidden_vars(csrf_token)}
+    <%self:hidden_vars csrf_token="${csrf_token}" />
     % if (report_success or session_expired) and last_key:
       <input type="hidden"
              name="last_key"