pari: trunk r272 - /trunk/config/setup/4.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Fri Jan 19 13:56:26 MST 2007


Author: pari
Date: Fri Jan 19 14:56:25 2007
New Revision: 272

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=272
Log:
tweak: donot let user edit the serviceprovider type once it is added

Modified:
    trunk/config/setup/4.html

Modified: trunk/config/setup/4.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/setup/4.html?view=diff&rev=272&r1=271&r2=272
==============================================================================
--- trunk/config/setup/4.html (original)
+++ trunk/config/setup/4.html Fri Jan 19 14:56:25 2007
@@ -141,8 +141,8 @@
 			}
 			var sp1 = document.createElement("img");
 			sp1.src = "../" + $('providerlogo').value ;
-			sp1.width="214";
-			sp1.height="46";
+			//sp1.width="214";
+			//sp1.height="46";
 			$('providerlogo_image').appendChild(sp1);
 		}
 	}
@@ -224,6 +224,10 @@
 
 	callbacks.beforeSaving = function(){
 			if(isnewtrunk ==1){
+				provider = $('provider').stored_config.catbyname[$('provider').value];		
+				if( typeof provider.fieldbyname['trunk_username'] != "undefined" ){
+					$('name').value = provider.fieldbyname['trunk_username'];
+				}
 				dids_array.push($('name').value );
 			}else{
 					old_trunkname = $('devices').value ;
@@ -606,6 +610,12 @@
 		$('cancel').disabled = false;
 		$('userscontent').style.display = "block";
 		$('bg_transparent').style.display = "block";
+		if ( isnewtrunk == 0){
+			$('trunkstyleanalog').disabled = true;
+			$('trunkstylevoip').disabled = true;
+			$('trunkstylecustomvoip').disabled = true;
+			$('provider').disabled = true;
+		}
 }
 
 function deleteSP(trunk){
@@ -706,10 +716,11 @@
 				<LABEL FOR="trunkstyleanalog"><input name='trunkstyle' type='radio' id='trunkstyleanalog' onclick='activateanalogvoip()' value='analog'>Analog</LABEL><BR>
 				<LABEL FOR="trunkstylevoip"><input name='trunkstyle' type='radio' id='trunkstylevoip' onclick='activateanalogvoip()' value='voip'>VoIP</LABEL><BR>
 				<LABEL FOR="trunkstylecustomvoip"><input name='trunkstyle' type='radio' id='trunkstylecustomvoip' onclick='activateanalogvoip()' value='customvoip'>Custom VoIP</LABEL>
-
+				<div id="div_providername" style="display:none">
 				<BR><BR>
 				<B>Provider Name:</B><BR>
 				<input id="name" size=10 class='input8'>
+				</div>
 				</font>
 
 <!-- Provider type -->



More information about the asterisk-gui-commits mailing list