summaryrefslogtreecommitdiff
path: root/docs/example-essay-store.rst
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2016-12-27 00:15:05 +0100
committerMarcello Stanisci <marcello.stanisci@inria.fr>2016-12-27 00:15:05 +0100
commitd13179b9f775e7467132e3cd1a5fef369cc7b37a (patch)
treec6f6e6e7c06f85a087bdec0d614a376a1e3dcfab /docs/example-essay-store.rst
parent3569ab1443bba65702d70d83b3c5f3a7fd27ebc4 (diff)
downloaddocs-d13179b9f775e7467132e3cd1a5fef369cc7b37a.tar.gz
docs-d13179b9f775e7467132e3cd1a5fef369cc7b37a.tar.bz2
docs-d13179b9f775e7467132e3cd1a5fef369cc7b37a.zip
Minor fixes on rendering
Diffstat (limited to 'docs/example-essay-store.rst')
-rw-r--r--docs/example-essay-store.rst73
1 files changed, 40 insertions, 33 deletions
diff --git a/docs/example-essay-store.rst b/docs/example-essay-store.rst
index 1d533d98..6cd86000 100644
--- a/docs/example-essay-store.rst
+++ b/docs/example-essay-store.rst
@@ -95,40 +95,47 @@ After the rendering, (part of) ``purchase.html`` will look like shown below.
.. sourcecode:: html
- ...
- <script src="/static/web-common/taler-wallet-lib.js" type="application/javascript"></script>
- <script src="/static/purchase.js" type="application/javascript"></script>
- ...
- <meta name="contract_url" value="https://shop.demo.taler.net/generate-contract?article_name=Appendix_A:_A_Note_on_Software">
-
- ...
- ...
-
- <div id="ccfakeform" class="fade">
- <p>
- Oops, it looks like you don't have a Taler wallet installed. Why don't you enter
- all your credit card details before reading the article? <em>You can also
- use GNU Taler to complete the purchase at any time.</em>
- </p>
-
- <form>
- First name<br> <input type="text"></input><br>
- Family name<br> <input type="text"></input><br>
- Age<br> <input type="text"></input><br>
- Nationality<br> <input type="text"></input><br>
- Gender<br> <input type="radio" name"gender">Male</input>
- CC number<br> <input type="text"></input><br>
- <input type="radio" name="gender">Female</input><br>
- </form>
- <form method="get" action="/cc-payment/{{ article_name }}">
- <input type="submit"></input>
- </form>
- </div>
+ <html>
+ <head>
+ <!-- ... -->
+ <script src="/static/web-common/taler-wallet-lib.js" type="application/javascript"></script>
+ <script src="/static/purchase.js" type="application/javascript"></script>
+ <!-- ... -->
+ <meta name="contract_url" value="https://shop.demo.taler.net/generate-contract?article_name=Appendix_A:_A_Note_on_Software">
+
+ </head>
+ <body>
+ <!-- ... -->
+ <!-- ... -->
- <div id="talerwait">
- <em>Processing payment with GNU Taler, please wait <span id="action-indicator"></span></em>
- </div>
- ...
+ <div id="ccfakeform" class="fade">
+ <p>
+ Oops, it looks like you don't have a Taler wallet installed. Why don't you enter
+ all your credit card details before reading the article? <em>You can also
+ use GNU Taler to complete the purchase at any time.</em>
+ </p>
+ <form>
+ First name<br> <input type="text"></input><br>
+ Family name<br> <input type="text"></input><br>
+ Age<br> <input type="text"></input><br>
+ Nationality<br> <input type="text"></input><br>
+ Gender<br> <input type="radio" name="gender">Male</input>
+ CC number<br> <input type="text"></input><br>
+ <input type="radio" name="gender">Female</input><br>
+ </form>
+
+ <form method="get" action="/cc-payment/{{ article_name }}">
+ <input type="submit"></input>
+ </form>
+ </div>
+
+ <div id="talerwait">
+ <em>Processing payment with GNU Taler, please wait <span id="action-indicator"></span></em>
+ </div>
+ <!-- ... -->
+ </body>
+ </html>
+
The script ``purchase.js`` is now in charge of implementing the behaviour we seek.
It needs to register two handlers: one called whenever the wallet is detected in the