espiceland: branch 2.0 r5079 - in /branches/2.0/config: js/astman.js menus.html

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Sep 7 09:58:32 CDT 2010


Author: espiceland
Date: Tue Sep  7 09:58:29 2010
New Revision: 5079

URL: http://svnview.digium.com/svn/asterisk-gui?view=rev&rev=5079
Log:
Allow # and * in field which configures number to be dialed through analog trunk from voice menu.  Fixes ASTGUI-100.

Modified:
    branches/2.0/config/js/astman.js
    branches/2.0/config/menus.html

Modified: branches/2.0/config/js/astman.js
URL: http://svnview.digium.com/svn/asterisk-gui/branches/2.0/config/js/astman.js?view=diff&rev=5079&r1=5078&r2=5079
==============================================================================
--- branches/2.0/config/js/astman.js (original)
+++ branches/2.0/config/js/astman.js Tue Sep  7 09:58:29 2010
@@ -2588,7 +2588,7 @@
 					}
 					break;
 				case 'numeric_plus':
-					// check if field's value is numeric - otherwise highlight field and return false
+					// check if field's value is numeric or plus sign - otherwise highlight field and return false
 					var fb_msg = (this_field_name) ? this_field_name + ' is a numeric field.<BR> Letters and Punctuation are not allowed in this field.' : 'This is a numeric field.<BR> Letters and Punctuation are not allowed in this field.';
 					if ( /[^0-9\+]/.test(x) ){
 						ASTGUI.highlightField( field, fb_msg );
@@ -2596,7 +2596,7 @@
 					}
 					break;
 				case 'numeric_plus_w':
-					// check if field's value is numeric - otherwise highlight field and return false
+					// check if field's value is numeric, plus sign, or "w" - otherwise highlight field and return false
 					var fb_msg = (this_field_name) ? this_field_name + ' is a numeric field.<BR> Letters and Punctuation are not allowed in this field.' : 'This is a numeric field.<BR> Letters and Punctuation are not allowed in this field.';
 					if ( /[^0-9w\+]/.test(x) ){
 						ASTGUI.highlightField( field, fb_msg );
@@ -2620,6 +2620,13 @@
 				case 'alphanumericUndSpace':
 					var fb_msg = (this_field_name) ? this_field_name + ' is a AlphaNumeric field.<BR> Punctuation and Special Characters are not allowed in this field.' : 'This is a AlphaNumeric field.<BR> Punctuation and Special Characters are not allowed in this field.';
 					if ( /[^a-zA-Z_0-9 ]/.test(x) ){
+						ASTGUI.highlightField( field, fb_msg );
+						return false;
+					}
+					break;
+				case 'numeric_pound_star':
+					var fb_msg = (this_field_name) ? 'Invalid Characters in ' + this_field_name  : 'Invalid character in a Dial Pattern field.' + '  Use only numerics, pound, and star.';
+					if ( /[^0-9#\*]/.test(x) ){
 						ASTGUI.highlightField( field, fb_msg );
 						return false;
 					}

Modified: branches/2.0/config/menus.html
URL: http://svnview.digium.com/svn/asterisk-gui/branches/2.0/config/menus.html?view=diff&rev=5079&r1=5078&r2=5079
==============================================================================
--- branches/2.0/config/menus.html (original)
+++ branches/2.0/config/menus.html Tue Sep  7 09:58:29 2010
@@ -211,7 +211,7 @@
 							</select>
 							<input  class='class_newStep_details_td' id="newstep_custom" size=24>
 							<input  class='class_newStep_details_td' id="newstep_agi" size=16>
-							<input class='class_newStep_details_td' id="newstep_dial_ThisNumber" size=10 validation="dialpattern" field_name="This number" required="yes">
+							<input class='class_newStep_details_td' id="newstep_dial_ThisNumber" size=10 validation="numeric_pound_star" field_name="This number" required="yes">
 							<select class='class_newStep_details_td' id="newstep_dial_ViaTrunk"></select>
 							<input class='class_newStep_details_td' id="newstep_UserEvent_eventname" size=5>
 							<span  class='class_newStep_details_td' id='newstep_UserEvent_body_lbl'>Body:</span>




More information about the asterisk-gui-commits mailing list