Phone nums trimmed, separation character replaced
authorLaury GvR <laury@gaslightmedia.com>
Wed, 31 Aug 2016 13:06:59 +0000 (09:06 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Wed, 31 Aug 2016 13:06:59 +0000 (09:06 -0400)
- Trimmed the spaces from phone numbers on the front views using
jQuery.
- Replaced the phone number separation character with whatever is
setin the admin side management.

views/front/members/detail.html

index b4a6e5c..26b3981 100644 (file)
         
         jQuery(document).ready(function($) {
 
+            // Replace all non-number special characters in a phone number with the designated infix
+            //$('.glm-member-detail-contact-phone .glm-field-value').html() = $('.glm-member-detail-contact-phone .glm-field-value').html().replace(/\W/g, '{$settings.phone_infix}');
+            var processedPhone = $('.glm-member-detail-contact-phone .glm-field-value').text().trim().replace(/\W/g, '{$settings.phone_infix}'.trim());    
+            $('.glm-member-detail-contact-phone .glm-field-value').text(processedPhone);
+
+            
             // Check a hidden field to see if this is a page refresh (doesn't detect forced reload)
             var isRefresh = $("#glm-member-detail-click-logged").val();