mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 01:58:07 +00:00
Fix FLEXIAPI-393 Autofill the digits when pasting a code
This commit is contained in:
parent
b0de4841f6
commit
10cdbb4b6a
2 changed files with 15 additions and 6 deletions
|
|
@ -18,6 +18,7 @@ v2.1
|
|||
- Fix FLEXIAPI-391 Add missing account view attribute in the actions.delete view
|
||||
- Fix FLEXIAPI-392 Fix the recover_by_code view and use the account space object
|
||||
- Fix FLEXIAPI-395 Remove config()->set('app.sip_domain') and directly use the correct domain
|
||||
- Fix FLEXIAPI-393 Autofill the digits when pasting a code
|
||||
|
||||
v2.0
|
||||
----
|
||||
|
|
|
|||
8
flexiapi/public/scripts/utils.js
vendored
8
flexiapi/public/scripts/utils.js
vendored
|
|
@ -113,6 +113,14 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
|||
function digitFilled(element) {
|
||||
if (element.value.length == 1) {
|
||||
element.nextElementSibling.focus();
|
||||
} else if (element.value.length == 4 && element.previousElementSibling == undefined) {
|
||||
var spread = new String(element.value);
|
||||
element.value = spread[0];
|
||||
element.nextElementSibling.value = spread[1];
|
||||
element.nextElementSibling.nextElementSibling.value = spread[2];
|
||||
element.nextElementSibling.nextElementSibling.nextElementSibling.value = spread[3];
|
||||
} else {
|
||||
element.value = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue