Skip to content

Commit 7a2d8d2

Browse files
committed
New and updated fields
1 parent 44a5357 commit 7a2d8d2

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

src/Controllers/Examples/eSignature/EG042DocumentGeneration.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public function getTemplateArgs(): array
6868
'manager_name' => $this->checkInputValues($_POST['manager_name']),
6969
'job_title' => $_POST['job_title'],
7070
'salary' => $_POST['salary'],
71+
'rsus' => $_POST['rsus'],
7172
'start_date' => $_POST['start_date'],
7273
];
7374

src/Services/Examples/eSignature/DocumentGenerationService.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public static function formFields(array $args, $documentId): DocGenFormFieldRequ
201201
]),
202202
new DocGenFormField([
203203
'name' => 'Details',
204-
'value' => $args['salary']
204+
'value' => '$' . $args['salary']
205205
])
206206
]
207207
]),
@@ -213,7 +213,19 @@ public static function formFields(array $args, $documentId): DocGenFormFieldRequ
213213
]),
214214
new DocGenFormField([
215215
'name' => 'Details',
216-
'value' => 'You will be eligible for a bonus of up to 20 percent based on your performance.'
216+
'value' => '20%'
217+
])
218+
]
219+
]),
220+
new DocGenFormFieldRowValue([
221+
'doc_gen_form_field_list' => [
222+
new DocGenFormField([
223+
'name' => 'Compensation_Component',
224+
'value' => 'RSUs'
225+
]),
226+
new DocGenFormField([
227+
'name' => 'Details',
228+
'value' => $args['rsus']
217229
])
218230
]
219231
])

templates/esignature/eg042_document_generation.html

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

1112
<h4>{{ code_example_text['ExampleName'] | raw }}</h4>
1213
<p>{{ code_example_text["ExampleDescription"] | raw }}</p>
@@ -111,6 +112,19 @@ <h4>{{ code_example_text['ExampleName'] | raw }}</h4>
111112
required>
112113
</div>
113114

115+
<div class="form-group">
116+
<label for="rsus">
117+
{{ code_example_text['Forms'][formNumber]['Inputs'][rsusIndex]['InputName'] | raw }}
118+
</label>
119+
120+
<input type="number"
121+
class="form-control"
122+
id="rsus"
123+
placeholder="{{code_example_text['Forms'][formNumber]['Inputs'][rsusIndex]['InputPlaceholder']}}"
124+
name="rsus"
125+
required>
126+
</div>
127+
114128
<div class="form-group">
115129
<label for="start_date">
116130
{{ code_example_text['Forms'][formNumber]['Inputs'][startDateIndex]['InputName'] | raw }}

0 commit comments

Comments
 (0)