Skip to content

Commit fd01a79

Browse files
committed
Added error message in case there are no data verification apps
1 parent 9e50126 commit fd01a79

File tree

2 files changed

+58
-37
lines changed

2 files changed

+58
-37
lines changed

launcher-csharp/ConnectedFields/Views/Eg001SetConnectedFields/cf001.cshtml

Lines changed: 52 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -23,40 +23,55 @@
2323
">SetConnectedFields.cs</a>"))
2424
</p>
2525

26-
<form class="eg" action="" method="post" data-busy="form">
27-
<div class="form-group">
28-
<label for="signerEmail">
29-
@Html.Raw(ViewBag.CodeExampleText.Forms[formNumber].Inputs[signerEmailInputNumber].InputName)
30-
</label>
31-
<input type="email" class="form-control" id="signerEmail" name="signerEmail" aria-describedby="emailHelp"
32-
placeholder="@ViewBag.CodeExampleText.Forms[formNumber].Inputs[signerEmailInputNumber].InputPlaceholder"
33-
required value="@ViewBag.Locals.DsConfig.SignerEmail" />
34-
<small id="emailHelp"
35-
class="form-text text-muted">@Html.Raw(ViewBag.SupportingTexts.HelpingTexts.EmailWontBeShared)</small>
36-
</div>
37-
<div class="form-group">
38-
<label for="signerName">
39-
@Html.Raw(ViewBag.CodeExampleText.Forms[formNumber].Inputs[signerNameInputNumber].InputName)
40-
</label>
41-
<input type="text" class="form-control" id="signerName"
42-
placeholder="@ViewBag.CodeExampleText.Forms[formNumber].Inputs[signerNameInputNumber].InputPlaceholder"
43-
name="signerName" value="@ViewBag.Locals.DsConfig.SignerName" required />
44-
</div>
45-
<div class="form-group">
46-
<label for="apps">
47-
@Html.Raw(ViewBag.CodeExampleText.Forms[formNumber].Inputs[extensionsInputNumber].InputName)
48-
</label>
49-
50-
<select id="appId" name="appId" class="form-control">
51-
@foreach (var app in apps)
52-
{
53-
var appId = app.AppId;
54-
var applicationName = app.Tabs?[0]?.ExtensionData?.ApplicationName;
55-
56-
<option value="@appId">@applicationName</option>
57-
}
58-
</select>
59-
</div>
60-
<input type="hidden" name="_csrf" value="<%- csrfToken %>">
61-
<button type="submit" class="btn btn-primary">@Html.Raw(ViewBag.SupportingTexts.SubmitButton)</button>
62-
</form>
26+
@if (apps.Count != 0)
27+
{
28+
<form class="eg" action="" method="post" data-busy="form">
29+
<div class="form-group">
30+
<label for="signerEmail">
31+
@Html.Raw(ViewBag.CodeExampleText.Forms[formNumber].Inputs[signerEmailInputNumber].InputName)
32+
</label>
33+
<input type="email" class="form-control" id="signerEmail" name="signerEmail" aria-describedby="emailHelp"
34+
placeholder="@ViewBag.CodeExampleText.Forms[formNumber].Inputs[signerEmailInputNumber].InputPlaceholder"
35+
required value="@ViewBag.Locals.DsConfig.SignerEmail"/>
36+
<small id="emailHelp"
37+
class="form-text text-muted">@Html.Raw(ViewBag.SupportingTexts.HelpingTexts.EmailWontBeShared)</small>
38+
</div>
39+
<div class="form-group">
40+
<label for="signerName">
41+
@Html.Raw(ViewBag.CodeExampleText.Forms[formNumber].Inputs[signerNameInputNumber].InputName)
42+
</label>
43+
<input type="text" class="form-control" id="signerName"
44+
placeholder="@ViewBag.CodeExampleText.Forms[formNumber].Inputs[signerNameInputNumber].InputPlaceholder"
45+
name="signerName" value="@ViewBag.Locals.DsConfig.SignerName" required/>
46+
</div>
47+
<div class="form-group">
48+
<label for="apps">
49+
@Html.Raw(ViewBag.CodeExampleText.Forms[formNumber].Inputs[extensionsInputNumber].InputName)
50+
</label>
51+
52+
<select id="appId" name="appId" class="form-control">
53+
@foreach (var app in apps)
54+
{
55+
var appId = app.AppId;
56+
var applicationName = app.Tabs?[0]?.ExtensionData?.ApplicationName;
57+
58+
<option value="@appId">@applicationName</option>
59+
}
60+
</select>
61+
</div>
62+
<input type="hidden" name="_csrf" value="<%- csrfToken %>">
63+
<button type="submit" class="btn btn-primary">@Html.Raw(ViewBag.SupportingTexts.SubmitButton)</button>
64+
</form>
65+
}
66+
else
67+
{
68+
<p>
69+
@Html.Raw(
70+
ViewBag.CodeExampleText.CustomErrorTexts[0].ErrorMessage
71+
)
72+
</p>
73+
74+
<form class="eg" action="" method="get" data-busy="form">
75+
<button type="submit" class="btn btn-primary">@Html.Raw(ViewBag.SupportingTexts.ContinueButton)</button>
76+
</form>
77+
}

manifest/CodeExamplesManifest.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2775,6 +2775,12 @@
27752775
"Name": "no_verification_app",
27762776
"ResultsPageText": "No data verification were found in the account. Please install a data verification app.<br />You can install a phone number verification extension app by copying the following link to your browser: <a href=\"https://apps.docusign.com/app-center/app/d16f398f-8b9a-4f94-b37c-af6f9c910c04\">https://apps.docusign.com/app-center/app/d16f398f-8b9a-4f94-b37c-af6f9c910c04</a>"
27772777
}
2778+
],
2779+
"CustomErrorTexts": [
2780+
{
2781+
"ErrorMessageCheck": "NO_DATA_VERIFICATION_EXTENSIONS",
2782+
"ErrorMessage": "<p>No data verification extension apps were found in the account. Please install a <a href=\"https://apps-d.docusign.com/app-center/app/d16f398f-8b9a-4f94-b37c-af6f9c910c04\">phone number verification app from the App Center</a>.</p>"
2783+
}
27782784
]
27792785
}
27802786
]

0 commit comments

Comments
 (0)