Skip to content

Commit 769356e

Browse files
committed
New and updated fields
1 parent 7c6f13c commit 769356e

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

launcher-csharp/eSignature/Controllers/DocumentGeneration.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public IActionResult Create(
3232
string managerName,
3333
string jobTitle,
3434
string salary,
35+
int rsus,
3536
DateTime startDate)
3637
{
3738
string accessToken = this.RequestItemsService.User.AccessToken;
@@ -57,6 +58,7 @@ public IActionResult Create(
5758
managerName,
5859
jobTitle,
5960
salary,
61+
rsus,
6062
startDate,
6163
this.Config.OfferDocDocx);
6264
}

launcher-csharp/eSignature/Examples/DocumentGeneration.cs

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public class DocumentGeneration
2727
/// <param name="managerName">Manager name.</param>
2828
/// <param name="jobTitle">Job title.</param>
2929
/// <param name="salary">Salary for potential candidate.</param>
30+
/// <param name="rsus">Restricted stock units (RSUs) for potential candidate.</param>
3031
/// <param name="startDate">Start date of the offer.</param>
3132
/// <param name="offerDocDocx">String of bytes representing the offer document (pdf).</param>
3233
/// <returns>EnvelopeId for the new envelope.</returns>
@@ -39,6 +40,7 @@ public static string DocumentGenerationExample(
3940
string managerName,
4041
string jobTitle,
4142
string salary,
43+
int rsus,
4244
DateTime startDate,
4345
string offerDocDocx)
4446
{
@@ -76,6 +78,7 @@ public static string DocumentGenerationExample(
7678
managerName,
7779
jobTitle,
7880
salary,
81+
rsus.ToString(),
7982
startDate.ToString("MM/dd/yyyy", CultureInfo.InvariantCulture));
8083

8184
envelopesApi.UpdateEnvelopeDocGenFormFields(
@@ -201,6 +204,7 @@ public static DocGenFormFieldRequest FormFields(
201204
string managerName,
202205
string jobTitle,
203206
string salary,
207+
string rsus,
204208
string startDate)
205209
{
206210
return new DocGenFormFieldRequest
@@ -250,7 +254,7 @@ public static DocGenFormFieldRequest FormFields(
250254
new DocGenFormField
251255
{
252256
Name = "Details",
253-
Value = salary,
257+
Value = "$" + salary,
254258
},
255259
},
256260
},
@@ -266,7 +270,23 @@ public static DocGenFormFieldRequest FormFields(
266270
new DocGenFormField
267271
{
268272
Name = "Details",
269-
Value = "You will be eligible for a bonus of up to 20 percent based on your performance.",
273+
Value = "20%",
274+
},
275+
},
276+
},
277+
new DocGenFormFieldRowValue
278+
{
279+
DocGenFormFieldList = new List<DocGenFormField>
280+
{
281+
new DocGenFormField
282+
{
283+
Name = "Compensation_Component",
284+
Value = "RSUs",
285+
},
286+
new DocGenFormField
287+
{
288+
Name = "Details",
289+
Value = rsus,
270290
},
271291
},
272292
},

launcher-csharp/eSignature/Views/DocumentGeneration/eg042.cshtml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
int jobTitleIndex = 3;
88
int salaryIndex = 4;
99
int startDateIndex = 5;
10+
int rsusIndex = 6;
1011
}
1112

1213
<h4>@Html.Raw(ViewBag.CodeExampleText.ExampleName)</h4>
@@ -100,6 +101,18 @@
100101
required />
101102
</div>
102103

104+
<div class="form-group">
105+
<label for="rsus">
106+
@Html.Raw(ViewBag.CodeExampleText.Forms[formNumber].Inputs[rsusIndex].InputName)
107+
</label>
108+
<input type="number"
109+
class="form-control"
110+
id="rsus"
111+
placeholder="@ViewBag.CodeExampleText.Forms[formNumber].Inputs[rsusIndex].InputPlaceholder"
112+
name="rsus"
113+
required />
114+
</div>
115+
103116
<div class="form-group">
104117
<label for="startDate">
105118
@Html.Raw(ViewBag.CodeExampleText.Forms[formNumber].Inputs[startDateIndex].InputName)

0 commit comments

Comments
 (0)