epic-ts
[kivitendo-erp.git] / templates / webpages / generic / edit_email.html
index b31fde0..d26de92 100644 (file)
@@ -1,13 +1,10 @@
 [%- USE T8 %]
-[%- USE HTML %][%- USE L -%]
+[%- 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>
       <table>
           <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>[% 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>
   </tr>
@@ -44,7 +42,7 @@
           <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>
 <input type="hidden" name="nextsub" value="send_email">
 
 <br>
-<input name="action" class="submit" type="submit" value="[% 'Continue' | $T8 %]">
+[% L.submit_tag('action', LxERP.t8('Continue'), 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>