diff --git a/EnvelopeGenerator.Common/Entities/EmailTemplate.vb b/EnvelopeGenerator.Common/Entities/EmailTemplate.vb index cdd94a84..c870b966 100644 --- a/EnvelopeGenerator.Common/Entities/EmailTemplate.vb +++ b/EnvelopeGenerator.Common/Entities/EmailTemplate.vb @@ -23,65 +23,67 @@ Public Class EmailTemplate End Sub Private Sub InitSubjectTemplates() - _DocumentReceivedSubjectTemplate = "Dokument erhalten: ''" - _DocumentSignedSubjectTemplate = "Dokument unterschrieben: ''" - _DocumentDeletedSubjectTemplate = "Vorgang zurückgezogen: ''" - _DocumentCompletedSubjectTemplate = "Vorgang abgeschlossen: ''" + _DocumentReceivedSubjectTemplate = "Dokument erhalten: '[DOCUMENT_TITLE]'" + _DocumentSignedSubjectTemplate = "Dokument unterschrieben: '[DOCUMENT_TITLE]'" + _DocumentDeletedSubjectTemplate = "Vorgang zurückgezogen: '[DOCUMENT_TITLE]'" + _DocumentCompletedSubjectTemplate = "Vorgang abgeschlossen: '[DOCUMENT_TITLE]'" End Sub Private Sub InitBodyTemplates() _DocumentReceivedBodyTemplate = New List(Of String) From { - "Guten Tag ,", + "Guten Tag [NAME_RECEIVER],", "", - " hat Ihnen ein Dokument zum gesendet.", + "[NAME_SENDER] hat Ihnen ein Dokument zum [SIGNATURE_TYPE] gesendet.", "", - "Über den folgenden Link können Sie das Dokument einsehen: "">", + "Über den folgenden Link können Sie das Dokument einsehen: [LINK_TO_DOCUMENT_TEXT]", "", - "", + "[MESSAGE]", "", "Mit freundlichen Grüßen", - "" + "[NAME_PORTAL]" } + '_DocumentReceivedBodyTemplate = Common.My.Resources.email_de.Split(vbNewLine).ToList() + _DocumentSignedBodyTemplate = New List(Of String) From { - "Guten Tag ", + "Guten Tag [NAME_RECEIVER]", "", - "hiermit bestätigen wir Ihnen die erfolgreiche Signatur für den Vorgang .", + "hiermit bestätigen wir Ihnen die erfolgreiche Signatur für den Vorgang [DOCUMENT_TITLE].", "", "Mit freundlichen Grüßen", - "" + "[NAME_PORTAL]" } _DocumentDeletedBodyTemplate = New List(Of String) From { - "Guten Tag ", + "Guten Tag [NAME_RECEIVER]", "", - "Der User hat den Umschlag gelöscht.", + "Der User [NAME_SENDER] hat den Umschlag [DOCUMENT_TITLE] gelöscht.", "", "Mit freundlichen Grüßen", - "" + "[NAME_PORTAL]" } _DocumentCompletedBodyTemplate = New List(Of String) From { - "Guten Tag ", + "Guten Tag [NAME_RECEIVER]", "", - "Der Signaturvorgang wurde erfolgreich abgeschlossen.", + "Der Signaturvorgang [DOCUMENT_TITLE] wurde erfolgreich abgeschlossen.", "Sie erhalten das Dokument mit einem detaillierten Ergebnisbericht als Anhang zu dieser Email.", "", "Vielen Dank für die Nutzung von", - "" + "[NAME_PORTAL]" } End Sub Private Sub InitDictionary(pEmailData As EmailData) _replaceDictionary = New Dictionary(Of String, String) From { - {"", pEmailData.ReceiverName}, - {"", pEmailData.SenderName}, - {"", DbConfig.ExternalProgramName}, - {"", "signieren"}, - {"", pEmailData.SignatureLink}, - {"", $"{pEmailData.SignatureLink.Truncate(40)}.."}, - {"", pEmailData.EnvelopeTitle}, - {"", pEmailData.Message} + {"[NAME_RECEIVER]", pEmailData.ReceiverName}, + {"[NAME_SENDER]", pEmailData.SenderName}, + {"[NAME_PORTAL]", DbConfig.ExternalProgramName}, + {"[SIGNATURE_TYPE]", "signieren"}, + {"[LINK_TO_DOCUMENT]", pEmailData.SignatureLink}, + {"[LINK_TO_DOCUMENT_TEXT]", $"{pEmailData.SignatureLink.Truncate(40)}.."}, + {"[DOCUMENT_TITLE]", pEmailData.EnvelopeTitle}, + {"[MESSAGE]", pEmailData.Message} } End Sub diff --git a/EnvelopeGenerator.Common/EnvelopeGenerator.Common.vbproj b/EnvelopeGenerator.Common/EnvelopeGenerator.Common.vbproj index 0f0839b7..3e4dc695 100644 --- a/EnvelopeGenerator.Common/EnvelopeGenerator.Common.vbproj +++ b/EnvelopeGenerator.Common/EnvelopeGenerator.Common.vbproj @@ -270,6 +270,7 @@ PreserveNewest + diff --git a/EnvelopeGenerator.Common/Helpers.vb b/EnvelopeGenerator.Common/Helpers.vb index f40ea949..0cd2aeb6 100644 --- a/EnvelopeGenerator.Common/Helpers.vb +++ b/EnvelopeGenerator.Common/Helpers.vb @@ -1,6 +1,5 @@ Imports System.Drawing Imports System.IO -Imports System.Threading Imports DevExpress.Utils.Svg Imports EnvelopeGenerator.Common.Constants diff --git a/EnvelopeGenerator.Common/My Project/Resources.Designer.vb b/EnvelopeGenerator.Common/My Project/Resources.Designer.vb index 44cd4a43..ce73cc42 100644 --- a/EnvelopeGenerator.Common/My Project/Resources.Designer.vb +++ b/EnvelopeGenerator.Common/My Project/Resources.Designer.vb @@ -59,5 +59,21 @@ Namespace My.Resources resourceCulture = value End Set End Property + + ''' + ''' Sucht eine lokalisierte Zeichenfolge, die <html dir="ltr" xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office" lang="und" style="padding:0;Margin:0"> + '''<head> + ''' <meta http-equiv="Content-Security-Policy" content="script-src 'none'; connect-src 'none'; object-src 'none'; form-action 'none';"> + ''' <meta charset="UTF-8"> + ''' <meta content="width=device-width, initial-scale=1" name="viewport"> + ''' <meta name="x-apple-disable-message-reformatting"> + ''' <meta http-equiv="X-UA-Compatible" content="IE=edge"> + ''' <meta cont [Rest der Zeichenfolge wurde abgeschnitten]"; ähnelt. + ''' + Friend ReadOnly Property email_de() As String + Get + Return ResourceManager.GetString("email_de", resourceCulture) + End Get + End Property End Module End Namespace diff --git a/EnvelopeGenerator.Common/My Project/Resources.resx b/EnvelopeGenerator.Common/My Project/Resources.resx index af7dbebb..f4c05a6b 100644 --- a/EnvelopeGenerator.Common/My Project/Resources.resx +++ b/EnvelopeGenerator.Common/My Project/Resources.resx @@ -46,7 +46,7 @@ mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with - : System.Serialization.Formatters.Binary.BinaryFormatter + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 @@ -60,6 +60,7 @@ : and then encoded with base64 encoding. --> + @@ -68,9 +69,10 @@ - + + @@ -85,9 +87,10 @@ - + + @@ -109,9 +112,13 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Templates\email_de.html;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 + \ No newline at end of file diff --git a/EnvelopeGenerator.Common/Templates/email_de.html b/EnvelopeGenerator.Common/Templates/email_de.html new file mode 100644 index 00000000..537c8afc --- /dev/null +++ b/EnvelopeGenerator.Common/Templates/email_de.html @@ -0,0 +1,450 @@ + + + + + + + + + Trigger newsletter 3 + + + + + + + +
+ + + + + + + +
+ + + + + + +
+ + + + + + +
+ + + + + + + +
+ + + + + + +
+
+ + + + + + +
+ + + + + + +

Put your preheader text here

+
+
+
+ + + + + + +
+ + + + + + + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + +

[MAIL_SUBJECT]

Guten Tag [NAME_RECEIVER],

[NAME_SENDER] hat Ihnen ein Dokument zum [SIGNATURE_TYPE] gesendet. Über den folgenden Link können Sie das Dokument einsehen:

[LINK_TO_DOCUMENT]

MESSAGE

Mit freundlichen Grüßen,

+
+
+ + + + + + + +
+ + + + + + +
+
+ + + + + + +
+ + + + + + +

[NAME_PORTAL]

+
+
+
+ + + + + + + +
+
+ + + \ No newline at end of file diff --git a/EnvelopeGenerator.Web/wwwroot/js/annotation.js b/EnvelopeGenerator.Web/wwwroot/js/annotation.js index 96c0387b..7f0e672a 100644 --- a/EnvelopeGenerator.Web/wwwroot/js/annotation.js +++ b/EnvelopeGenerator.Web/wwwroot/js/annotation.js @@ -102,7 +102,7 @@ return frameAnnotation } - async createAnnotationFrameBlob(receiverName, receiverSignature, width, height) { + async createAnnotationFrameBlob(receiverName, receiverSignature, timestamp, width, height) { const canvas = document.createElement('canvas') const scale = 4 const fontSize = 10 @@ -120,7 +120,7 @@ // This also should make the lines and text less blurry ctx.textRendering = "geometricPrecision" - const date = new Date() + const date = timestamp const dateString = date.toLocaleString('de-DE') const signatureLength = 100 * scale diff --git a/EnvelopeGenerator.Web/wwwroot/js/app.js b/EnvelopeGenerator.Web/wwwroot/js/app.js index ad98cb10..f36c1d00 100644 --- a/EnvelopeGenerator.Web/wwwroot/js/app.js +++ b/EnvelopeGenerator.Web/wwwroot/js/app.js @@ -113,7 +113,7 @@ class App { } handleAnnotationsLoad(loadedAnnotations) { - console.log('annotations loaded', loadedAnnotations.toJS()) + console.debug('annotations loaded', loadedAnnotations.toJS()) } handleAnnotationsChange() { } @@ -129,10 +129,12 @@ class App { const top = annotation.boundingBox.top - 20 const width = 150 const height = 75 + const timestamp = new Date() const imageUrl = await this.Annotation.createAnnotationFrameBlob( this.currentReceiver.name, this.currentReceiver.signature, + timestamp, width, height )