This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from lalithkota/17.0-develop
Reg ID Auth: Removed confirmation page. And added auth response page
- Loading branch information
Showing
4 changed files
with
19 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,3 +73,6 @@ docs/_build/ | |
|
||
# OCA rules | ||
!static/lib/ | ||
|
||
# Pandoc | ||
pandoc*.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,21 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
<template id="g2p_reg_id_confirm" name="Confirm"> | ||
<t t-call="web.layout"> | ||
<t t-set="title">Confirm</t> | ||
<t t-set="head"> | ||
<script type="text/javascript"> | ||
function redirectToAuthenticate(urlParams){ | ||
if(!urlParams){ | ||
urlParams = new URLSearchParams(location.search); | ||
} | ||
location = `${location.origin}/auth_oauth/g2p_registry_id/authenticate?${urlParams}` | ||
} | ||
function authenticateWithUpdate(){ | ||
let urlParams = new URLSearchParams(location.search); | ||
urlParams.set("confirm_update", true); | ||
return redirectToAuthenticate(urlParams); | ||
} | ||
</script> | ||
</t> | ||
<div class="card" id="auth_response"> | ||
<h1>Do you want to override registry data with data from ID Provider?</h1> | ||
<p /> | ||
<button onclick="authenticateWithUpdate()">Yes</button> | ||
<button onclick="redirectToAuthenticate()">No</button> | ||
</div> | ||
</t> | ||
</template> | ||
<template id="g2p_reg_id_authenticate" name="Authenticate"> | ||
<t t-call="web.layout"> | ||
<t t-set="title">Authenticate</t> | ||
<t t-if="authentication_status"> | ||
<script>window.close()</script> | ||
</t> | ||
<t t-else=""> | ||
<div class="card" id="auth_response"> | ||
<div class="card" id="auth_response"> | ||
<t t-if="authentication_status"> | ||
<h2>Authentication Success</h2> | ||
<p>Authentication Response: <t t-out="validation" /></p> | ||
</t> | ||
<t t-else=""> | ||
<p>Encountered error while authenticating Reg Id.</p> | ||
<t t-if="debug"> | ||
<p><t t-out="error_exception" /></p> | ||
</t> | ||
<button onclick="window.close()">Ok</button> | ||
</div> | ||
</t> | ||
</t> | ||
</div> | ||
<button onclick="window.close()">Ok</button> | ||
</t> | ||
</template> | ||
</odoo> |