From: Steve Sutton Date: Wed, 9 Aug 2017 18:22:04 +0000 (-0400) Subject: Remove the js script for phone formating. Update phoneFormat Filter. X-Git-Tag: v2.10.5^2~1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=cd09305a767489c6ef86065d01979cac3c844c2d;p=WP-Plugins%2Fglm-member-db.git 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. --- 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 +