pari: branch 2.0 r4142 - /branches/2.0/config/trunks_voip.html

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Wed Nov 19 10:39:22 CST 2008


Author: pari
Date: Wed Nov 19 10:39:22 2008
New Revision: 4142

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=4142
Log:

 'authuser' option in 'Edit Trunks'




Modified:
    branches/2.0/config/trunks_voip.html

Modified: branches/2.0/config/trunks_voip.html
URL: http://svn.digium.com/view/asterisk-gui/branches/2.0/config/trunks_voip.html?view=diff&rev=4142&r1=4141&r2=4142
==============================================================================
--- branches/2.0/config/trunks_voip.html (original)
+++ branches/2.0/config/trunks_voip.html Wed Nov 19 10:39:22 2008
@@ -133,7 +133,7 @@
 
 	if( isNewTrunk == true ) {
 		DOM_edit_VOIPTrunk_DIV_Title.innerHTML = 'Create New SIP/IAX trunk';
-		ASTGUI.resetTheseFields([ DOM_edit_VOIPTrunk_Type, DOM_edit_VOIPTrunk_Hostname , DOM_edit_VOIPTrunk_Username ,  DOM_edit_VOIPTrunk_Password , 'trunk_obcid' , 'edit_VOIPTrunk_Providername','trunk_fromdomain', 'trunk_fromuser', 'trunk_insecure' ]);
+		ASTGUI.resetTheseFields([ DOM_edit_VOIPTrunk_Type, DOM_edit_VOIPTrunk_Hostname , DOM_edit_VOIPTrunk_Username ,  DOM_edit_VOIPTrunk_Password , 'trunk_obcid' , 'edit_VOIPTrunk_Providername','trunk_fromdomain', 'trunk_fromuser','trunk_authuser', 'trunk_insecure' ]);
 		DOM_edit_VOIPTrunk_Type.disabled = false;
 		DOM_edit_VOIPTrunk_Context_Basis.disabled = false;
 		ASTGUI.feedback( { msg: 'Create New Trunk', showfor:2 });
@@ -155,6 +155,7 @@
 		ASTGUI.updateFieldToValue( 'edit_VOIPTrunk_Providername' , tinfo.getProperty('trunkname') );
 		ASTGUI.updateFieldToValue( 'trunk_fromdomain' , tinfo.getProperty('fromdomain') );
 		ASTGUI.updateFieldToValue( 'trunk_fromuser' , tinfo.getProperty('fromuser') );
+		ASTGUI.updateFieldToValue( 'trunk_authuser' , tinfo.getProperty('authuser') );
 		ASTGUI.updateFieldToValue( 'trunk_insecure' , tinfo.getProperty('insecure') );
 
 		if( tinfo.getProperty('allow') == 'all'){
@@ -316,6 +317,17 @@
 				}
 			}
 
+			var tmp_authuser = ASTGUI.getFieldValue('trunk_authuser') ;
+			if( tmp_authuser ){
+				x.new_action('update', EDIT_TRUNK , 'authuser', tmp_authuser );
+				parent.sessionData.pbxinfo.trunks[ttype][EDIT_TRUNK]['authuser'] = tmp_authuser ;
+			}else{
+				if( parent.sessionData.pbxinfo.trunks[ttype][EDIT_TRUNK].hasOwnProperty('authuser') ){
+					delete parent.sessionData.pbxinfo.trunks[ttype][EDIT_TRUNK]['authuser'] ;
+				}
+			}
+
+
 			var tmp_insecure = ASTGUI.getFieldValue('trunk_insecure') ;
 			x.new_action('update', EDIT_TRUNK , 'insecure', tmp_insecure );
 			parent.sessionData.pbxinfo.trunks[ttype][EDIT_TRUNK]['insecure'] = tmp_insecure ;
@@ -569,11 +581,15 @@
 		<TD align="right" valign=top>FromUser :</TD>
 		<TD align="left"> <input id="trunk_fromuser" size=16> </TD>
 	</TR>
-
+	<TR class='editTrunk_Field'>
+		<TD align="right" valign=top>AuthUser :</TD>
+		<TD align="left"> <input id="trunk_authuser" size=16> </TD>
+	</TR>
 	<TR class='editTrunk_Field'>
 		<TD align="right" valign=top>insecure :</TD>
 		<TD align="left"> <select id="trunk_insecure" dfalt='no' class="input8"><option value='port'>port</option><option value='port,invite'>very</option><option value='no'>no</option></select> </TD>
 	</TR>
+
 
 	<TR class='editTrunk_Field_ermwi'>
 		<TD align="right">




More information about the asterisk-gui-commits mailing list