[%- USE T8 %]
[%- USE L %]
[%- USE HTML %]
+[%- USE LxERP %]
+<h1>[% title %]</h1>
+
<script type="text/javascript">
$(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>
[%- END %]
- <div class="listtop">[% title %]</div>
-
<input type="hidden" name="id" value="[% HTML.escape(id) %]">
<input type="hidden" name="note_id" value="[% HTML.escape(note_id) %]">
<input type="hidden" name="callback" value="[% HTML.escape(callback) %]">
<input type="hidden" name="POPUP_MODE" value="[% HTML.escape(POPUP_MODE) %]">
- <p>
- <table>
+ <table>
+ [% IF done_at -%]
+ <tr class="fu_finished">
+ <td>[% 'Finished' | $T8 %]</td>
+ <td>[% 'by' | $T8 %] [% HTML.escape(done_by_employee_name) %]</td>
+ <td colspan="2">[% 'at' | $T8 %] [% HTML.escape(done_at) %]</td>
+ </tr>
+ [% END %]
<tr>
- <td valign="top">[% 'Follow-Up for user' | $T8 %]</td>
+ <td align="top">[% 'Follow-Up for user' | $T8 %]</td>
<td valign="top">
- <select name="created_for_user">
- [%- FOREACH row = EMPLOYEES %]
- <option value="[% HTML.escape(row.id) %]"[% IF created_for_user == row.id %] selected[% END %]>
- [%- IF row.name %][% HTML.escape(row.name) %] ([% HTML.escape(row.login) %])[% ELSE %][% HTML.escape(row.login) %][% END %]
- </option>
- [%- END %]
- </select>
+ <table>
+ <tr class="listheading">
+ <th>[% L.checkbox_tag('checkall_checkboxes', label='', id='ckeckall', checkall="[data-checkall=1]") %]</th>
+ <th>[% LxERP.t8('All users') %]</th>
+ </tr>
+
+ [% FOREACH employee = all_employees %]
+ [% SET checked = 0 %]
+ [% FOREACH cfe = created_for_employees %]
+ [% IF cfe.id == employee.id %][% SET checked = 1 %][% LAST %][% END %]
+ [% END %]
+ <tr class="listrow">
+ <td>[% L.checkbox_tag('created_for_employees[]', value=employee.id, checked=checked, "data-checkall"=1, class="employee_check") %]</td>
+ <td><label for='created_for_employees[]'>[% HTML.escape(employee.safe_name) %]</label><td>
+ </tr>
+ [% END %]
+ </table>
+ <td>
+ <td valign="top">
+ <table>
+ <tr class="listheading"><th>[% LxERP.t8('Users that are a member in this group') %] ([% LxERP.t8('click on a group to add the group\'s users') %])</th></tr>
+ [% FOREACH auth_group = all_auth_groups %]
+ <tr onclick="follow_up_do_select(this)" data-ids='[% FOREACH employee = auth_group.get_employees %][% employee.id %][% IF !loop.last %],[% END%][% END%]' class="interactive cursor-pointer">
+ <td class="listrow1"><b>← [% auth_group.name %]</b>: [% auth_group.description %]</td>
+ </tr>
+ [% FOREACH employee = auth_group.get_employees %]
+ <tr class="listrow0"><td> [% employee.safe_name %]</td></tr>
+ [% END %]
+ [% END %]
+ </table>
</td>
</tr>
<tr>
<td valign="right">[% 'Follow-Up Date' | $T8 %]</td>
- <td>
+ <td colspan="3">
[% L.date_tag('follow_up_date', follow_up_date) %]
+ </td>
</tr>
<tr>
<td valign="right">[% 'Subject' | $T8 %]</td>
- <td><input name="subject" value="[% HTML.escape(subject) %]" size="50"></td>
+ <td colspan="3"><input name="subject" value="[% HTML.escape(subject) %]" size="50"></td>
</tr>
<tr>
<td valign="right" align="top">[% 'Body' | $T8 %]</td>
- <td align="top"><textarea cols="50" rows="10" name="body">[% HTML.escape(body) %]</textarea></td>
+ <td colspan="3" 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>
- <div class="listtop">[% 'Existing pending follow-ups for this item' | $T8 %]</div>
+ <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>
<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_by_name) %]</td>
- <td valign="top">[% HTML.escape(row.created_for_user_name) %]</td>
+ <td valign="top">[% HTML.escape(row.created_for_user_name) | html_line_break %]</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) | html_line_break %]</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>
-