Vor E-Mail-Versand prüfen, ob Empfänger+Betreff+Body vorhanden
authorMoritz Bunkus <m.bunkus@linet-services.de>
Fri, 24 May 2013 15:23:29 +0000 (17:23 +0200)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 23 Jun 2014 11:31:13 +0000 (13:31 +0200)
js/locale/de.js
locale/de/all
templates/webpages/generic/edit_email.html

index 3d58e16..f7322d8 100644 (file)
@@ -56,6 +56,7 @@ namespace("kivi").setupLocale({
 "The name is missing.":"Der Name fehlt.",
 "The name must only consist of letters, numbers and underscores and start with a letter.":"Der Name darf nur aus Buchstaben (keine Umlaute), Ziffern und Unterstrichen bestehen und muss mit einem Buchstaben beginnen.",
 "The option field is empty.":"Das Optionsfeld ist leer.",
+"The recipient, subject or body is missing.":"Der Empfäger, der Betreff oder der Text ist leer.",
 "The selected database is still configured for client \"#1\". If you delete the database that client will stop working until you re-configure it. Do you still want to delete the database?":"Die auswählte Datenbank ist noch für Mandant \"#1\" konfiguriert. Wenn Sie die Datenbank löschen, wird der Mandanten nicht mehr funktionieren, bis er anders konfiguriert wurde. Wollen Sie die Datenbank trotzdem löschen?",
 "There is one or more sections for which no part has been assigned yet; therefore creating the new record is not possible yet.":"Es gibt einen oder mehrere Abschnitte ohne Artikelzuweisung; daher kann der neue Beleg noch nicht erstellt werden.",
 "This sales order has an active configuration for periodic invoices. If you save then all subsequently created invoices will contain those changes as well, but not those that have already been created. Do you want to continue?":"Dieser Auftrag besitzt eine aktive Konfiguration für wiederkehrende Rechnungen. Wenn Sie jetzt speichern, so werden alle zukünftig hieraus erzeugten Rechnungen die Änderungen enthalten, nicht aber die bereits erzeugten Rechnungen. Wollen Sie speichern?",
index f223558..f386c05 100755 (executable)
@@ -2466,6 +2466,7 @@ $self->{texts} = {
   'The project type has been deleted.' => 'Der Projekttyp wurde gelöscht.',
   'The project type has been saved.' => 'Der Projekttyp wurde gespeichert.',
   'The project type is in use and cannot be deleted.' => 'Der Projekttyp wird verwendet und kann nicht gelöscht werden.',
+  'The recipient, subject or body is missing.' => 'Der Empfäger, der Betreff oder der Text ist leer.',
   'The required information consists of the IBAN and the BIC.' => 'Die benötigten Informationen bestehen aus der IBAN und der BIC.',
   'The required information consists of the IBAN, the BIC, the mandator ID and the mandate\'s date of signature.' => 'Die benötigten Informationen bestehen aus IBAN, BIC, Mandanten-ID und dem Unterschriftsdatum des Mandates.',
   'The requirement spec has been deleted.' => 'Das Pflichtenheft wurde gelöscht.',
index b31fde0..7654e4f 100644 (file)
@@ -1,5 +1,5 @@
 [%- USE T8 %]
-[%- USE HTML %][%- USE L -%]
+[%- USE HTML %][%- USE LxERP -%][%- USE L -%]
 <form name="Form" method="post" action="[% script %]">
 
 <table width="100%">
@@ -44,7 +44,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>