]> wagnertech.de Git - mfinanz.git/blobdiff - templates/webpages/generic/edit_email.html
Kontoauszug verbuchen: Lieferantengutschrift buchen
[mfinanz.git] / templates / webpages / generic / edit_email.html
index 88a95a1797b479d2f048e3512e49c783fadc256a..e3b03ac1e68112c719f91127030b32dcf973d191 100644 (file)
 [%- USE T8 %]
-[%- USE HTML %]
-<body onload="fokus()">
+[%- USE HTML %][%- USE LxERP -%][%- USE L -%]
+<h1>[% title %]</h1>
 
 <form name="Form" method="post" action="[% script %]">
 
 <table width="100%">
-  <tr class="listtop">
-
-    <th class="listtop">[% title %]</th>
-  </tr>
-  <tr height="5"></tr>
   <tr>
-    <td>
+    <td style="width: 500px">
       <table>
         <tr>
           <th align="right" nowrap>[% 'To' | $T8 %]</th>
 
-          <td><input name="email" size="30" value="[% HTML.escape(email) %]"></td>
+          <td>[% L.input_tag('email', email, size=30, class=(email ? '' : 'initial_focus')) %]</td>
         </tr>
         <tr>
           <th align="right" nowrap>[% 'Cc' | $T8 %]</th>
           <td><input name="cc" size="30" value="[% HTML.escape(cc) %]"></td>
         </tr>
-[% IF SHOW_BCC %]
+[%- IF SHOW_BCC %]
         <tr>
           <th align="right" nowrap>[% 'Bcc' | $T8 %]</th>
           <td><input name="bcc" size="30" value="[% HTML.escape(bcc) %]"></td>
-        </tr>[% END %]
+        </tr>
+[%- END %]
         <tr>
           <th align="right" nowrap>[% 'Subject' | $T8 %]</th>
-
-          <td><input name="subject" size="30" value="[% HTML.escape(subject) %]"></td>
+          <td>[% L.input_tag('subject', subject, size=30, class=(email ? 'initial_focus' : '')) %]</td>
         </tr>
         <tr>
           <th align="right" nowrap>[% 'Attachment name' | $T8 %]</th>
           <td><input name="attachment_filename" size="30" value="[% HTML.escape(a_filename) %]"></td>
+        </tr>
       </table>
     </td>
+[%- IF INSTANCE_CONF.get_doc_storage %]
+    <td align="left" rowspan="2">
+      <table>
+[%- USE ATT_it = Iterator(FILES) %]
+[% FOREACH file = ATT_it %]
+[% END %]
+[%- IF ATT_it.size > 0 %]  
+        <tr class="listheading">
+          <th colspan="3" align="left" nowrap>[% LxERP.t8('other Document Attachments') %]</th>
+          <input type="hidden" name="attfile_count" id="m_attfile_count" value="[% ATT_it.size %]">
+        </tr>
+         <tr class="">
+           <th align="left" nowrap></th>
+           <th align="left" nowrap>[% LxERP.t8('Filename') %]</th>
+           <th align="left" nowrap></th>
+        </tr>
+        <tr><td colspan="3"><hr size="1" style="height:1px;background-color:#000;" noshade></td></tr>
+       [% FOREACH file = ATT_it %]
+         <tr class="listrow">
+          <td></td><td>[% file.file_name %]
+            <input type="hidden" name="attfile_[% ATT_it.count %]" value="[% file.id %]">
+            <td><input name="attsel_[% ATT_it.count %]" type="checkbox" class="checkbox" ></td>
+         </tr>
+        [% END %]
+[%- END %]
+[%- USE ATT_it = Iterator(VC_FILES) %]
+[% FOREACH file = ATT_it %]
+[% END %]
+[%- IF ATT_it.size > 0 %]  
+        <tr><td colspan="3"><hr size="1" noshade></td></tr>
+         <tr class="listheading">
+           <th colspan="3" align="left" nowrap>
+             <input type="hidden" name="attfile_cv_count" id="m_attfile_cv_count" value="[% ATT_it.size %]">
+             [% LxERP.t8('Customer Attachments') %]
+           </th>
+         </tr>
+        <tr class="">
+           <th align="left" nowrap></th>
+           <th align="left" nowrap>[% LxERP.t8('Filename') %]</th>
+           <th align="left" nowrap></th>
+        </tr>
+        <tr><td colspan="3"><hr size="1" style="height:1px;background-color:#000;" noshade></td></tr>
+        [% FOREACH file = ATT_it %]
+         <tr class="listrow">
+          <td></td><td>[% file.file_name %]
+            <input type="hidden" name="attfile_cv_[% ATT_it.count %]" value="[% file.id %]">
+            <td><input name="attsel_cv_[% ATT_it.count %]" type="checkbox" class="checkbox" ></td>
+         </tr>
+        [% END %]
+[%- END %]
+[%- USE ATT_it = Iterator(PART_FILES) %]
+[%- SET lastpartid = '' %]  
+[%- FOREACH file = ATT_it %]
+[%- END %]
+[%- IF ATT_it.size > 0 %]  
+        <tr><td colspan="3"><hr size="1" noshade></td></tr>
+         <tr class="listheading">
+          <th colspan="3" align="left" nowrap>
+            <input type="hidden" name="attfile_part_count" id="m_attfile_part_count" value="[% ATT_it.size %]">
+            [% LxERP.t8('Part Attachments') %]
+          </th>
+        </tr>
+        <tr class="">
+           <th align="left" nowrap>[% LxERP.t8('Part Number') %]</th>
+           <th align="left" nowrap>[% LxERP.t8('Filename') %]</th>
+           <th align="left" nowrap></th>
+        </tr>
+        [% FOREACH file = ATT_it %]
+          [%- IF lastpartid != file.trans_id %]
+             [%- SET lastpartid = file.trans_id %][%- SET partname = file.partname %]
+        <tr><td colspan="3"><hr size="1" style="height:1px;background-color:#000;" noshade></td></tr>
+          [%- ELSE %][%- SET partname = '' %][% END %]          
+        <tr class="listrow">
+          <td>[% partname %]</td>
+          <td>[% file.file_name %]
+            <input type="hidden" name="attfile_part_[% ATT_it.count %]" value="[% file.id %]">
+            <td><input name="attsel_part_[% ATT_it.count %]" type="checkbox" class="checkbox" ></td>
+         </tr>
+        [% END %]
+[%- END %]
+      </table>
+    </td>
+[%- ELSE %]
+    <td rowspan="2">
+    </td>
+[%- END %]
   </tr>
 
   <tr>
           <th align="left" nowrap>[% 'Message' | $T8 %]</th>
         </tr>
         <tr>
-          <td><textarea name="message" rows="15" cols="60" wrap="soft">[% HTML.escape(message) %]</textarea></td>
+          <td><textarea name="message" id="message" rows="15" cols="60" wrap="soft">[% HTML.escape(message) %]</textarea></td>
 
         </tr>
       </table>
     </td>
   </tr>
   <tr>
-    <td>
+    <td colspan="2">
 
 [% print_options %]
 [% FOREACH row = HIDDEN %]<input type="hidden" name="[% row.name %]" value="[% HTML.escape(row.value) %]">
   </tr>
 
   <tr>
-    <td><hr size="3" noshade></td>
+    <td colspan="2"><hr size="3" noshade></td>
   </tr>
 </table>
 
-<input type="hidden" name="nextsub" value="send_email">
+[% L.hidden_tag('action', action) %]
 
 <br>
-<input name="action" class="submit" type="submit" value="[% 'Continue' | $T8 %]">
+[% L.submit_tag('action_newfile', LxERP.t8('Make new document'), onclick="return check_prerequisites();") %]
+[%- IF has_document %]  
+[% L.submit_tag('action_oldfile', LxERP.t8('use actual document'), onclick="return check_prerequisites();") %]
+[%- END %]
+[% L.submit_tag('action_nofile',  LxERP.t8('No document'), onclick="return check_prerequisites();") %]
 </form>
 
+<script type="text/javascript">
+<!--
+function check_prerequisites() {
+  if (!$('#email,#subject,#message').filter(function(idx, elt) { return $(elt).val() === ""; }).size())
+    return true;
+
+  alert(kivi.t8('The recipient, subject or body is missing.'));
+  return false;
+}
+-->
+</script>