Skip to content

Commit 8da7de1

Browse files
committed
New and updated fields
1 parent 6ba38d7 commit 8da7de1

File tree

4 files changed

+33
-2
lines changed

4 files changed

+33
-2
lines changed

src/main/java/com/docusign/common/WorkArguments.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ public class WorkArguments {
156156

157157
private String salary;
158158

159+
private String rsus;
160+
159161
private String agentEmail;
160162

161163
private String agentName;

src/main/java/com/docusign/controller/eSignature/examples/EG042ControllerDocumentGeneration.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ protected Object doWork(WorkArguments args, ModelMap model,
4545
args.getManagerName(),
4646
args.getJobTitle(),
4747
args.getSalary(),
48+
args.getRsus(),
4849
args.getStartDate(),
4950
DOCUMENT_FILE_NAME,
5051
envelopesApi,

src/main/java/com/docusign/controller/eSignature/services/DocumentGenerationService.java

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ public final class DocumentGenerationService {
2424

2525
public static final String BONUS = "Bonus";
2626

27+
public static final String RSUS = "RSUs";
28+
2729
public static final String START_DATE = "Start_Date";
2830

2931
public static final String COMPENSATION_PACKAGE = "Compensation_Package";
@@ -61,6 +63,7 @@ public String generateDocument(
6163
String managerName,
6264
String jobTitle,
6365
String salary,
66+
String rsus,
6467
String startDate,
6568
String offerDocDocx,
6669
EnvelopesApi envelopesApi,
@@ -104,6 +107,7 @@ public String generateDocument(
104107
managerName,
105108
jobTitle,
106109
salary,
110+
rsus,
107111
startDate);
108112

109113
envelopesApi.updateEnvelopeDocGenFormFields(accountId, envelopeId, formFields);
@@ -159,6 +163,7 @@ private DocGenFormFieldRequest getFormFields(
159163
String managerName,
160164
String jobTitle,
161165
String salary,
166+
String rsus,
162167
String startDate) {
163168
DocGenFormField candidateNameField = new DocGenFormField();
164169
candidateNameField.setName(CANDIDATE_NAME);
@@ -187,7 +192,7 @@ private DocGenFormFieldRequest getFormFields(
187192
.value(SALARY),
188193
new DocGenFormField()
189194
.name(DETAILS)
190-
.value(salary)
195+
.value("$" + salary)
191196
)),
192197
new DocGenFormFieldRowValue()
193198
.docGenFormFieldList(Arrays.asList(
@@ -196,7 +201,16 @@ private DocGenFormFieldRequest getFormFields(
196201
.value(BONUS),
197202
new DocGenFormField()
198203
.name(DETAILS)
199-
.value("You will be eligible for a bonus of up to 20 percent based on your performance.")
204+
.value("20%")
205+
)),
206+
new DocGenFormFieldRowValue()
207+
.docGenFormFieldList(Arrays.asList(
208+
new DocGenFormField()
209+
.name(COMPENSATION_COMPONENT)
210+
.value(RSUS),
211+
new DocGenFormField()
212+
.name(DETAILS)
213+
.value(rsus)
200214
))
201215
));
202216

src/main/webapp/WEB-INF/templates/views/pages/esignature/examples/eg042.jsp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<c:set var="jobTitleIndex" value="3" scope="page" />
99
<c:set var="salaryIndex" value="4" scope="page" />
1010
<c:set var="startDateIndex" value="5" scope="page" />
11+
<c:set var="rsusIndex" value="6" scope="page" />
1112

1213
<h4>${example.getExampleName()}</h4>
1314
<p>${example.getExampleDescription()}</p>
@@ -92,6 +93,19 @@
9293
required>
9394
</div>
9495

96+
<div class="form-group">
97+
<label for="rsus">
98+
${example.getForms().get(formNumber).getInputs().get(rsusIndex).getInputName()}
99+
</label>
100+
101+
<input type="number"
102+
class="form-control"
103+
id="rsus"
104+
placeholder="${example.getForms().get(formNumber).getInputs().get(rsusIndex).getInputPlaceholder()}"
105+
name="rsus"
106+
required>
107+
</div>
108+
95109
<div class="form-group">
96110
<label for="startDate">
97111
${example.getForms().get(formNumber).getInputs().get(startDateIndex).getInputName()}

0 commit comments

Comments
 (0)