From cd09305a767489c6ef86065d01979cac3c844c2d Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Wed, 9 Aug 2017 14:22:04 -0400 Subject: [PATCH] Remove the js script for phone formating. Update phoneFormat Filter. I updated the phone format filter so it will not mess with phone numbers that start with + sign. I commented out the phone number format js call so we can enter in international phone numbers. --- classes/glmPluginSupport.php | 4 ++++ views/admin/member/memberInfo.html | 4 ++-- views/admin/member/memberInfo/editProfileContact.html | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/classes/glmPluginSupport.php b/classes/glmPluginSupport.php index 3b4a525b..f7fe4f8a 100644 --- a/classes/glmPluginSupport.php +++ b/classes/glmPluginSupport.php @@ -530,6 +530,10 @@ function glmMembersUserCan( $cap, $permit ) */ function glmMembersFilterPhone( $config, $phone ) { + // If the number has + in front then return $phone + if ( preg_match( '/^[+]/', $phone, $matches) ) { + return $phone; + } $phone_format = ( isset( $config['settings']['phone_format'] ) && $config['settings']['phone_format'] ) ? $config['settings']['phone_format'] : 'us'; diff --git a/views/admin/member/memberInfo.html b/views/admin/member/memberInfo.html index 4443ef0a..d8dc229e 100644 --- a/views/admin/member/memberInfo.html +++ b/views/admin/member/memberInfo.html @@ -843,8 +843,8 @@ }); // Set masking for phone number fields - see http://digitalbush.com/projects/masked-input-plugin/ - $.mask.definitions['e'] = "[A-Za-z0-9: ]"; - $(".glm-phone-input").mask("999{$settings.phone_infix}999{$settings.phone_infix}9999? eeeeeeeeeee"); + //$.mask.definitions['e'] = "[A-Za-z0-9: ]"; + //$(".glm-phone-input").mask("999{$settings.phone_infix}999{$settings.phone_infix}9999? eeeeeeeeeee"); $('#glm-live-cam-type').on("change", function() { checkLiveCamType(); diff --git a/views/admin/member/memberInfo/editProfileContact.html b/views/admin/member/memberInfo/editProfileContact.html index 011b9510..7e04111b 100644 --- a/views/admin/member/memberInfo/editProfileContact.html +++ b/views/admin/member/memberInfo/editProfileContact.html @@ -6,7 +6,7 @@

Phone #:

- + {if $memberInfo.fieldFail.phone}

{$memberInfo.fieldFail.phone}

{/if}
@@ -45,4 +45,4 @@ - \ No newline at end of file + -- 2.17.1