Home und View in Home und Envelope unterteilen
This commit is contained in:
23
EnvelopeGenerator.Web/Views/Envelope/EnvelopeExpired.cshtml
Normal file
23
EnvelopeGenerator.Web/Views/Envelope/EnvelopeExpired.cshtml
Normal file
@@ -0,0 +1,23 @@
|
||||
@{
|
||||
ViewData["Title"] = "Abgelaufen";
|
||||
}
|
||||
<div class="page container p-5">
|
||||
<header class="text-center">
|
||||
<div class="icon expired">
|
||||
<svg width="72" height="72" viewBox="0 0 48 48" version="1" xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 48 48">
|
||||
<circle fill="#00ACC1" cx="17" cy="17" r="14" />
|
||||
<circle fill="#eee" cx="17" cy="17" r="11" />
|
||||
<rect x="16" y="8" width="2" height="9" />
|
||||
<rect x="18.2" y="16" transform="matrix(-.707 .707 -.707 -.707 46.834 19.399)" width="2.4" height="6.8" />
|
||||
<circle cx="17" cy="17" r="2" />
|
||||
<circle fill="#00ACC1" cx="17" cy="17" r="1" />
|
||||
<path fill="#FFC107" d="M11.9,42l14.4-24.1c0.8-1.3,2.7-1.3,3.4,0L44.1,42c0.8,1.3-0.2,3-1.7,3H13.6C12.1,45,11.1,43.3,11.9,42z" />
|
||||
<path fill="#263238" d="M26.4,39.9c0-0.2,0-0.4,0.1-0.6s0.2-0.3,0.3-0.5s0.3-0.2,0.5-0.3s0.4-0.1,0.6-0.1s0.5,0,0.7,0.1 s0.4,0.2,0.5,0.3s0.2,0.3,0.3,0.5s0.1,0.4,0.1,0.6s0,0.4-0.1,0.6s-0.2,0.3-0.3,0.5s-0.3,0.2-0.5,0.3s-0.4,0.1-0.7,0.1 s-0.5,0-0.6-0.1s-0.4-0.2-0.5-0.3s-0.2-0.3-0.3-0.5S26.4,40.1,26.4,39.9z M29.2,36.8h-2.3L26.5,27h3L29.2,36.8z" />
|
||||
</svg>
|
||||
</div>
|
||||
<h1>Abgelaufen!</h1>
|
||||
</header>
|
||||
<section class="text-center">
|
||||
<p>Der Zeitraum für die gemeinsame Nutzung von Dokumenten ist abgelaufen.</p>
|
||||
</section>
|
||||
</div>
|
||||
124
EnvelopeGenerator.Web/Views/Envelope/EnvelopeLocked.cshtml
Normal file
124
EnvelopeGenerator.Web/Views/Envelope/EnvelopeLocked.cshtml
Normal file
@@ -0,0 +1,124 @@
|
||||
@using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver;
|
||||
@using Newtonsoft.Json
|
||||
@using EnvelopeGenerator.Web.Extensions;
|
||||
@model Auth;
|
||||
@{
|
||||
//TODO: Create view model
|
||||
var nonce = _accessor.HttpContext?.Items["csp-nonce"] as string;
|
||||
var cImg = _cImgOpt.Value;
|
||||
string codeType = ViewData["CodeType"] is string _codeType ? _codeType : "accessCode";
|
||||
string codeKeyName = (char.ToUpper(codeType[0]) + codeType.Substring(1)).Replace("Code", "");
|
||||
ViewData["Title"] = _localizer.LockedTitle(codeKeyName);
|
||||
bool viaSms = codeType == "smsCode";
|
||||
bool viaAuthenticator = codeType == "authenticatorCode";
|
||||
bool viaTFA = viaSms || viaAuthenticator;
|
||||
DateTime? smsExpiration = ViewData["SmsExpiration"] is DateTime _smsExpiration ? _smsExpiration : null;
|
||||
bool tfaEnabled = ViewData["TFAEnabled"] is bool _tfaEnabled && _tfaEnabled;
|
||||
bool hasPhoneNumber = ViewData["HasPhoneNumber"] is bool _hasPhoneNumber && _hasPhoneNumber;
|
||||
var envelopeKey = ViewData["EnvelopeKey"] as string;
|
||||
DateTime? tfaRegDeadline = ViewData["TfaRegDeadline"] is DateTime _deadline ? _deadline : null;
|
||||
var senderEmail = ViewData["SenderEmail"] as string ?? string.Empty;
|
||||
var envelopeTitle = ViewData["EnvelopeTitle"] as string ?? string.Empty;
|
||||
}
|
||||
<div class="page container py-4 px-4">
|
||||
<header class="text-center">
|
||||
<div class="header-1 alert alert-secondary" role="alert">
|
||||
<h3 class="text">@_localizer.WelcomeToTheESignPortal()</h3>
|
||||
<img class="@cImg["Company"].GetClassIn("Locked")" src="@cImg["Company"].Src" />
|
||||
</div>
|
||||
<div class="icon locked @(viaTFA ? "tfa" : "") mt-4 mb-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="72" height="72" fill="currentColor" class="bi bi-shield-lock" viewBox="0 0 16 16">
|
||||
<path d="M5.338 1.59a61 61 0 0 0-2.837.856.48.48 0 0 0-.328.39c-.554 4.157.726 7.19 2.253 9.188a10.7 10.7 0 0 0 2.287 2.233c.346.244.652.42.893.533q.18.085.293.118a1 1 0 0 0 .101.025 1 1 0 0 0 .1-.025q.114-.034.294-.118c.24-.113.547-.29.893-.533a10.7 10.7 0 0 0 2.287-2.233c1.527-1.997 2.807-5.031 2.253-9.188a.48.48 0 0 0-.328-.39c-.651-.213-1.75-.56-2.837-.855C9.552 1.29 8.531 1.067 8 1.067c-.53 0-1.552.223-2.662.524zM5.072.56C6.157.265 7.31 0 8 0s1.843.265 2.928.56c1.11.3 2.229.655 2.887.87a1.54 1.54 0 0 1 1.044 1.262c.596 4.477-.787 7.795-2.465 9.99a11.8 11.8 0 0 1-2.517 2.453 7 7 0 0 1-1.048.625c-.28.132-.581.24-.829.24s-.548-.108-.829-.24a7 7 0 0 1-1.048-.625 11.8 11.8 0 0 1-2.517-2.453C1.928 10.487.545 7.169 1.141 2.692A1.54 1.54 0 0 1 2.185 1.43 63 63 0 0 1 5.072.56" />
|
||||
<path d="M9.5 6.5a1.5 1.5 0 0 1-1 1.415l.385 1.99a.5.5 0 0 1-.491.595h-.788a.5.5 0 0 1-.49-.595l.384-1.99a1.5 1.5 0 1 1 2-1.415" />
|
||||
</svg>
|
||||
</div>
|
||||
<h1>@_localizer.LockedTitle(codeKeyName)</h1>
|
||||
</header>
|
||||
@if (viaAuthenticator && (tfaRegDeadline is null || tfaRegDeadline > DateTime.Now))
|
||||
{
|
||||
<section class="text-center">
|
||||
<p class="m-0 p-0">
|
||||
Klicken Sie auf den
|
||||
<a class="icon-link m-0 p-0" href="/tfa/@envelopeKey" style="text-decoration: none;" target="_blank">
|
||||
Link
|
||||
<i class="bi bi-box-arrow-up-right"></i>
|
||||
</a>
|
||||
um Ihre Authenticator-App einzurichten.
|
||||
</p>
|
||||
</section>
|
||||
}
|
||||
<section class="text-center">
|
||||
<p>@_localizer.LockedBody(codeKeyName)</p>
|
||||
</section>
|
||||
<div class="row m-0 p-0">
|
||||
<div class="access-code-panel justify-content-center align-items-center p-0 m-0">
|
||||
<form id="form-access-code" class="form form-floating mb-0" method="post">
|
||||
<div class="form-floating access-code-form-floating">
|
||||
<input type="password" id="access_code" class="form-control" name="@codeType" placeholder="@_localizer.LockedCodeLabel(codeKeyName)]" required="required">
|
||||
<label for="access_code">@_localizer.LockedCodeLabel(codeKeyName)</label>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<span class="material-symbols-outlined">
|
||||
login
|
||||
</span>
|
||||
</button>
|
||||
@if (tfaEnabled)
|
||||
{
|
||||
<div class="form-check form-switch tfa-sms">
|
||||
@if(hasPhoneNumber)
|
||||
{
|
||||
<input asp-for="UserSelectSMS" class="form-check-input" name="userSelectSMS" type="checkbox" role="switch" id="flexSwitchCheckChecked">
|
||||
}
|
||||
else
|
||||
{
|
||||
<input asp-for="UserSelectSMS" class="form-check-input" name="userSelectSMS" type="checkbox" role="switch" id="flexSwitchCheckChecked" disabled>
|
||||
}
|
||||
<label class="form-check-label" for="flexSwitchCheckChecked">2FA per SMS</label>
|
||||
</div>
|
||||
}
|
||||
@if (smsExpiration is not null)
|
||||
{
|
||||
<div id="sms-timer" class="alert alert-primary" role="alert">00:00</div>
|
||||
}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@if (ViewData["ErrorMessage"] is string errMsg)
|
||||
{
|
||||
<div id="access-code-error-message" class="alert alert-danger row" role="alert">
|
||||
@errMsg
|
||||
</div>
|
||||
}
|
||||
<section class="no-receiver-explanation text-center">
|
||||
<details>
|
||||
<summary>@_localizer.LockedFooterTitle(codeKeyName)</summary>
|
||||
<p>@Html.Raw(_localizer.LockedFooterBody(codeKeyName).Format(senderEmail, "Envelope - " + envelopeTitle, string.Empty))</p>
|
||||
</details>
|
||||
</section>
|
||||
</div>
|
||||
<script nonce="@nonce">
|
||||
var expiration = new Date(@Html.Raw(JsonConvert.SerializeObject(smsExpiration)));
|
||||
|
||||
const element = document.getElementById("sms-timer");
|
||||
|
||||
const interval = setInterval(function () {
|
||||
var now = new Date();
|
||||
|
||||
var diffInMillis = expiration - now;
|
||||
|
||||
if (diffInMillis <= 0) {
|
||||
element.textContent = "00:00";
|
||||
clearInterval(interval);
|
||||
return;
|
||||
}
|
||||
|
||||
var minutes = Math.floor(diffInMillis / 1000 / 60);
|
||||
var seconds = Math.floor((diffInMillis / 1000) % 60);
|
||||
|
||||
var formattedMinutes = minutes.toString().padStart(2, '0');
|
||||
var formattedSeconds = seconds.toString().padStart(2, '0');
|
||||
|
||||
var remainingTime = `${formattedMinutes}:${formattedSeconds}`;
|
||||
element.textContent = remainingTime;
|
||||
}, 1000);
|
||||
</script>
|
||||
71
EnvelopeGenerator.Web/Views/Envelope/EnvelopeRejected.cshtml
Normal file
71
EnvelopeGenerator.Web/Views/Envelope/EnvelopeRejected.cshtml
Normal file
@@ -0,0 +1,71 @@
|
||||
@{
|
||||
ViewData["Title"] = _localizer.DocRejected();
|
||||
}
|
||||
@{
|
||||
var nonce = _accessor.HttpContext?.Items["csp-nonce"] as string;
|
||||
}
|
||||
@using DigitalData.Core.Abstraction.Application.DTO;
|
||||
@using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver
|
||||
@using EnvelopeGenerator.Web.Extensions
|
||||
@using Newtonsoft.Json
|
||||
@using Newtonsoft.Json.Serialization
|
||||
@model EnvelopeReceiverDto;
|
||||
@{
|
||||
var envelope = Model.Envelope;
|
||||
var document = Model.Envelope?.Documents?.FirstOrDefault();
|
||||
var sender = Model.Envelope?.User;
|
||||
var isExt = ViewBag.IsExt ?? false;
|
||||
}
|
||||
<div class="page container p-5">
|
||||
<header class="text-center">
|
||||
<div class="icon rejected">
|
||||
<svg height="100" width="100" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
viewBox="0 0 500 520" xml:space="preserve">
|
||||
<polygon style="fill:#F4B2B0;" points="27.959,164.583 27.959,160.534 172.263,14.827 172.263,164.583 "/>
|
||||
<g>
|
||||
<path style="fill:#B3404A;" d="M459.181,264.152c-5.593-5.981-14.975-6.295-20.956-0.703c-5.981,5.593-6.295,14.976-0.703,20.956
|
||||
c20.435,21.854,31.69,50.379,31.69,80.317c0,64.859-52.766,117.623-117.623,117.623c-64.859,0-117.623-52.766-117.623-117.623
|
||||
s52.765-117.623,117.623-117.623c8.187,0,14.827-6.638,14.827-14.827c0-8.189-6.639-14.827-14.827-14.827
|
||||
c-81.208,0-147.276,66.068-147.276,147.276c0,14.953,2.248,29.389,6.41,42.997H42.786v-167.54c0-8.189-6.638-14.827-14.827-14.827
|
||||
s-14.827,6.638-14.827,14.827v182.366c0,8.189,6.638,14.827,14.827,14.827h195.559c25.359,44.53,73.265,74.626,128.072,74.626
|
||||
c81.208,0,147.276-66.068,147.276-147.276C498.866,327.236,484.772,291.519,459.181,264.152z"/>
|
||||
<path style="fill:#B3404A;" d="M394.597,0H172.263c-0.178,0-0.353,0.021-0.529,0.027c-0.172,0.006-0.344,0.013-0.516,0.025
|
||||
c-0.636,0.044-1.268,0.117-1.889,0.242c-0.021,0.004-0.04,0.012-0.061,0.015c-0.608,0.126-1.202,0.299-1.787,0.5
|
||||
c-0.159,0.053-0.314,0.111-0.471,0.171c-0.577,0.219-1.143,0.463-1.689,0.752c-0.024,0.013-0.049,0.022-0.073,0.034
|
||||
c-0.565,0.304-1.103,0.657-1.626,1.033c-0.135,0.098-0.268,0.197-0.4,0.299c-0.519,0.4-1.023,0.824-1.49,1.296L17.428,150.099
|
||||
c-0.348,0.351-0.676,0.719-0.984,1.1c-0.212,0.261-0.399,0.534-0.59,0.805c-0.086,0.123-0.182,0.239-0.264,0.363
|
||||
c-0.219,0.331-0.415,0.673-0.603,1.017c-0.042,0.076-0.09,0.147-0.13,0.222c-0.187,0.353-0.35,0.713-0.506,1.078
|
||||
c-0.033,0.077-0.073,0.151-0.105,0.23c-0.141,0.345-0.259,0.697-0.374,1.048c-0.034,0.107-0.077,0.211-0.11,0.317
|
||||
c-0.096,0.325-0.172,0.654-0.246,0.984c-0.033,0.142-0.073,0.28-0.101,0.424c-0.059,0.304-0.096,0.609-0.136,0.915
|
||||
c-0.022,0.173-0.055,0.344-0.073,0.519c-0.028,0.302-0.034,0.605-0.044,0.907c-0.006,0.168-0.025,0.334-0.025,0.501v4.051
|
||||
c0,8.189,6.638,14.827,14.827,14.827h144.304c8.189,0,14.827-6.638,14.827-14.827V29.653h192.681v143.315
|
||||
c0,8.189,6.639,14.827,14.827,14.827s14.827-6.638,14.827-14.827V14.827C409.423,6.638,402.786,0,394.597,0z M59.498,149.757
|
||||
l91.096-91.982l6.842-6.908v98.89H59.498z"/>
|
||||
</g>
|
||||
<polygon style="fill:#F4B2B0;" points="425.039,404.045 384.233,363.241 425.039,322.435 392.394,289.792 351.59,330.597
|
||||
310.786,289.792 278.14,322.435 318.946,363.241 278.14,404.045 310.786,436.689 351.59,395.885 392.394,436.689 "/>
|
||||
<path style="fill:#B3404A;" d="M392.395,451.515c-3.932,0-7.702-1.563-10.484-4.343l-30.32-30.322l-30.32,30.322
|
||||
c-5.791,5.788-15.176,5.79-20.969,0l-32.645-32.644c-2.78-2.78-4.343-6.552-4.343-10.484s1.563-7.704,4.343-10.484l30.32-30.32
|
||||
l-30.32-30.32c-2.78-2.78-4.343-6.552-4.343-10.484c0-3.932,1.563-7.704,4.343-10.484l32.645-32.644
|
||||
c5.793-5.79,15.178-5.788,20.969,0l30.32,30.322l30.32-30.322c2.781-2.78,6.552-4.343,10.484-4.343s7.704,1.563,10.484,4.343
|
||||
l32.644,32.644c5.79,5.79,5.79,15.178,0,20.968l-30.32,30.32l30.32,30.32c5.79,5.79,5.79,15.178,0,20.968l-32.644,32.644
|
||||
C400.099,449.954,396.327,451.515,392.395,451.515z M299.11,404.045l11.676,11.676l30.32-30.322c5.791-5.79,15.176-5.79,20.969,0
|
||||
l30.32,30.322l11.676-11.676l-30.322-30.32c-5.79-5.79-5.79-15.178,0-20.969l30.322-30.32l-11.676-11.676l-30.32,30.322
|
||||
c-5.791,5.79-15.176,5.79-20.969,0l-30.32-30.322l-11.676,11.676l30.32,30.32c5.79,5.79,5.79,15.178,0,20.969L299.11,404.045z"/>
|
||||
</svg>
|
||||
</div>
|
||||
<h1>@(isExt ? _localizer.RejectionInfo1Ext() : _localizer.RejectionInfo1())</h1>
|
||||
</header>
|
||||
<section class="text-center">
|
||||
<div class="card-body p-0 m-0 ms-4">
|
||||
<p class="card-text p-0 m-0">
|
||||
<small class="text-body-secondary">
|
||||
@Html.Raw((isExt ? _localizer.RejectionInfo2Ext() : _localizer.RejectionInfo2()).Format(
|
||||
$"{sender?.Prename} {sender?.Name}",
|
||||
sender?.Email,
|
||||
envelope?.Title))
|
||||
</small>
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
17
EnvelopeGenerator.Web/Views/Envelope/EnvelopeSigned.cshtml
Normal file
17
EnvelopeGenerator.Web/Views/Envelope/EnvelopeSigned.cshtml
Normal file
@@ -0,0 +1,17 @@
|
||||
@{
|
||||
ViewData["Title"] = _localizer.DocSigned();
|
||||
}
|
||||
<div class="page container p-5">
|
||||
<header class="text-center">
|
||||
<div class="icon signed">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="72" height="72" fill="currentColor" class="bi bi-check2-circle" viewBox="0 0 16 16">
|
||||
<path d="M2.5 8a5.5 5.5 0 0 1 8.25-4.764.5.5 0 0 0 .5-.866A6.5 6.5 0 1 0 14.5 8a.5.5 0 0 0-1 0 5.5 5.5 0 1 1-11 0z" />
|
||||
<path d="M15.354 3.354a.5.5 0 0 0-.708-.708L8 9.293 5.354 6.646a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l7-7z" />
|
||||
</svg>
|
||||
</div>
|
||||
<h1>Dokument erfolgreich signiert!</h1>
|
||||
</header>
|
||||
<section class="text-center">
|
||||
<p>Sie haben das Dokument signiert. Im Anschluss erhalten Sie eine schriftliche Bestätigung.</p>
|
||||
</section>
|
||||
</div>
|
||||
219
EnvelopeGenerator.Web/Views/Envelope/ShowEnvelope.cshtml
Normal file
219
EnvelopeGenerator.Web/Views/Envelope/ShowEnvelope.cshtml
Normal file
@@ -0,0 +1,219 @@
|
||||
@{
|
||||
var nonce = _accessor.HttpContext?.Items["csp-nonce"] as string;
|
||||
var cImg = _cImgOpt.Value;
|
||||
}
|
||||
@using DigitalData.Core.Abstraction.Application;
|
||||
@using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver
|
||||
@using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiverReadOnly
|
||||
@using EnvelopeGenerator.Application.Common.Dto;
|
||||
@using EnvelopeGenerator.Web.Extensions
|
||||
@using Newtonsoft.Json
|
||||
@using Newtonsoft.Json.Serialization
|
||||
@model EnvelopeReceiverDto;
|
||||
@{
|
||||
var userCulture = ViewData["UserCulture"] as Culture;
|
||||
var envelope = Model.Envelope;
|
||||
var receiver_name = Model.Name;
|
||||
var document = Model.Envelope?.Documents?.FirstOrDefault();
|
||||
var sender = Model.Envelope?.User;
|
||||
var pages = document?.Elements?.Select(e => e.Page) ?? Array.Empty<int>();
|
||||
int? signatureCount = document?.Elements?.Count();
|
||||
var stPageIndexes = string.Join(pages.Count() > 1 ? ", " : "", pages.Take(pages.Count() - 1))
|
||||
+ (pages.Count() > 1 ? $" {_localizer.And()} " : "") + pages.LastOrDefault();
|
||||
var isReadOnly = false;
|
||||
if (ViewData["IsReadOnly"] is bool isReadOnly_bool)
|
||||
isReadOnly = isReadOnly_bool;
|
||||
|
||||
ViewData["Title"] = isReadOnly ? _localizer.ViewDoc() : _localizer.SignDoc();
|
||||
}
|
||||
<div class="envelope-view">
|
||||
@if (!isReadOnly)
|
||||
{
|
||||
<div id="flex-action-panel" class="btn-group btn_group position-fixed bottom-0 end-0 d-flex align-items-center" role="group" aria-label="Basic mixed styles example">
|
||||
<button class="btn_complete btn btn-success btn-desktop" type="button">
|
||||
<svg class="icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 16">
|
||||
<path d="m10.036 8.278 9.258-7.79A1.979 1.979 0 0 0 18 0H2A1.987 1.987 0 0 0 .641.541l9.395 7.737Z" />
|
||||
<path d="M11.241 9.817c-.36.275-.801.425-1.255.427-.428 0-.845-.138-1.187-.395L0 2.6V14a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V2.5l-8.759 7.317Z" />
|
||||
</svg>
|
||||
<span>@_localizer.Complete()</span>
|
||||
</button>
|
||||
<button class="btn_reject btn btn-danger btn-desktop" type="button">
|
||||
<svg width="25px" height="25px" viewBox="43.5 43.5 512 512" version="1.1" fill="currentColor" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<path class="st0" d="M263.24,43.5c-117.36,0-212.5,95.14-212.5,212.5s95.14,212.5,212.5,212.5s212.5-95.14,212.5-212.5 S380.6,43.5,263.24,43.5z M367.83,298.36c17.18,17.18,17.18,45.04,0,62.23v0c-17.18,17.18-45.04,17.18-62.23,0l-42.36-42.36 l-42.36,42.36c-17.18,17.18-45.04,17.18-62.23,0v0c-17.18-17.18-17.18-45.04,0-62.23L201.01,256l-42.36-42.36 c-17.18-17.18-17.18-45.04,0-62.23v0c17.18-17.18,45.04-17.18,62.23,0l42.36,42.36l42.36-42.36c17.18-17.18,45.04-17.18,62.23,0v0 c17.18,17.18,17.18,45.04,0,62.23L325.46,256L367.83,298.36z" />
|
||||
</svg>
|
||||
<span>@_localizer.Reject()</span>
|
||||
</button>
|
||||
<button class="btn_refresh btn btn-secondary btn-desktop" type="button">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-arrow-counterclockwise" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M8 3a5 5 0 1 1-4.546 2.914.5.5 0 0 0-.908-.417A6 6 0 1 0 8 2v1z" />
|
||||
<path d="M8 4.466V.534a.25.25 0 0 0-.41-.192L5.23 2.308a.25.25 0 0 0 0 .384l2.36 1.966A.25.25 0 0 0 8 4.466z" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
<div class="dd-cards-container">
|
||||
<div class="dd-card">
|
||||
<div class="dd-card-preview">
|
||||
<img src="~/img/sign_flow_horizontal.svg" class="app-logo">
|
||||
@if (!isReadOnly)
|
||||
{
|
||||
<div class="progress-container">
|
||||
<div id="signed-count-bar" class="progress"></div>
|
||||
<span class="progress-text">
|
||||
<span id="signed-count">0</span>/<span id="signature-count">@signatureCount</span> Unterschriften
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="dd-card-info">
|
||||
<div class="logo">
|
||||
<img class="@cImg["Company"].GetClassIn("Show")" src="@cImg["Company"].Src" alt="logo">
|
||||
</div>
|
||||
<h2>@($"{envelope?.Title}")</h2>
|
||||
@if (isReadOnly)
|
||||
{
|
||||
var dateTimeSt = string.Empty;
|
||||
if (ViewData["ReadOnly"] is EnvelopeReceiverReadOnlyDto readOnly)
|
||||
dateTimeSt = readOnly.DateValid.ToLongDateString();
|
||||
<h6>@string.Format(_localizer["ReadOnlyMessage"], receiver_name, dateTimeSt)</h6>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h6>@($"{@envelope?.Message}")</h6>
|
||||
}
|
||||
<p>
|
||||
<small class="text-body-secondary">
|
||||
@Html.Raw(_localizer.EnvelopeInfo2().Format(
|
||||
envelope?.AddedWhen.ToString(userCulture?.Info?.DateTimeFormat),
|
||||
$"{sender?.Prename} {sender?.Name}",
|
||||
sender?.Email,
|
||||
envelope?.Title,
|
||||
sender?.Prename,
|
||||
sender?.Name,
|
||||
sender?.Email))
|
||||
</small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if (!isReadOnly)
|
||||
{
|
||||
<div class="modal fade" id="shareBackdrop" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="shareBackdropLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<small class="modal-title text-body-secondary" id="shareBackdropLabel">Geben Sie hier den Empfänger ein, mit welchem Sie das Dokument teilen wollen:</small>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="input-group mb-3">
|
||||
<span class="input-group-text">E-Mail</span>
|
||||
<input type="text" class="form-control email-input" placeholder="user@mail.com" id="readonly-receiver-mail" aria-label="">
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<span class="input-group-text">Gültig bis</span>
|
||||
<input type="date" name="expiration" class="form-control" lang="de" id="readonly-date-valid" onkeydown="return false;" onclick="this.showPicker()"
|
||||
min="@DateTime.Today.AddDays(1).ToString("yyyy-MM-dd")"
|
||||
max="@DateTime.Today.AddDays(90).ToString("yyyy-MM-dd")"
|
||||
value="@DateTime.Today.AddDays(7).ToString("yyyy-MM-dd")">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" id="readonly-send">
|
||||
<span class="material-symbols-outlined">
|
||||
send
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div id='app'></div>
|
||||
</div>
|
||||
@if (!isReadOnly)
|
||||
{
|
||||
<script nonce="@nonce">
|
||||
document.getElementById('readonly-send').addEventListener('click', async () => {
|
||||
const receiverMail = document.getElementById('readonly-receiver-mail');
|
||||
const dateValid = document.getElementById('readonly-date-valid');
|
||||
|
||||
const receiverMail_value = receiverMail.value;
|
||||
const dateValid_value = dateValid.value;
|
||||
|
||||
//check email
|
||||
if (!receiverMail_value || receiverMail.classList.contains('is-invalid')) {
|
||||
Swal.fire({
|
||||
icon: "error",
|
||||
title: "Falsche Email",
|
||||
text: "Die E-Mail-Adresse ist ungültig. Bitte verwenden Sie das richtige Format, z. B.: user@mail.com."
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
//check the date
|
||||
const tomorrow = new Date(Date.now() + 86400000);
|
||||
if (new Date(dateValid_value) < tomorrow) {
|
||||
Swal.fire({
|
||||
icon: "error",
|
||||
title: "Falsches Datum",
|
||||
text: "Die Verteilung der Umschläge sollte mindestens einen Tag dauern."
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
shareEnvelope(receiverMail_value, dateValid_value)
|
||||
.then(res => {
|
||||
if (res.ok) {
|
||||
Swal.fire({
|
||||
title: "Gesendet",
|
||||
icon: "success"
|
||||
});
|
||||
}
|
||||
else {
|
||||
Swal.fire({
|
||||
icon: "error",
|
||||
title: `Fehler ${res.status}`,
|
||||
text: "Der Vorgang ist fehlgeschlagen. Bitte wenden Sie sich an das IT-Team."
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
Swal.fire({
|
||||
icon: "error",
|
||||
title: "Unerwarteter Fehler",
|
||||
text: "Der Vorgang ist fehlgeschlagen. Bitte wenden Sie sich an das IT-Team."
|
||||
});
|
||||
})
|
||||
|
||||
receiverMail.value = '';
|
||||
dateValid.valueAsDate = new Date(new Date().setDate(new Date().getDate() + 8));
|
||||
});
|
||||
</script>
|
||||
}
|
||||
<script nonce="@nonce">
|
||||
const collapseNav = () => {
|
||||
document.addEventListener('click', function (event) {
|
||||
var navbarToggle = document.getElementById('navbarToggleExternalContent');
|
||||
var navbarButton = document.querySelector('[data-bs-target="#navbarToggleExternalContent"]');
|
||||
var isCollapsed = new bootstrap.Collapse(navbarToggle)._isTransitioning;
|
||||
|
||||
if (!navbarToggle.contains(event.target) && !navbarButton.contains(event.target) && !isCollapsed) {
|
||||
new bootstrap.Collapse(navbarToggle).hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
@if (ViewData["DocumentBytes"] is byte[] documentBytes)
|
||||
{
|
||||
var settings = new JsonSerializerSettings
|
||||
{
|
||||
ContractResolver = new CamelCasePropertyNamesContractResolver(),
|
||||
ReferenceLoopHandling = ReferenceLoopHandling.Ignore
|
||||
};
|
||||
var envelopeReceiverJson = JsonConvert.SerializeObject(Model, settings);
|
||||
var documentBase64String = Convert.ToBase64String(documentBytes);
|
||||
var envelopeKey = ViewData["EnvelopeKey"] as string;
|
||||
|
||||
@:document.addEventListener("DOMContentLoaded", async () => await new App("@envelopeKey", @Html.Raw(envelopeReceiverJson), B64ToBuff("@Html.Raw(documentBase64String)"), "@ViewData["PSPDFKitLicenseKey"]", "@userCulture?.Info?.TwoLetterISOLanguageName").init())
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user