]> wagnertech.de Git - mfinanz.git/blob - templates/design40_webpages/fu/add_edit.html
date error in mapping
[mfinanz.git] / templates / design40_webpages / fu / add_edit.html
1 [% USE T8 %]
2 [% USE L %]
3 [% USE HTML %]
4 [% USE LxERP %]
5 <h1>[% title %]</h1>
6
7 <script type="text/javascript">
8   $(function(){ document.Form.subject.focus(); });
9 </script>
10
11 <div class="wrapper">
12 <form action="fu.pl" method="post" name="Form" id="form">
13
14 [% IF SAVED_MESSAGE %]
15   <p>[% SAVED_MESSAGE %]</p>
16 [% END %]
17
18 <input type="hidden" name="id" value="[% HTML.escape(id) %]">
19 <input type="hidden" name="note_id" value="[% HTML.escape(note_id) %]">
20 <input type="hidden" name="callback" value="[% HTML.escape(callback) %]">
21 <input type="hidden" name="POPUP_MODE" value="[% HTML.escape(POPUP_MODE) %]">
22
23
24 [% IF done_at -%]
25   <div class="message_ok">
26     [% 'Finished' | $T8 %] [% 'by' | $T8 %] [% HTML.escape(done_by_employee_name) %]
27     [% 'at' | $T8 %] [% HTML.escape(done_at) %]
28   </div>
29 [% END %]
30
31 <div class="wrapper">
32   <table class="tbl-list">
33     <caption>[% 'Follow-Up for user' | $T8 %]</caption>
34     <thead>
35       <tr>
36         <th>[% L.checkbox_tag('checkall_checkboxes', label='', id='checkall', checkall="[data-checkall=1]") %]</th>
37         <th><label for='checkall'>[% LxERP.t8('All users') %]</label></th>
38       </tr>
39     </thead>
40     <tbody>
41       [% FOREACH employee = all_employees %]
42         [% SET checked = 0 %]
43         [% FOREACH cfe = created_for_employees %]
44           [% IF cfe.id == employee.id %][% SET checked = 1 %][% LAST %][% END %]
45         [% END %]
46         <tr>
47           <td>[% L.checkbox_tag('created_for_employees[]', value=employee.id, checked=checked, "data-checkall"=1, class="employee_check",
48                                 id='created_for_employees_' _ employee.id) %]</td>
49           <td><label for='[% 'created_for_employees_' _ employee.id %]'>[% HTML.escape(employee.safe_name) %]</label></td>
50         </tr>
51       [% END %]
52     </tbody>
53   </table>
54   <table class="tbl-list">
55     <thead>
56       <tr>
57         <th>[% LxERP.t8('Users that are a member in this group') %]<br />([% LxERP.t8('click on a group to add the group\'s users') %])</th>
58       </tr>
59     </thead>
60     <tbody>
61       [% FOREACH auth_group = all_auth_groups %]
62         <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">
63           <td><b>←&nbsp;[% auth_group.name %]</b>: [% auth_group.description %]
64           <br />
65           <ul>
66             [% FOREACH employee = auth_group.get_employees %]
67               <li>&nbsp;&nbsp;&nbsp;[% employee.safe_name %]</li>
68             [% END %]
69           </ul>
70           </td>
71         </tr>
72       [% END %]
73     </tbody>
74   </table>
75 </div>
76
77 <div class="wrapper">
78   <table class="tbl-horizontal">
79     <tbody>
80       <tr>
81         <th>[% 'Follow-Up Date' | $T8 %]</th>
82         <td>[% L.date_tag('follow_up_date', follow_up_date, class="wi-date") %]</td>
83       </tr>
84       <tr>
85         <th>[% 'Subject' | $T8 %]</th>
86         <td><input type="text" name="subject" value="[% HTML.escape(subject) %]" class="wi-wider"></td>
87       </tr>
88       <tr>
89         <th>[% 'Body' | $T8 %]</th>
90         <td><textarea class="wi-wider" rows="10" name="body">[% HTML.escape(body) %]</textarea></td>
91       </tr>
92     </tbody>
93   </table>
94 </div>
95
96 [% IF POPUP_MODE %]
97 <div class="buttons">
98   <input type="hidden" name="action" value="dispatcher">
99   <input type="submit" name="action_save" value="[% 'Save' | $T8 %]">
100   [% IF id %]
101     <input type="submit" name="action_finish" value="[% 'Finish' | $T8 %]">
102     <input type="submit" name="action_delete" value="[% 'Delete' | $T8 %]">
103   [% END %]
104   <input type="submit" onclick="window.close()" value="[% 'Cancel' | $T8 %]" class="neutral">
105 </div>
106
107 [%- IF FOLLOW_UPS_PENDING.size %]
108 <table class="tbl-list">
109   <caption>[% 'Existing pending follow-ups for this item' | $T8 %]</caption>
110   <colgroup>
111     <col class="wi-date">
112     <col class="wi-normal">
113     <col class="wi-mediumsmall">
114     <col class="wi-mediumsmall">
115   </colgroup>
116   <thead>
117     <tr>
118       <th>[% 'Follow-Up Date' | $T8 %]</th>
119       <th>[% 'Subject' | $T8 %]</th>
120       <th>[% 'Created by' | $T8 %]</th>
121       <th>[% 'Follow-up for' | $T8 %]</th>
122     </tr>
123   </thead>
124   <tbody>
125     [% FOREACH row = FOLLOW_UPS_PENDING %]
126     <tr>
127       <td class="top">[% HTML.escape(row.follow_up_date) %]</td>
128       <td class="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>
129       <td class="top">[% HTML.escape(row.created_by_name) %]</td>
130       <td class="top">[% HTML.escape(row.created_for_user_name) | html_line_break %]</td>
131     </tr>
132     [% END %]
133   </tbody>
134 </table>
135 [% END %]
136
137 [%- IF FOLLOW_UPS_DONE.size %]
138 <table class="tbl-list">
139   <caption>[% 'Existing finished follow-ups for this item' | $T8 %]</caption>
140   <colgroup>
141     <col class="wi-date">
142     <col class="wi-normal">
143     <col class="wi-mediumsmall">
144     <col class="wi-mediumsmall">
145   </colgroup>
146   <thead>
147     <tr>
148       <th>[% 'Follow-Up Date' | $T8 %]</th>
149       <th>[% 'Subject' | $T8 %]</th>
150       <th>[% 'Created by' | $T8 %]</th>
151       <th>[% 'Follow-up for' | $T8 %]</th>
152     </tr>
153   </thead>
154   <tbody>
155     [% FOREACH row = FOLLOW_UPS_DONE %]
156     <tr>
157       <td class="top">[% HTML.escape(row.follow_up_date) %]</td>
158       <td class="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>
159       <td class="top">[% HTML.escape(row.created_by_name) %]</td>
160       <td class="top">[% HTML.escape(row.created_for_user_name) | html_line_break %]</td>
161     </tr>
162     [% END %]
163   </tbody>
164 </table>
165 [% END %]
166
167 [% END #IF POPUP_MODE %]
168
169 [% FOREACH row = LINKS %]
170   <input type="hidden" name="trans_id_[% loop.count %]"   value="[% HTML.escape(row.trans_id) %]">
171   <input type="hidden" name="trans_type_[% loop.count %]" value="[% HTML.escape(row.trans_type) %]">
172   <input type="hidden" name="trans_info_[% loop.count %]" value="[% HTML.escape(row.trans_info) %]">
173 [% END %]
174
175 <input type="hidden" name="trans_rowcount" value="[% LINKS.size %]">
176
177 </form>
178 </div><!-- /.wrapper -->