Add SignatureLinkText to EmailData and template support
Introduced SignatureLinkText property in EmailData to hold signature-related text, set dynamically based on envelope type. Updated constructor to HTML-encode SignatureLinkText. Added [SIGNATURE_LINK_TEXT] to template dictionary in TemplateService for email customization.
This commit is contained in:
@@ -24,15 +24,18 @@ Public Class EmailData
|
|||||||
|
|
||||||
Public ReadOnly Property EnvelopeTypeId As Integer = 0
|
Public ReadOnly Property EnvelopeTypeId As Integer = 0
|
||||||
Public Property SignatureType As String = ""
|
Public Property SignatureType As String = ""
|
||||||
|
Public Property SignatureLinkText As String = ""
|
||||||
|
|
||||||
Public Sub DynamicStringsForEmails(pEnvelope As Entities.Envelope)
|
Public Sub DynamicStringsForEmails(pEnvelope As Entities.Envelope)
|
||||||
|
|
||||||
If pEnvelope.EnvelopeTypeId = 1 Then
|
If pEnvelope.EnvelopeTypeId = 1 Then
|
||||||
SignatureType = "Signieren"
|
SignatureType = "Signieren"
|
||||||
Message = "Bitte lesen und unterzeichnen Sie dieses Dokument."
|
Message = "Bitte lesen und unterzeichnen Sie dieses Dokument."
|
||||||
|
SignatureLinkText = " und elektronisch unterschreiben"
|
||||||
ElseIf pEnvelope.EnvelopeTypeId = 2 Then
|
ElseIf pEnvelope.EnvelopeTypeId = 2 Then
|
||||||
SignatureType = "Lesen und bestätigen"
|
SignatureType = "Lesen und bestätigen"
|
||||||
Message = "Bitte lesen und bestätigen Sie, dieses Dokument gelesen zu haben."
|
Message = "Bitte lesen und bestätigen Sie, dieses Dokument gelesen zu haben."
|
||||||
|
SignatureLinkText = ""
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -60,6 +63,7 @@ Public Class EmailData
|
|||||||
EnvelopeTitle = pEnvelope.Title
|
EnvelopeTitle = pEnvelope.Title
|
||||||
EnvelopeTypeId = pEnvelope.EnvelopeTypeId
|
EnvelopeTypeId = pEnvelope.EnvelopeTypeId
|
||||||
SignatureType = TextToHtml(SignatureType)
|
SignatureType = TextToHtml(SignatureType)
|
||||||
|
SignatureLinkText = TextToHtml(SignatureLinkText)
|
||||||
End Sub
|
End Sub
|
||||||
Public Function TextToHtml(input As String) As String
|
Public Function TextToHtml(input As String) As String
|
||||||
If String.IsNullOrEmpty(input) Then Return ""
|
If String.IsNullOrEmpty(input) Then Return ""
|
||||||
@@ -101,6 +105,7 @@ Public Class EmailData
|
|||||||
EnvelopeTitle = pEnvelope.Title
|
EnvelopeTitle = pEnvelope.Title
|
||||||
EnvelopeTypeId = pEnvelope.EnvelopeTypeId
|
EnvelopeTypeId = pEnvelope.EnvelopeTypeId
|
||||||
SignatureType = TextToHtml(SignatureType)
|
SignatureType = TextToHtml(SignatureType)
|
||||||
|
SignatureLinkText = TextToHtml(SignatureLinkText)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ Public Class TemplateService
|
|||||||
{"[DOCUMENT_TITLE]", pEmailData.EnvelopeTitle},
|
{"[DOCUMENT_TITLE]", pEmailData.EnvelopeTitle},
|
||||||
{"[MESSAGE]", pEmailData.Message},
|
{"[MESSAGE]", pEmailData.Message},
|
||||||
{"[DOCUMENT_ACCESS_CODE]", pEmailData.ReceiverAccessCode},
|
{"[DOCUMENT_ACCESS_CODE]", pEmailData.ReceiverAccessCode},
|
||||||
{"[REASON]", pReason}
|
{"[REASON]", pReason},
|
||||||
|
{"[SIGNATURE_LINK_TEXT]", pEmailData.SignatureLinkText}
|
||||||
}
|
}
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user