diff options
| author | Olivier Dony <odo@odoo.com> | 2020-09-25 18:15:34 +0000 |
|---|---|---|
| committer | Olivier Dony <odo@odoo.com> | 2020-09-25 18:15:34 +0000 |
| commit | f085be23da4eab4dc4369fea9e13dc827f12bf4f (patch) | |
| tree | 7eba9979f6418f3fd814d8ff7f5570f8d0548cab /odoo | |
| parent | 6807c86d8568367f40a664a3bb69338372d4786e (diff) | |
[IMP] base, totp: simplify form layout and improve responsiveness
Some of the TOTP-related forms contained an attempt at making a centered
modal pop-up, using a bootstrap `card` that would also serve to
emphasize that the interaction was sensitive and security-related.
Some of the "footer buttons" were moved inside the form to make it
more obvious that they were part of the interaction flow.
However some of this caused breakages of responsiveness and did not yield
a really satisfactory result anyway.
This commit switches back to using regular non-centered forms. It looks
quite ugly because the content is better suited for a narrow modal, but
it means less surprises in terms of layout and less responsiveness
issues.
closes odoo/odoo#58541
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Diffstat (limited to 'odoo')
| -rw-r--r-- | odoo/addons/base/views/res_users_views.xml | 35 | ||||
| -rw-r--r-- | odoo/addons/test_apikeys/static/tests/apikey_flow.js | 2 |
2 files changed, 12 insertions, 25 deletions
diff --git a/odoo/addons/base/views/res_users_views.xml b/odoo/addons/base/views/res_users_views.xml index 51866fc0bef..a8982fe1142 100644 --- a/odoo/addons/base/views/res_users_views.xml +++ b/odoo/addons/base/views/res_users_views.xml @@ -40,32 +40,19 @@ <field name="model">res.users.identitycheck</field> <field name="arch" type="xml"> <form string="Security Control"> - <sheet> - <div class="row container"> - <div class="col-8 offset-2"> - <div class="card bg-dark my-b mx-5"> - <div class="card-header"> - <span class="fa fa-bell mx-2" t-translation="off">&nbsp;</span> - <span class="text-uppercase">Security Control</span> - </div> - <div class="card-body"> - <a href="/web/reset_password/" class="float-right">Forgot password?</a> - <h4 class="card-title">Please confirm your password to continue</h4> - <p class="card-text"> - This is necessary for security-related changes. The authorization will last for a few minutes. - </p> - <div> - <label for="password"/> - <field class="col-4" name="password" autocomplete="current-password" - required="True" password="True"/> - </div> - <button string="Confirm Password" type="object" name="run_check" class="btn btn-primary mt-3"/> - </div> - </div> - </div> + <sheet clas="bg-primary"> + <h3><strong>Please confirm your password to continue</strong></h3> + <p>This is necessary for security-related changes. The authorization will last for a few minutes.</p> + <div> + <label for="password" class="col-4 col-md-12 px-0"/> + <field class="col-10 col-md-6 px-0" name="password" autocomplete="current-password" required="True" password="True"/> </div> - <footer><!-- no buttons --></footer> </sheet> + <footer> + <button string="Confirm Password" type="object" name="run_check" class="btn btn-primary"/> + <button string="Cancel" special="cancel" class="btn btn-secondary"/> + <a href="/web/reset_password/" class="btn btn-link" role="button">Forgot password?</a> + </footer> </form> </field> </record> diff --git a/odoo/addons/test_apikeys/static/tests/apikey_flow.js b/odoo/addons/test_apikeys/static/tests/apikey_flow.js index 906ea63c005..8507f3e4001 100644 --- a/odoo/addons/test_apikeys/static/tests/apikey_flow.js +++ b/odoo/addons/test_apikeys/static/tests/apikey_flow.js @@ -24,7 +24,7 @@ tour.register('apikeys_tour_setup', { trigger: 'button:contains("New API Key")', }, { 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", |
