|
1 | 1 | <% include ../../partials/examplesHead %> |
2 | 2 |
|
3 | 3 | <h4>30. Applying a brand to a template</h4> |
4 | | -<p> |
5 | | - This code example demonstrates how to apply a brand to a |
6 | | -</p> |
| 4 | +<% if (templateOk) { %> |
| 5 | + <p>This code example demonstrates how to apply a brand to a template</p> |
| 6 | + <p>The access-code to utilize the example provided is: <strong>NJ9@D1</strong></p> |
| 7 | +<% } %> |
7 | 8 |
|
8 | 9 | <% include ../../partials/docBody %> |
9 | 10 |
|
|
12 | 13 | <a target='_blank' href="https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/create/">Envelopes::create</a>. |
13 | 14 | </p> |
14 | 15 |
|
15 | | -<p>The access-code to utilize the example provided is: <strong>NJ9@D1</strong></p> |
16 | 16 | <% include ../../partials/gitSource %> |
17 | 17 |
|
18 | | -<% if (brands.length !== 0 && templates.length !== 0) { %> |
19 | | - <form class="eg" action="" method="post" data-busy="form"> |
20 | | - <div class="form-group"> |
| 18 | +<% if (templateOk) { %> |
| 19 | + <% if (brands.length !== 0) { %> |
| 20 | + <form class="eg" action="" method="post" data-busy="form"> |
| 21 | + <div class="form-group"> |
21 | 22 | <label for="signerEmail">Signer Email</label> |
22 | 23 | <input type="email" class="form-control" id="signerEmail" name="signerEmail" |
23 | 24 | aria-describedby="emailHelp" placeholder="pat@example.com" required |
24 | 25 | value="<%= locals.dsConfig.signerEmail%>"> |
25 | 26 | <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small> |
26 | | - </div> |
27 | | - <div class="form-group"> |
| 27 | + </div> |
| 28 | + <div class="form-group"> |
28 | 29 | <label for="signerName">Signer Name</label> |
29 | 30 | <input type="text" class="form-control" id="signerName" placeholder="Pat Johnson" name="signerName" |
30 | 31 | value="<%= locals.dsConfig.signerName%>" required> |
31 | | - </div> |
32 | | - <div class="form-group"> |
| 32 | + </div> |
| 33 | + <div class="form-group"> |
33 | 34 | <label for="ccEmail">CC Email</label> |
34 | 35 | <input type="email" class="form-control" id="ccEmail" name="ccEmail" |
35 | 36 | aria-describedby="emailHelp" placeholder="pat@example.com" required /> |
36 | 37 | <small id="emailHelp" class="form-text text-muted">The email and/or name for the cc recipient must be different from the signer.</small> |
37 | | - </div> |
38 | | - <div class="form-group"> |
| 38 | + </div> |
| 39 | + <div class="form-group"> |
39 | 40 | <label for="ccName">CC Name</label> |
40 | 41 | <input type="text" class="form-control" id="ccName" placeholder="Pat Johnson" name="ccName" |
41 | 42 | required> |
42 | | - </div> |
43 | | - <div class="form-group"> |
44 | | - <label for="templateId">Envelope template</label> |
45 | | - <select id="templateId" name="templateId" class="form-control"> |
46 | | - <% templates.forEach( template => { %> |
47 | | - <option value="<%= template.templateId %>" selected> <%= template.name %> </option> |
48 | | - <% }) %> |
49 | | - </select> |
50 | | - </div> |
51 | | - <div class="form-group"> |
| 43 | + </div> |
| 44 | + <div class="form-group"> |
52 | 45 | <label for="brandId">Brand</label> |
53 | 46 | <select id="brandId" name="brandId" class="form-control"> |
54 | 47 | <% brands.forEach( brand => { %> |
55 | 48 | <option value="<%= brand.brandId %>" selected> <%= brand.brandName %> </option> |
56 | 49 | <% }) %> |
57 | 50 | </select> |
58 | | - </div> |
59 | | - <input type="hidden" name="_csrf" value="<%- csrfToken %>"> |
60 | | - <button type="submit" class="btn btn-docu">Submit</button> |
61 | | -</form> |
62 | | -<% } else if(brands.length === 0) { %> |
63 | | - <p>Problem: please first create the brand using <a href="eg028">example 28.</a> <br/> |
64 | | - Thank you.</p> |
| 51 | + </div> |
| 52 | + <input type="hidden" name="_csrf" value="<%- csrfToken %>"> |
| 53 | + <button type="submit" class="btn btn-docu">Submit</button> |
| 54 | + </form> |
| 55 | + <% } else { %> |
| 56 | + <p>Problem: please first create the brand using <a href="eg028">example 28.</a> <br/> |
| 57 | + Thank you.</p> |
65 | 58 |
|
66 | | - <form class="eg" action="eg028" method="get"> |
| 59 | + <form class="eg" action="eg028" method="get"> |
67 | 60 | <button type="submit" class="btn btn-docu">Continue</button> |
68 | | - </form> |
69 | | -<% } else if(templates.length === 0) { %> |
| 61 | + </form> |
| 62 | + <% } %> |
| 63 | +<% } else { %> |
70 | 64 | <p>Problem: please first create the template using <a href="eg008">example 8.</a> <br/> |
71 | 65 | Thank you.</p> |
72 | | -
|
73 | | - <form class="eg" action="eg008" method="get"> |
74 | | - <button type="submit" class="btn btn-docu">Continue</button> |
75 | | - </form> |
| 66 | + |
| 67 | + <form class="eg" action="eg008" method="get"> |
| 68 | + <button type="submit" class="btn btn-docu">Continue</button> |
| 69 | + </form> |
76 | 70 | <% } %> |
77 | 71 |
|
78 | 72 | <% include ../../partials/examplesFoot %> |
0 commit comments