rbrindley: branch 2.0 r4775 - in /branches/2.0/config: ./ js/

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue May 5 15:02:24 CDT 2009


Author: rbrindley
Date: Tue May  5 15:02:21 2009
New Revision: 4775

URL: http://svn.asterisk.org/svn-view/asterisk-gui?view=rev&rev=4775
Log:

- fixed an issue where dialplan names too long break adding and editing


Modified:
    branches/2.0/config/dialplans.html
    branches/2.0/config/js/dialplans.js

Modified: branches/2.0/config/dialplans.html
URL: http://svn.asterisk.org/svn-view/asterisk-gui/branches/2.0/config/dialplans.html?view=diff&rev=4775&r1=4774&r2=4775
==============================================================================
--- branches/2.0/config/dialplans.html (original)
+++ branches/2.0/config/dialplans.html Tue May  5 15:02:21 2009
@@ -76,7 +76,7 @@
 	</TABLE>
 	<TABLE	align=center cellpadding=2 cellspacing=2 border=0>
 	<TR>	<TD align="right"><nobr>&nbsp;&nbsp;&nbsp;DialPlan Name:</nobr></TD>
-		<TD><input id="edit_dlpn_name" size=24 field_name='DialPlan Name' validation='alphanumericUnd' required='yes'></TD>
+		<TD><input id="edit_dlpn_name" size=24 maxlength="70" field_name='DialPlan Name' validation='alphanumericUnd' required='yes'></TD>
 	</TR>
 	<TR>	<TD align="right" colspan=2 height=10></TD></TR>
 

Modified: branches/2.0/config/js/dialplans.js
URL: http://svn.asterisk.org/svn-view/asterisk-gui/branches/2.0/config/js/dialplans.js?view=diff&rev=4775&r1=4774&r2=4775
==============================================================================
--- branches/2.0/config/js/dialplans.js (original)
+++ branches/2.0/config/js/dialplans.js Tue May  5 15:02:21 2009
@@ -64,6 +64,13 @@
 	if( !ASTGUI.checkRequiredFields([ DOM_edit_dlpn_name ]) ){
 		return ;
 	}
+
+	if (DOM_edit_dlpn_name.value.length > 70) {
+		ASTGUI.feedback({ msg: 'Dialplan name is too long. Please keep it under 70 chars.', showfor: 3, color: 'red'});
+		DOM_edit_dlpn_name.focus();	
+		return;
+	}
+
 	var dp_name = DOM_edit_dlpn_name.value;
 
 	if( isNewDP ){ // check if there is already a DialPlan by this name




More information about the asterisk-gui-commits mailing list