Commit 409be03
committed
fix(extensions): allow short mobile numbers and back-fill from dial string
The mobile number field drove a 342-entry international multimask whose
country-code masks hijacked short digit input ("211..." -> "+211-..."),
and the field's mask validation requires a completed mask, so 5/6/7-digit
internal numbers could not be saved.
- Add plain 7-digit formats (0##-####..9##-####) to InputMaskPatterns.
- Partition the mask list so non-"+" (plain/national) masks are matched
before per-country "+" masks. Short numbers (<=7 digits) now keep a plain
format and complete; numbers longer than 7 digits or starting with "+"
fall through to the full per-country international formatting.
- Extract the mask setup into extension.initMobileMask() for reuse.
- Back-fill an empty mobile number from a numeric dial string override on
change, so the backend no longer drops the ExternalPhones row (and the
dial string with it) when only the override was filled. Non-numeric dial
strings are left untouched to avoid mangling them in the digit mask.
Refs #10811 parent 2acc1a7 commit 409be03
4 files changed
Lines changed: 205 additions & 39 deletions
File tree
- sites/admin-cabinet/assets/js
- pbx/Extensions
- src/Extensions
Lines changed: 62 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 71 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 61 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| 197 | + | |
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
| |||
476 | 477 | | |
477 | 478 | | |
478 | 479 | | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
487 | 505 | | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
488 | 509 | | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
499 | 517 | | |
500 | 518 | | |
501 | 519 | | |
| |||
597 | 615 | | |
598 | 616 | | |
599 | 617 | | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
600 | 643 | | |
601 | 644 | | |
602 | 645 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
71 | 82 | | |
72 | 83 | | |
73 | 84 | | |
| |||
0 commit comments