| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e0ba4ca commit b595fae
5 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,6 +29,7 @@ | |||
| 29 | 29 | "doc_terms_pdf": "Term_Of_Service.pdf", | |
| 30 | 30 | "doc_txt": "Welcome.txt", | |
| 31 | 31 | "doc_offer_letter": "Offer_Letter_Demo.docx", | |
| 32 | + "doc_dynamic_table": "Offer_Letter_Dynamic_Table.docx", | ||
| 32 | 33 | # Payment gateway information is optional | |
| 33 | 34 | "gateway_account_id": "{DS_PAYMENT_GATEWAY_ID}", | |
| 34 | 35 | "gateway_name": "stripe", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,7 +3,7 @@ | |||
| 3 | 3 | from os import path | |
| 4 | 4 | from docusign_esign import EnvelopesApi, TemplatesApi, EnvelopeDefinition, Document, Signer, SignHere, \ | |
| 5 | 5 | DateSigned, Tabs, Recipients, DocGenFormField, EnvelopeTemplate, TemplateRole, DocGenFormFields, \ | |
| 6 | - DocGenFormFieldRequest, Envelope | ||
| 6 | + DocGenFormFieldRequest, Envelope, DocGenFormFieldRowValue | ||
| 7 | 7 | ||
| 8 | 8 | from ...consts import demo_docs_path, pattern | |
| 9 | 9 | from ...ds_config import DS_CONFIG | |
@@ -20,8 +20,9 @@ def get_args(): | |||
| 20 | 20 | "manager_name": pattern.sub("", request.form.get("manager_name")), | |
| 21 | 21 | "job_title": pattern.sub("", request.form.get("job_title")), | |
| 22 | 22 | "salary": pattern.sub("", request.form.get("salary")), | |
| 23 | + "rsus": pattern.sub("", request.form.get("rsus")), | ||
| 23 | 24 | "start_date": pattern.sub("", request.form.get("start_date")), | |
| 24 | - "doc_file": path.join(demo_docs_path, DS_CONFIG["doc_offer_letter"]) | ||
| 25 | + "doc_file": path.join(demo_docs_path, DS_CONFIG["doc_dynamic_table"]) | ||
| 25 | 26 | } | |
| 26 | 27 | args = { | |
| 27 | 28 | "account_id": session["ds_account_id"], | |
@@ -164,7 +165,7 @@ def recipient_tabs(cls): | |||
| 164 | 165 | anchor_y_offset="-22" | |
| 165 | 166 | ) | |
| 166 | 167 | date_signed = DateSigned( | |
| 167 | - anchor_string="Date", | ||
| 168 | + anchor_string="Date Signed", | ||
| 168 | 169 | anchor_units="pixels", | |
| 169 | 170 | anchor_y_offset="-22" | |
| 170 | 171 | ) | |
@@ -197,6 +198,7 @@ def make_envelope(cls, template_id, args): | |||
| 197 | 198 | #ds-snippet-start:eSign42Step7 | |
| 198 | 199 | @classmethod | |
| 199 | 200 | def form_fields(cls, args, document_id_guid): | |
| 201 | + bonus_value = "20%" | ||
| 200 | 202 | doc_gen_form_field_request = DocGenFormFieldRequest( | |
| 201 | 203 | doc_gen_form_fields=[ | |
| 202 | 204 | DocGenFormFields( | |
@@ -214,13 +216,51 @@ def form_fields(cls, args, document_id_guid): | |||
| 214 | 216 | name="Job_Title", | |
| 215 | 217 | value=args["job_title"] | |
| 216 | 218 | ), | |
| 217 | - DocGenFormField( | ||
| 218 | - name="Salary", | ||
| 219 | - value=args["salary"] | ||
| 220 | - ), | ||
| 221 | 219 | DocGenFormField( | |
| 222 | 220 | name="Start_Date", | |
| 223 | 221 | value=args["start_date"] | |
| 222 | + ), | ||
| 223 | + DocGenFormField( | ||
| 224 | + name="Compensation_Package", | ||
| 225 | + type="TableRow", | ||
| 226 | + row_values=[ | ||
| 227 | + DocGenFormFieldRowValue( | ||
| 228 | + doc_gen_form_field_list=[ | ||
| 229 | + DocGenFormField( | ||
| 230 | + name="Compensation_Component", | ||
| 231 | + value="Salary" | ||
| 232 | + ), | ||
| 233 | + DocGenFormField( | ||
| 234 | + name="Details", | ||
| 235 | + value=f"${args['salary']}" | ||
| 236 | + ) | ||
| 237 | + ] | ||
| 238 | + ), | ||
| 239 | + DocGenFormFieldRowValue( | ||
| 240 | + doc_gen_form_field_list=[ | ||
| 241 | + DocGenFormField( | ||
| 242 | + name="Compensation_Component", | ||
| 243 | + value="Bonus" | ||
| 244 | + ), | ||
| 245 | + DocGenFormField( | ||
| 246 | + name="Details", | ||
| 247 | + value=bonus_value | ||
| 248 | + ) | ||
| 249 | + ] | ||
| 250 | + ), | ||
| 251 | + DocGenFormFieldRowValue( | ||
| 252 | + doc_gen_form_field_list=[ | ||
| 253 | + DocGenFormField( | ||
| 254 | + name="Compensation_Component", | ||
| 255 | + value="RSUs" | ||
| 256 | + ), | ||
| 257 | + DocGenFormField( | ||
| 258 | + name="Details", | ||
| 259 | + value=args["rsus"] | ||
| 260 | + ) | ||
| 261 | + ] | ||
| 262 | + ) | ||
| 263 | + ] | ||
| 224 | 264 | ) | |
| 225 | 265 | ] | |
| 226 | 266 | ) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,6 +9,7 @@ | |||
| 9 | 9 | {% set job_title_index = 3 %} | |
| 10 | 10 | {% set salary_index = 4 %} | |
| 11 | 11 | {% set start_date_index = 5 %} | |
| 12 | + {% set rsus_index = 6 %} | ||
| 12 | 13 | ||
| 13 | 14 | <form class="eg" action="" method="post" data-busy="form"> | |
| 14 | 15 | {% if 'FormName' in example['Forms'][form_index] %} | |
@@ -36,15 +37,19 @@ | |||
| 36 | 37 | <label for="job_title">{{ example['Forms'][form_index]['Inputs'][job_title_index]['InputName'] }}</label> | |
| 37 | 38 | <select class="form-control" id="job_title" name="job_title"> | |
| 38 | 39 | <option value="Software Engineer">Software Engineer</option> | |
| 39 | - <option value="Product Manager">Product Manager</option> | ||
| 40 | - <option value="Sales Representative">Sales Representative</option> | ||
| 40 | + <option value="Account Executive">Account Executive</option> | ||
| 41 | 41 | </select> | |
| 42 | 42 | </div> | |
| 43 | 43 | <div class="form-group"> | |
| 44 | 44 | <label for="salary">{{ example['Forms'][form_index]['Inputs'][salary_index]['InputName'] }}</label> | |
| 45 | 45 | <input type="text" class="form-control" id="salary" placeholder="{{ example['Forms'][form_index]['Inputs'][salary_index]['InputPlaceholder'] }}" name="salary" | |
| 46 | 46 | required /> | |
| 47 | 47 | </div> | |
| 48 | + <div class="form-group"> | ||
| 49 | + <label for="rsus">{{ example['Forms'][form_index]['Inputs'][rsus_index]['InputName'] }}</label> | ||
| 50 | + <input type="number" class="form-control" id="rsus" placeholder="{{ example['Forms'][form_index]['Inputs'][rsus_index]['InputPlaceholder'] }}" name="rsus" | ||
| 51 | + min="0" required /> | ||
| 52 | + </div> | ||
| 48 | 53 | <div class="form-group"> | |
| 49 | 54 | <label for="start_date">{{ example['Forms'][form_index]['Inputs'][start_date_index]['InputName'] }}</label> | |
| 50 | 55 | <input type="date" class="form-control" id="start_date" placeholder="{{ example['Forms'][form_index]['Inputs'][start_date_index]['InputPlaceholder'] }}" name="start_date" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,7 @@ cffi==1.15.1 | |||
| 4 | 4 | chardet==5.1.0 | |
| 5 | 5 | Click | |
| 6 | 6 | cryptography==39.0.0 | |
| 7 | - docusign-esign==3.24.0 | ||
| 7 | + docusign-esign==3.26.0rc1 | ||
| 8 | 8 | docusign-rooms==1.3.0 | |
| 9 | 9 | docusign-monitor==1.2.0 | |
| 10 | 10 | docusign-click==1.4.0 | |
| Back | FazBrowse Home | New Git URL |
0 commit comments