Update envelope view title logic for confirm state
Refined the logic for setting ViewData["Title"] in ShowEnvelope.cshtml. Now, if the envelope requires read and confirm, the title displays "Confirm Document" instead of just "Sign Document" or "View Document", providing clearer context for users.
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
@using EnvelopeGenerator.Web.Extensions
|
@using EnvelopeGenerator.Web.Extensions
|
||||||
@using Newtonsoft.Json
|
@using Newtonsoft.Json
|
||||||
@using Newtonsoft.Json.Serialization
|
@using Newtonsoft.Json.Serialization
|
||||||
|
@using EnvelopeGenerator.Domain.Interfaces
|
||||||
@model EnvelopeReceiverDto;
|
@model EnvelopeReceiverDto;
|
||||||
@{
|
@{
|
||||||
var userCulture = ViewData["UserCulture"] as Culture;
|
var userCulture = ViewData["UserCulture"] as Culture;
|
||||||
@@ -24,7 +25,11 @@
|
|||||||
if (ViewData["IsReadOnly"] is bool isReadOnly_bool)
|
if (ViewData["IsReadOnly"] is bool isReadOnly_bool)
|
||||||
isReadOnly = isReadOnly_bool;
|
isReadOnly = isReadOnly_bool;
|
||||||
|
|
||||||
ViewData["Title"] = isReadOnly ? _localizer.ViewDoc() : _localizer.SignDoc();
|
ViewData["Title"] = isReadOnly
|
||||||
|
? _localizer.ViewDoc()
|
||||||
|
: envelope.IsReadAndConfirm()
|
||||||
|
? _localizer.ConfirmDoc()
|
||||||
|
: _localizer.SignDoc();
|
||||||
}
|
}
|
||||||
<div class="envelope-view">
|
<div class="envelope-view">
|
||||||
@if (!isReadOnly)
|
@if (!isReadOnly)
|
||||||
|
|||||||
Reference in New Issue
Block a user