Feature #7252
Add telephone field type
Description
Add a telephone field type with validation functionality. It must validate not only national phone numbers but international.
Associated revisions
Fix typo in previous commit - refs #7252
Fix more typos in previous commit - refs #7252
Add mobile phone field, filter, validation and translations - refs #7252
History
Updated by Yannick Warnier over 6 years ago
- Status changed from Assigned to Needs testing
- Assignee changed from Imanol Losada to Julio Montoya
Updated by Julio Montoya over 6 years ago
- Assignee changed from Julio Montoya to Imanol Losada
1. Lang vars missing:
TelephoneNumberIsWrong
FieldTypeTelephone
TelephonePrefix
2. PHP errors, some files are missing my branch is 1.9.x
latest commit:
commit 43dd643dc44146dbe38c278e09fe1c6377979f0d
Author: Julio Montoya <gugli100@gmail.com>
Date: Wed Sep 17 15:52:06 2014 +0200
Minor - format code.
Warning: include_once(/main/inc/lib/formvalidator/Rule/Telephone.php): failed to open stream: No such file or directory in /var/www/html/chamilo19/main/inc/lib/pear/HTML/QuickForm/RuleRegistry.php on line 126
Call Stack
# Time Memory Function Location
1 0.0000 247136 {main}( ) ../profile.php:0
2 0.0211 2188400 HTML_QuickForm->validate( ) ../profile.php:417
3 0.0217 2203136 HTML_QuickForm_RuleRegistry->validate( ) ../QuickForm.php:1612
4 0.0217 2203136 HTML_QuickForm_RuleRegistry->getRule( ) ../RuleRegistry.php:150
( ! ) Warning: include_once(): Failed opening '/main/inc/lib/formvalidator/Rule/Telephone.php' for inclusion (include_path='.:/main/inc/lib/pear:/usr/share/php:/usr/share/pear') in /main/inc/lib/pear/HTML/QuickForm/RuleRegistry.php on line 126
Call Stack
# Time Memory Function Location
1 0.0000 247136 {main}( ) ../profile.php:0
2 0.0211 2188400 HTML_QuickForm->validate( ) ../profile.php:417
3 0.0217 2203136 HTML_QuickForm_RuleRegistry->validate( ) ../QuickForm.php:1612
4 0.0217 2203136 HTML_QuickForm_RuleRegistry->getRule( ) ../RuleRegistry.php:150
( ! ) Fatal error: Class 'html_quickform_rule_telephone' not found in /main/inc/lib/pear/HTML/QuickForm/RuleRegistry.php on line 130
Call Stack
# Time Memory Function Location
1 0.0000 247136 {main}( ) ../profile.php:0
2 0.0211 2188400 HTML_QuickForm->validate( ) ../profile.php:417
3 0.0217 2203136 HTML_QuickForm_RuleRegistry->validate( ) ../QuickForm.php:1612
4 0.0217 2203136 HTML_QuickForm_RuleRegistry->getRule( ) ../RuleRegistry.php:150
Updated by Julio Montoya over 6 years ago
I created correctly the field, but when I want update my "phone" field here: main/auth/profile.php
I have those PHP errors.
Updated by Julio Montoya over 6 years ago
- Assignee changed from Julio Montoya to Imanol Losada
PR updated.
Updated by Imanol Losada over 6 years ago
- Assignee changed from Imanol Losada to Julio Montoya
PR: https://github.com/chamilo/chamilo-lms/pull/363
I had to make a new branch pulling the latest updates from 1.9.x and reapply my code changes. Something went bad in the last merge. I hope this solves the problem. Translations have been added to translate.chamilo.org.
Updated by Julio Montoya over 6 years ago
- Assignee changed from Julio Montoya to Imanol Losada
Imanol Losada wrote:
PR: https://github.com/chamilo/chamilo-lms/pull/363
I had to make a new branch pulling the latest updates from 1.9.x and reapply my code changes. Something went bad in the last merge. I hope this solves the problem. Translations have been added to translate.chamilo.org.
I have PHP warnings when trying with a phone number: 123465
Strict standards: Declaration of HTML_QuickForm_Rule_Mobile_Phone_Number::validate() should be compatible with HTML_QuickForm_Rule::validate($value, $options) in /var/www/html/chamilo19/main/inc/lib/formvalidator/Rule/MobilePhoneNumber.php on line 26
Updated by Yannick Warnier over 6 years ago
- Status changed from Needs testing to Feature implemented
- % Done changed from 80 to 100
This (the warnings) has been fixed. Closing.
Add support for phone numbers to extra fields - refs #7252