summaryrefslogtreecommitdiff
path: root/addons/auth_totp
diff options
context:
space:
mode:
Diffstat (limited to 'addons/auth_totp')
-rw-r--r--addons/auth_totp/static/tests/totp_flow.js6
-rw-r--r--addons/auth_totp/views/templates.xml9
-rw-r--r--addons/auth_totp/views/user_preferences.xml21
3 files changed, 23 insertions, 13 deletions
diff --git a/addons/auth_totp/static/tests/totp_flow.js b/addons/auth_totp/static/tests/totp_flow.js
index 575e847f4f7..eea245041a9 100644
--- a/addons/auth_totp/static/tests/totp_flow.js
+++ b/addons/auth_totp/static/tests/totp_flow.js
@@ -42,7 +42,7 @@ tour.register('totp_tour_setup', {
trigger: 'button[name=totp_enable_wizard]',
}, {
content: "Check that we have to enter enhanced security mode",
- trigger: '.card-title:contains("confirm your password")',
+ trigger: 'div:contains("confirm your password")',
run: () => {},
}, {
content: "Input password",
@@ -126,7 +126,7 @@ tour.register('totp_login_enabled', {
trigger: 'button[name=totp_disable]',
}, {
content: "Check that we have to enter enhanced security mode",
- trigger: '.card-title:contains("confirm your password")',
+ trigger: 'div:contains("confirm your password")',
run: () => {},
}, {
content: "Input password",
@@ -225,7 +225,7 @@ tour.register('totp_admin_disables', {
trigger: 'a.dropdown-item:contains(Disable TOTP on users)'
}, { // enhanced security yo
content: "Check that we have to enter enhanced security mode",
-trigger: '.card-title:contains("confirm your password")',
+trigger: 'div:contains("confirm your password")',
run: () => {},
}, {
content: "Input password",
diff --git a/addons/auth_totp/views/templates.xml b/addons/auth_totp/views/templates.xml
index 6100317eeed..100dbbc4452 100644
--- a/addons/auth_totp/views/templates.xml
+++ b/addons/auth_totp/views/templates.xml
@@ -20,12 +20,19 @@
<p class="alert alert-danger" t-if="error" role="alert">
<t t-esc="error"/>
</p>
- <div t-attf-class="clearfix oe_login_buttons text-center mb-1 {{'pt-2' if form_small else 'pt-3'}}">
+ <div t-attf-class="clearfix oe_login_buttons text-center mb-1">
<button type="submit" class="btn btn-primary btn-block">
Verify
</button>
</div>
+ <div class="small mb-2 mt-2 text-muted">
+ <i class="fa fa-2x fa-mobile pull-left"/>
+ Open the two-factor authentication app on your
+ device to obtain a code and verify your identity
+ </div>
</form>
+ </div>
+ <div class="text-center pb-2 border-top">
<form method="POST" action="/web/session/logout" class="form-inline">
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
<button type="submit" class="btn btn-link btn-sm mb-2">
diff --git a/addons/auth_totp/views/user_preferences.xml b/addons/auth_totp/views/user_preferences.xml
index 9255b19a920..b1d70f6076b 100644
--- a/addons/auth_totp/views/user_preferences.xml
+++ b/addons/auth_totp/views/user_preferences.xml
@@ -55,7 +55,7 @@
<form>
<sheet>
<div class="row container">
- <div class="col-lg-6 offset-lg-3 mb-3">
+ <div class="mb-3">
<h3 class="font-weight-bold">Scan this barcode with your app</h3>
<div>
Scan the image below with the authenticator app on your phone.<br/>
@@ -72,7 +72,7 @@
</li>
</ul>
<!-- code outside list to have more horiz space on mobile -->
- <div class="collapse" id="collapseTotpSecret">
+ <div class="collapse col-12 col-md-6" id="collapseTotpSecret">
<div class="card card-body">
<h3>Your two-factor secret:</h3>
<code class="text-center"><field name="secret"/></code>
@@ -80,24 +80,27 @@
</div>
</div>
- <field class="offset-1 offset-lg-2" name="qrcode" readonly="True" widget="image"/>
+ <field class="offset-1" name="qrcode" readonly="True" widget="image"/>
<h3 class="font-weight-bold">Enter the 6-digit code from your app</h3>
- <div class="text-justify">
+ <div class="text-justify col-10 col-lg-6 px-0">
After scanning the barcode, the app will display a 6-digit code that you
should enter below. Don't worry if the code changes in the app,
it stays valid a bit longer.
</div>
<div class="mt-2">
- <label for="code">Verification Code</label>
- <field required="True" name="code"/>
+ <label for="code" class="col-4 col-md-12 px-0">Verification Code</label>
+ <field required="True" name="code" class="col-10 col-md-6 px-0"/>
</div>
- <button type="object" name="enable" class="btn btn-primary"
- string="Enable two-factor authentication"/>
+
</div>
</div>
</sheet>
- <footer><!-- no buttons --></footer>
+ <footer>
+ <button type="object" name="enable" class="btn btn-primary"
+ string="Enable two-factor authentication"/>
+ <button string="Cancel" special="cancel"/>
+ </footer>
</form>
</field>
</record>