Skip to content

Commit be3a1ed

Browse files
committed
ACG Fix
1 parent 7cdc722 commit be3a1ed

4 files changed

Lines changed: 153 additions & 68 deletions

File tree

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
6+
<meta name="description" content="">
7+
<meta name="author" content="">
8+
<link rel="icon" href="{{ url_for('static', filename='assets/favicon.ico') }}">
9+
<title>{{ title }}</title>
10+
<!-- Bootstrap core CSS -->
11+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
12+
<!-- Custom styles for this template -->
13+
<link href="{{ url_for('static', filename='assets/css.css') }}" rel="stylesheet">
14+
</head>
15+
16+
<body>
17+
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
18+
<a class="navbar-brand" href="/">DocuSign Examples</a>
19+
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
20+
<span class="navbar-toggler-icon"></span>
21+
</button>
22+
23+
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
24+
<ul class="navbar-nav mr-auto">
25+
<li class="nav-item active">
26+
<a class="nav-link" href="/">{{ session["manifest"]["SupportingTexts"]["HomeButton"] }} <span class="sr-only">(current)</span></a>
27+
</li>
28+
29+
{% if session['ds_user_name'] %}
30+
<li>
31+
<a class="nav-link" href="{{ url_for('ds.ds_logout') }}" id="logout"
32+
data-busy="href">{{ session["manifest"]["SupportingTexts"]["LogoutButton"] }} <span class="sr-only">(current)</span></a>
33+
</li>
34+
{% else %}
35+
<li>
36+
<a class="nav-link" href="{{ url_for('ds.ds_must_authenticate') }}" id="login"
37+
data-busy="href">{{ session["manifest"]["SupportingTexts"]["LoginButton"] }} <span class="sr-only">(current)</span></a>
38+
</li>
39+
{% endif %}
40+
41+
{% if session['ds_user_name'] %}
42+
<span class="navbar-text">
43+
Welcome {{ session['ds_user_name'] }}
44+
</span>
45+
{% endif %}
46+
47+
</div>
48+
</nav>
49+
50+
<!-- <div class="container">
51+
{% if session['ds_account_name'] %}
52+
<p>DocuSign Account: {{ session['ds_account_name'] }}.</p>
53+
{% endif %} -->
54+
55+
<div class="col-md-12 feedback" id="feedback">
56+
<h3>Working...&nbsp;&nbsp;&nbsp;<span></span></h3>
57+
</div>
58+
59+
<section id="busy" class="feedback"><div class="spinner">
60+
<div class="rect1"></div>
61+
<div class="rect2"></div>
62+
<div class="rect3"></div>
63+
<div class="rect4"></div>
64+
<div class="rect5"></div>
65+
</div>
66+
</section>
67+
68+
<p id="download-continue" class="feedback"><a href="/">Continue</a></p>
69+
70+
{% if 'ds_user_name' in session %}
71+
<div class="container">
72+
<section id="content" style="padding-top:30px;">
73+
{% else %}
74+
<div class="container-full-bg">
75+
<section id="content" style="margin-top:-60px!important; padding-top:30px!important;">
76+
{% endif %}
77+
{% block content %}{% endblock %}
78+
</section>
79+
</div>
80+
81+
<!-- Bootstrap core JavaScript
82+
================================================== -->
83+
<!-- Placed at the end of the document so the pages load faster -->
84+
85+
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
86+
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
87+
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
88+
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
89+
90+
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.5/core.min.js"></script>
91+
92+
<script src="{{ url_for('static', filename='assets/notify.min.js') }}"></script> <!-- see https://notifyjs.jpillora.com/ -->
93+
<script src="{{ url_for('static', filename='assets/eg_03.js') }}"></script>
94+
95+
<!-- Data from the server -->
96+
{% set json_messages = get_flashed_messages() | tojson %}
97+
<div id="server_data"
98+
data-server-data='{"flash": {"info": {{ json_messages | safe }} } }'
99+
class="hidden">
100+
</div>
101+
</body>
102+
</html>
Lines changed: 26 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,30 @@
1-
<!doctype html>
2-
<html lang="en">
3-
<head>
4-
<meta charset="utf-8">
5-
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
6-
<meta name="description" content="">
7-
<meta name="author" content="">
8-
<link rel="icon" href="{{ url_for('static', filename='assets/favicon.ico') }}">
9-
<title>{{ title }}</title>
10-
<!-- Bootstrap core CSS -->
11-
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
12-
integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
13-
<!-- Custom styles for this template -->
14-
</head>
1+
<!-- extend base layout --> {% extends "base.html" %} {% block content %}
152

16-
<body>
17-
<nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top">
18-
<a class="navbar-brand" target="_blank" href="https://developers.docusign.com">DocuSign Developer</a>
19-
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault"
20-
aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
21-
<span class="navbar-toggler-icon"></span>
22-
</button>
23-
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
24-
<ul class="navbar-nav mr-auto"></ul>
25-
{% if session['ds_user_name'] %}
26-
<span class="navbar-text">
27-
Welcome {{ session['ds_user_name'] }}
28-
</span>
29-
{% endif %}
30-
</div>
31-
</nav>
32-
<div class="container">
33-
<section id="content" style="padding-top: 90px;">
34-
<h4>Request a signature through your app (embedded signing)</h4>
35-
<p>Sends an envelope, then uses embedded signing for the first signer. With embedded signing, DocuSign signing is
36-
initiated from your website.</p>
3+
{% include 'example_info.html' %}
374

38-
{% if show_doc %}
39-
<p><a target='_blank' href='{{ documentation | safe }}'>Documentation</a> about this example.</p>
40-
{% endif %}
5+
{% set signer_form_index = 0 %}
6+
{% set signer_email_index = 0 %}
7+
{% set signer_name_index = 1 %}
418

42-
<p>API methods used:
43-
<a target='_blank'
44-
href="https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopes/create/">Envelopes::create</a>
45-
and
46-
<a target='_blank'
47-
href="https://developers.docusign.com/docs/esign-rest-api/reference/envelopes/envelopeviews/createrecipient/">EnvelopeViews::createRecipient</a>.
48-
</p>
49-
<p>
50-
View source file <a target="_blank" href="{{ source_url | safe }}">{{ source_file }}</a> on GitHub.
51-
</p>
9+
<form class="eg" action="" method="post" data-busy="form">
10+
{% if 'FormName' in example['Forms'][signer_form_index] %}
11+
<p>{{ example['Forms'][signer_form_index]['FormName'] | safe }}</p>
12+
{% endif %}
5213

53-
<form class="eg" action="" method="post" data-busy="form">
54-
<div class="form-group">
55-
<label for="signer_email">Signer Email</label>
56-
<input type="email" class="form-control" id="signer_email" name="signer_email"
57-
aria-describedby="emailHelp" placeholder="pat@example.com" required
58-
value="{{ signer_email }}">
59-
<small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
60-
</div>
61-
<div class="form-group">
62-
<label for="signer_name">{{ example['Forms'][recipient_form_index]['Inputs'][signer_name_index]['InputName'] }}</label>
63-
<input type="text" class="form-control" id="signer_name" placeholder="Pat Johnson" name="signer_name"
64-
value="{{ signer_name }}" required>
65-
</div>
66-
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
67-
<button type="submit" class="btn btn-docu">Submit</button>
68-
</form>
69-
</section>
70-
</div>
71-
</body>
72-
</html>
14+
<div class="form-group">
15+
<label for="signer_email">{{ example['Forms'][signer_form_index]['Inputs'][signer_email_index]['InputName'] }}</label>
16+
<input type="email" class="form-control" id="signer_email" name="signer_email"
17+
aria-describedby="emailHelp" placeholder="{{ example['Forms'][signer_form_index]['Inputs'][signer_email_index]['InputPlaceholder'] }}" required
18+
value="{{ signer_email }}">
19+
<small id="emailHelp" class="form-text text-muted">{{ session['manifest']['SupportingTexts']['HelpingTexts']['EmailWontBeShared'] | safe}}</small>
20+
</div>
21+
<div class="form-group">
22+
<label for="signer_name">{{ example['Forms'][signer_form_index]['Inputs'][signer_name_index]['InputName'] }}</label>
23+
<input type="text" class="form-control" id="signer_name" placeholder="{{ example['Forms'][signer_form_index]['Inputs'][signer_name_index]['InputPlaceholder'] }}" name="signer_name"
24+
value="{{ signer_name }}" required>
25+
</div>
26+
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
27+
{% include 'submit_button.html' %}
28+
</form>
29+
30+
{% endblock %}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<h4>{{ title }}</h4>
2+
<p>{{ example["ExampleDescription"] | safe }}</p>
3+
4+
{% if show_doc %}
5+
<p><a target='_blank' href='{{ documentation | safe }}'>Documentation</a> about this example.</p>
6+
{% endif %}
7+
8+
{% if "Note" in example %}
9+
<p>{{ example["Note"] | safe }}</p>
10+
{% endif %}
11+
12+
{% if example["LinksToAPIMethod"] | length > 1 %}
13+
{{ session["manifest"]["SupportingTexts"]["APIMethodUsedPlural"] | safe }}
14+
{% else %}
15+
{{ session["manifest"]["SupportingTexts"]["APIMethodUsed"] | safe }}
16+
{% endif %}
17+
18+
{% for link in example["LinksToAPIMethod"] -%}
19+
<a target='_blank' href="{{ link['Path'] }}">{{ link['PathName'] }}</a>
20+
{% endfor %}
21+
22+
<p>
23+
View source file <a target="_blank" href="{{ source_url | safe }}">{{ source_file }}</a> on GitHub.
24+
</p>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<button type="submit" class="btn btn-docu">{{ session['manifest']['SupportingTexts']['SubmitButton'] }}</button>

0 commit comments

Comments
 (0)