22
33 < h4 > 30. Apply a brand and template to an envelope</ h4 >
44
5- < p >
6- This code example demonstrates how to apply a brand to a template.
7- </ p >
5+ {% if template_ok %}
6+ < p >
7+ This code example demonstrates how to apply a brand to a template.
8+ </ p >
9+ {% endif %}
810
911 {% if show_doc %}
1012 < p > < a target ='_blank ' href ='{{ documentation | safe }} '> Documentation</ a > about this example.</ p >
@@ -19,77 +21,66 @@ <h4>30. Apply a brand and template to an envelope</h4>
1921 View source file < a target ="_blank " href ="{{ source_url | safe }} "> {{ source_file }}</ a > on GitHub.
2022 </ p >
2123
22- {% if brands and templates %}
23- < form class ="eg " action ="" method ="post " data-busy ="form ">
24- < div class ="form-group ">
25- < label for ="signer_email "> Signer Email</ label >
26- < input type ="email " class ="form-control " id ="signer_email " name ="signer_email "
27- aria-describedby ="emailHelp " placeholder ="pat@example.com " required
28- value ="{{ signer_email }} ">
29- < small id ="emailHelp " class ="form-text text-muted "> We'll never share your email with anyone else.</ small >
30- </ div >
31-
32-
33- < div class ="form-group ">
34- < label for ="signer_name "> Signer Name</ label >
35- < input type ="text " class ="form-control " id ="signer_name " placeholder ="Pat Johnson " name ="signer_name "
36- value ="{{ signer_name }} " required >
37- </ div >
38-
39-
40- < div class ="form-group ">
41- < label for ="cc_email "> CC Email</ label >
42- < input type ="email " class ="form-control " id ="cc_email " name ="cc_email "
43- aria-describedby ="emailHelp " placeholder ="pat@example.com ">
44- < small id ="emailHelp " class ="form-text text-muted "> The email and/or name for the cc recipient must be different from yhe signer.</ small >
45- </ div >
46-
47- < div class ="form-group ">
48- < label for ="cc_name "> CC Name</ label >
49- < input type ="text " class ="form-control " id ="cc_name " placeholder ="Pat Johnson " name ="cc_name ">
50- </ div >
51-
52- < div class ="form-group ">
53- < label for ="envelope_template "> Envelope template</ label >
54- < br >
55- < select id ="envelope_template " name ="envelope_template ">
56- {% for template in templates %}
57- < option value ="{{ template.template_id }} "> {{ template.name }}</ option >
58- {% endfor %}
59- </ select >
60- </ div >
61-
62- < div class ="form-group ">
63- < label for ="brand "> Brand</ label >
64- < br >
65- < select id ="brand " name ="brand ">
66- {% for brand in brands %}
67- < option value ="{{ brand.brand_id }} "> {{ brand.brand_name }}</ option >
68- {% endfor %}
69- </ select >
70- </ div >
71-
72- < div >
73- < input type ="hidden " name ="csrf_token " value ="{{ csrf_token() }} "/>
74- < button type ="submit " class ="btn btn-docu "> Submit</ button >
75- </ div >
76- </ form >
77-
78- {% elif not brands %}
79- < p > Problem: please first create the brand using < a href ="eg028 "> example 24.</ a >
80- < br />
81- Thank you.
82- </ p >
83-
84- < form class ="eg " action ="eg028 " method ="get ">
85- < button type ="submit " class ="btn btn-docu "> Continue</ button >
86- </ form >
87-
88- {% elif not templates %}
89- < p > Problem: please first create the template using < a href ="eg008 "> example 8.</ a >
90- < br />
91- Thank you.
92- </ p >
24+ {% if template_ok %}
25+ {% if brands %}
26+ < form class ="eg " action ="" method ="post " data-busy ="form ">
27+ < div class ="form-group ">
28+ < label for ="signer_email "> Signer Email</ label >
29+ < input type ="email " class ="form-control " id ="signer_email " name ="signer_email "
30+ aria-describedby ="emailHelp " placeholder ="pat@example.com " required
31+ value ="{{ signer_email }} ">
32+ < small id ="emailHelp " class ="form-text text-muted "> We'll never share your email with anyone else.</ small >
33+ </ div >
34+
35+
36+ < div class ="form-group ">
37+ < label for ="signer_name "> Signer Name</ label >
38+ < input type ="text " class ="form-control " id ="signer_name " placeholder ="Pat Johnson " name ="signer_name "
39+ value ="{{ signer_name }} " required >
40+ </ div >
41+
42+
43+ < div class ="form-group ">
44+ < label for ="cc_email "> CC Email</ label >
45+ < input type ="email " class ="form-control " id ="cc_email " name ="cc_email "
46+ aria-describedby ="emailHelp " placeholder ="pat@example.com ">
47+ < small id ="emailHelp " class ="form-text text-muted "> The email and/or name for the cc recipient must be different from yhe signer.</ small >
48+ </ div >
49+
50+ < div class ="form-group ">
51+ < label for ="cc_name "> CC Name</ label >
52+ < input type ="text " class ="form-control " id ="cc_name " placeholder ="Pat Johnson " name ="cc_name ">
53+ </ div >
54+
55+ < div class ="form-group ">
56+ < label for ="brand "> Brand</ label >
57+ < br >
58+ < select id ="brand " name ="brand ">
59+ {% for brand in brands %}
60+ < option value ="{{ brand.brand_id }} "> {{ brand.brand_name }}</ option >
61+ {% endfor %}
62+ </ select >
63+ </ div >
64+
65+ < div >
66+ < input type ="hidden " name ="csrf_token " value ="{{ csrf_token() }} "/>
67+ < button type ="submit " class ="btn btn-docu "> Submit</ button >
68+ </ div >
69+ </ form >
70+
71+ {% else %}
72+ < p > Problem: please first create the brand using < a href ="eg028 "> example 24.</ a >
73+ < br />
74+ Thank you.
75+ </ p >
76+
77+ < form class ="eg " action ="eg028 " method ="get ">
78+ < button type ="submit " class ="btn btn-docu "> Continue</ button >
79+ </ form >
80+ {% endif %}
81+ {% else %}
82+ < p > Problem: please first create the template using < a href ="eg008 "> example 8.</ a > < br />
83+ Thank you.</ p >
9384
9485 < form class ="eg " action ="eg008 " method ="get ">
9586 < button type ="submit " class ="btn btn-docu "> Continue</ button >
0 commit comments