Changeset 2457
- Timestamp:
- 09/15/06 03:53:55 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/trunk/amp_conf/htdocs/admin/common/script.js.php
r2271 r2457 573 573 574 574 // *************************************************** 575 // ** Check if string s contains char c ** 576 // *************************************************** 577 578 function isInside(s, c) 579 { 580 var i; 581 582 if (isEmpty(s)) { 583 return false; 584 } 585 for (i = 0; i < s.length; i++) 586 { 587 var t = s.charAt(i); 588 if (t == c) return true; 589 } 590 return false; 591 } 592 593 // *************************************************** 575 594 // ** HELPER FUNCTIONS FOR ABOVE VALIDATIONS ** 576 595 // *************************************************** freepbx/trunk/amp_conf/htdocs/admin/modules/core/page.did.php
r2144 r2457 232 232 var msgConfirmDIDCIDBlank = "<?php echo _('Leaving the DID Number AND the Caller ID Number empty will match all incoming calls received not routed using any other defined Incoming Route.\n\nAre you sure?'); ?>"; 233 233 var msgConfirmDIDNonStd = "<?php echo _('DID information is normally just an incoming telephone number or for advanced users, a valid Asterisk Dial Pattern\n\nYou have entered a non standard DID pattern.\n\nAre you sure this is correct?'); ?>"; 234 var msgConfirmDIDNoSlash = "<?php echo _('A Slash (\'/\') is never a valid DID. Please remove it and try again'); ?>"; 234 235 235 236 setDestinations(theForm,1); … … 242 243 } 243 244 245 if (isInside(theForm.extension.value, "/")) { 246 warnInvalid(theForm.extension, msgConfirmDIDNoSlash); 247 return false; 248 } 244 249 if (!isDialpattern(theForm.cidnum.value)) 245 250 return warnInvalid(theForm.cidnum, msgInvalidCIDNum);
