pari: trunk r1206 - /trunk/config/ringgroups.html

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Tue Jul 3 15:39:55 CDT 2007


Author: pari
Date: Tue Jul  3 15:39:54 2007
New Revision: 1206

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1206
Log:
[*] Fix for GUI allowing multiple ring groups with the same name

[*] Fix for Ring Groups- Gui populates all new ring groups with old ring groups information




Modified:
    trunk/config/ringgroups.html

Modified: trunk/config/ringgroups.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/ringgroups.html?view=diff&rev=1206&r1=1205&r2=1206
==============================================================================
--- trunk/config/ringgroups.html (original)
+++ trunk/config/ringgroups.html Tue Jul  3 15:39:54 2007
@@ -161,6 +161,17 @@
 	}
 
 	if(isNewRG){ 
+		var check4duplicatename = function(){ //Check for duplicate names 
+			var rgn = _$('text_rgname').value ;
+			for( var t in ringgroups ){ if(ringgroups.hasOwnProperty(t)){ 
+				if(  rgn == ringgroups[t].rgname )return false;
+			}}
+			return true;
+		};
+		if(!check4duplicatename()){
+			gui_alert("A Ring Group with this name already Exists. Please choose a different name.");
+			return false;
+		}
 		var getnewringgroupcontext = function(){
 			var t=1;
 			while(ringgroups[t]){ t++; }
@@ -449,7 +460,8 @@
 	_$('select_voicemails').style.display = "none";
 	_$('select_vmenus').style.display = "none";
 	_$('radio_fbhgp').checked = true;
-
+	_$('text_rgname').value = '';
+	_$('text_rgExten').value = '';
 	_$('ringgroup_editdiv').style.display = '';
 	_$('text_ringTime').value = "20"; 
 




More information about the asterisk-gui-commits mailing list