|
12 | 12 | ref="auth_password_policy.res_config_settings_view_form"
|
13 | 13 | />
|
14 | 14 | <field name="arch" type="xml">
|
15 |
| - <!-- Hide label for uniform styling --> |
16 |
| - <xpath expr="//label[@for='minlength']" position="attributes"> |
17 |
| - <attribute name="invisible">1</attribute> |
18 |
| - </xpath> |
19 |
| - |
20 |
| - <!-- Add an id for easier lookup --> |
21 |
| - <xpath |
22 |
| - expr="//field[@name='minlength']/ancestor::div[hasclass('o_setting_box')]" |
23 |
| - position="attributes" |
24 |
| - > |
25 |
| - <attribute name="id">password_policy</attribute> |
26 |
| - </xpath> |
27 |
| - |
28 |
| - <!-- Move the settings box to desired location --> |
29 |
| - <xpath expr="//div[@id='enable_password_reset']" position="after"> |
30 |
| - <xpath expr="//div[@id='password_policy']" position="move" /> |
31 |
| - </xpath> |
32 |
| - |
33 | 15 | <!-- Ensure our settings will come after any former customization -->
|
34 |
| - <xpath |
35 |
| - expr="//div[@id='password_policy']//div[hasclass('o_setting_right_pane')]/*" |
36 |
| - position="after" |
37 |
| - > |
38 |
| - <label string="Password Policy" for="password_expiration" /> |
39 |
| - <div class="content-group"> |
40 |
| - <div class="mt16"> |
| 16 | + <xpath expr="//block[@id='user_default_rights']" position="after"> |
| 17 | + <block title="Password Policy" id="password_policy"> |
| 18 | + <setting> |
41 | 19 | <span>
|
42 |
| - Password expires in |
43 |
| - <field name="password_expiration" class="oe_inline" /> |
44 |
| - days. |
| 20 | + Password expires in <field |
| 21 | + name="password_expiration" |
| 22 | + class="oe_inline" |
| 23 | + /> days. |
45 | 24 | </span>
|
46 |
| - </div> |
47 |
| - <div class="mt16"> |
| 25 | + </setting> |
| 26 | + <setting> |
48 | 27 | <span>
|
49 |
| - User can change password in |
50 |
| - <field name="password_minimum" class="oe_inline" /> |
51 |
| - hours again. |
| 28 | + User can change password in <field |
| 29 | + name="password_minimum" |
| 30 | + class="oe_inline" |
| 31 | + /> hours again. |
52 | 32 | </span>
|
53 |
| - </div> |
54 |
| - <div class="mt16"> |
| 33 | + </setting> |
| 34 | + |
| 35 | + <setting> |
55 | 36 | <span>
|
56 | 37 | Disallow reuse of
|
57 | 38 | <field name="password_history" class="oe_inline" />
|
|
60 | 41 | <div class="text-muted">
|
61 | 42 | Use negative number for infinite, or 0 to disable
|
62 | 43 | </div>
|
63 |
| - </div> |
64 |
| - <div class="mt16"> |
| 44 | + </setting> |
| 45 | + <setting> |
65 | 46 | <span>
|
66 | 47 | Minimum number of lowercase characters
|
67 |
| - <field name="password_lower" class="oe_inline" /> |
| 48 | + <field name="password_lower" /> |
68 | 49 | </span>
|
69 |
| - </div> |
70 |
| - <div class="mt16"> |
| 50 | + </setting> |
| 51 | + <setting> |
71 | 52 | <span>
|
72 | 53 | Minimum number of uppercase characters
|
73 |
| - <field name="password_upper" class="oe_inline" /> |
| 54 | + <field name="password_upper" /> |
74 | 55 | </span>
|
75 |
| - </div> |
76 |
| - <div class="mt16"> |
| 56 | + </setting> |
| 57 | + <setting> |
77 | 58 | <span>
|
78 | 59 | Minimum number of numeric characters
|
79 |
| - <field name="password_numeric" class="oe_inline" /> |
| 60 | + <field name="password_numeric" /> |
80 | 61 | </span>
|
81 |
| - </div> |
82 |
| - <div class="mt16"> |
| 62 | + </setting> |
| 63 | + <setting> |
83 | 64 | <span>
|
84 | 65 | Minimum number of special characters
|
85 |
| - <field name="password_special" class="oe_inline" /> |
| 66 | + <field name="password_special" /> |
86 | 67 | </span>
|
87 |
| - </div> |
88 |
| - <div class="mt16"> |
89 |
| - <span id="minlength"> |
90 |
| - Minimum number of characters |
91 |
| - </span> |
92 |
| - </div> |
93 |
| - </div> |
94 |
| - </xpath> |
95 |
| - |
96 |
| - <!-- Add oe_inline attribute to minlength --> |
97 |
| - <xpath expr="//field[@name='minlength']" position="attributes"> |
98 |
| - <attribute name="class">oe_inline</attribute> |
| 68 | + </setting> |
| 69 | + </block> |
99 | 70 | </xpath>
|
100 | 71 |
|
101 | 72 | <!-- Move the minlength field to desired location -->
|
102 |
| - <xpath expr="//span[@id='minlength']" position="inside"> |
103 |
| - <xpath expr="//field[@name='minlength']" position="move" /> |
| 73 | + <xpath expr="//block[@id='password_policy']" position="inside"> |
| 74 | + <xpath expr="//field[@name='minlength']/.." position="move" /> |
| 75 | + <xpath |
| 76 | + expr="//field[@name='auth_signup_reset_password']/.." |
| 77 | + position="move" |
| 78 | + /> |
104 | 79 | </xpath>
|
105 | 80 | </field>
|
106 | 81 | </record>
|
|
0 commit comments