Feature #41927 ยป set_one-time-code_for-twofa-input-fields.patch
| app/views/account/twofa_confirm.html.erb | ||
|---|---|---|
| 12 | 12 |
<%=l 'twofa_label_code' -%> |
| 13 | 13 |
<%= link_to l('twofa_resend_code'), { controller: 'account', action: 'twofa_resend' }, method: :post, class: 'lost_password' if @twofa_view[:resendable] -%>
|
| 14 | 14 |
</label> |
| 15 |
<%= text_field_tag :twofa_code, nil, tabindex: '1', autocomplete: 'off', autofocus: true -%>
|
|
| 15 |
<%= text_field_tag :twofa_code, nil, tabindex: '1', autocomplete: 'one-time-code', autofocus: true -%>
|
|
| 16 | 16 | |
| 17 | 17 |
<%= submit_tag l(:button_login), tabindex: '2', id: 'login-submit', name: :submit_otp -%> |
| 18 | 18 |
<% end %> |
| app/views/twofa/_twofa_code_form.html.erb | ||
|---|---|---|
| 3 | 3 |
<div class="tabular"> |
| 4 | 4 |
<p> |
| 5 | 5 |
<label for="twofa_code"><%=l 'twofa_label_code' -%></label> |
| 6 |
<%= text_field_tag :twofa_code, nil, autocomplete: 'off' -%>
|
|
| 6 |
<%= text_field_tag :twofa_code, nil, autocomplete: 'one-time-code' -%>
|
|
| 7 | 7 |
</p> |
| 8 | 8 |
</div> |
| 9 | 9 |
</div> |
| app/views/twofa/activate_confirm.html.erb | ||
|---|---|---|
| 12 | 12 |
<%= render partial: "twofa/#{@twofa_view[:scheme_name]}/new", locals: { twofa_view: @twofa_view } -%>
|
| 13 | 13 |
<p> |
| 14 | 14 |
<label for="twofa_code"><%=l 'twofa_label_code' -%></label> |
| 15 |
<%= text_field_tag :twofa_code, nil, autocomplete: 'off', autofocus: true -%>
|
|
| 15 |
<%= text_field_tag :twofa_code, nil, autocomplete: 'one-time-code', autofocus: true -%>
|
|
| 16 | 16 |
</p> |
| 17 | 17 |
</div> |
| 18 | 18 |
</div> |