Merge branch 'b-3.6.1' of ../kivitendo-erp_20220811
[kivitendo-erp.git] / templates / webpages / fu / add_edit.html
index e3b3191..3a6f126 100644 (file)
@@ -7,7 +7,7 @@
    $(function(){ document.Form.subject.focus(); });
  </script>
 
- <form action="fu.pl" method="post" name="Form">
+ <form action="fu.pl" method="post" name="Form" id="form">
 
   [%- IF SAVED_MESSAGE %]
   <p>[% SAVED_MESSAGE %]</p>
@@ -18,8 +18,7 @@
   <input type="hidden" name="callback" value="[% HTML.escape(callback) %]">
   <input type="hidden" name="POPUP_MODE" value="[% HTML.escape(POPUP_MODE) %]">
 
-  <p>
-   <table>
+  <table>
     <tr>
      <td valign="top">[% 'Follow-Up for user' | $T8 %]</td>
      <td valign="top">
@@ -48,9 +47,9 @@
      <td valign="right" align="top">[% 'Body' | $T8 %]</td>
      <td align="top"><textarea cols="50" rows="10" name="body">[% HTML.escape(body) %]</textarea></td>
     </tr>
-   </table>
-  </p>
+  </table>
 
+ [%- IF POPUP_MODE %]
   <p>
    <input type="hidden" name="action" value="dispatcher">
    <input type="submit" class="submit" name="action_save" value="[% 'Save' | $T8 %]">
    <input type="submit" class="submit" name="action_finish" value="[% 'Finish' | $T8 %]">
    <input type="submit" class="submit" name="action_delete" value="[% 'Delete' | $T8 %]">
    [%- END %]
-   [%- IF POPUP_MODE %]
    <input type="submit" class="submit" onclick="window.close()" value="[% 'Cancel' | $T8 %]">
-   [%- END %]
   </p>
 
-  [%- IF POPUP_MODE %]
-  [%- IF FOLLOW_UPS.size %]
+  [%- IF FOLLOW_UPS_PENDING.size %]
   <hr height="3" noshade>
 
   <h2>[% 'Existing pending follow-ups for this item' | $T8 %]</h2>
 
-  <p>
-   <table>
+  <table>
     <tr>
      <th class="listheading">[% 'Follow-Up Date' | $T8 %]</th>
      <th class="listheading">[% 'Subject' | $T8 %]</th>
@@ -78,7 +73,7 @@
      <th class="listheading">[% 'Follow-up for' | $T8 %]</th>
     </tr>
 
-    [%- FOREACH row = FOLLOW_UPS %]
+    [%- FOREACH row = FOLLOW_UPS_PENDING %]
     <tr class="listrow[% loop.count % 2 %]">
      <td valign="top">[% HTML.escape(row.follow_up_date) %]</td>
      <td valign="top"><a href="fu.pl?action=edit&id=[% HTML.escape(row.id) %][% IF POPUP_MODE %]&POPUP_MODE=1[% END %]">[% HTML.escape(row.subject) %]</a></td>
      <td valign="top">[% HTML.escape(row.created_for_user_name) %]</td>
     </tr>
     [%- END %]
-   </table>
-  </p>
+  </table>
   [%- END %]
+
+  [%- IF FOLLOW_UPS_DONE.size %]
+  <hr height="3" noshade>
+
+  <h2>[% 'Existing finished follow-ups for this item' | $T8 %]</h2>
+
+  <table>
+    <tr>
+     <th class="listheading">[% 'Follow-Up Date' | $T8 %]</th>
+     <th class="listheading">[% 'Subject' | $T8 %]</th>
+     <th class="listheading">[% 'Created by' | $T8 %]</th>
+     <th class="listheading">[% 'Follow-up for' | $T8 %]</th>
+    </tr>
+
+    [%- FOREACH row = FOLLOW_UPS_DONE %]
+    <tr class="listrow[% loop.count % 2 %]">
+     <td valign="top">[% HTML.escape(row.follow_up_date) %]</td>
+     <td valign="top"><a href="fu.pl?action=edit&id=[% HTML.escape(row.id) %][% IF POPUP_MODE %]&POPUP_MODE=1[% END %]">[% HTML.escape(row.subject) %]</a></td>
+     <td valign="top">[% HTML.escape(row.created_by_name) %]</td>
+     <td valign="top">[% HTML.escape(row.created_for_user_name) %]</td>
+    </tr>
+    [%- END %]
+  </table>
   [%- END %]
 
+ [%- END %]
+
   [%- FOREACH row = LINKS %]
   <input type="hidden" name="trans_id_[% loop.count %]"   value="[% HTML.escape(row.trans_id) %]">
   <input type="hidden" name="trans_type_[% loop.count %]" value="[% HTML.escape(row.trans_type) %]">
 
   <input type="hidden" name="trans_rowcount" value="[% LINKS.size %]">
  </form>
-