summaryrefslogtreecommitdiff
path: root/addons/portal/static/src/xml
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2017-08-28 12:12:06 +0200
committerThibault Delavallée <tde@odoo.com>2017-09-06 10:36:37 +0200
commit27f0d3115e2dc2b6a4e4a8486efbfe44072b78b2 (patch)
treeb7443817022089838d47cbe94511c1aa1b162216 /addons/portal/static/src/xml
parent93436f45f962e8abe34bd68ac504faaa61354929 (diff)
[IMP] portal: add a generic signature widget to be used in customer portal
This generic widget allow to confirm and sign documents on the customer portal. Purpose is to reuse it in sale customer portal and online quotes notably. It is made generic to call a route using parameters given to the widget. It also supports access token to ease its use in various customer portal pages where the customer is not always connected but is granted access through an access token.
Diffstat (limited to 'addons/portal/static/src/xml')
-rw-r--r--addons/portal/static/src/xml/portal_signature.xml30
1 files changed, 30 insertions, 0 deletions
diff --git a/addons/portal/static/src/xml/portal_signature.xml b/addons/portal/static/src/xml/portal_signature.xml
new file mode 100644
index 00000000000..a82d7ec89aa
--- /dev/null
+++ b/addons/portal/static/src/xml/portal_signature.xml
@@ -0,0 +1,30 @@
+<templates id="template" xml:space="preserve">
+ <t t-name="portal.portal_signature">
+ <form id="o_portal_sign_accept" method="POST">
+ <input type="hidden" name="csrf_token" t-att-value="widget.options.csrf_token"/>
+ <div class="form-group">
+ <label class="control-label" for="name">Your Name</label>
+ <input type="text" name="partner_name" id="o_portal_sign_name" class="form-control" t-att-value="widget.options.partnerName"/>
+ </div>
+ <div class="panel panel-default mt16 mb0" id="o_portal_sign_draw">
+ <div class="panel-heading">
+ <div class="pull-right">
+ <a id="o_portal_sign_clear" class="btn btn-xs">Clear</a>
+ </div>
+ <strong>Draw your signature</strong>
+ </div>
+ <div id="o_portal_signature" class="panel-body" style="padding: 0"/>
+ </div>
+ <div>
+ <button type="submit" class="btn btn-primary o_portal_sign_submit">Sign &amp; Confirm</button>
+ </div>
+ </form>
+ </t>
+ <t t-name="portal.portal_signature_success">
+ <div class="alert alert-success" role="alert">
+ <strong>Well done!</strong><br />
+ <span t-esc="widget.success_msg"/>
+ <a t-att-href="widget.redirect_url">Click here to see your document.</a>
+ </div>
+ </t>
+</templates> \ No newline at end of file