pari: branch 2.0 r3688 - /branches/2.0/config/trunks_voip.html
SVN commits to the Asterisk-GUI project
asterisk-gui-commits at lists.digium.com
Wed Aug 20 11:00:54 CDT 2008
Author: pari
Date: Wed Aug 20 11:00:54 2008
New Revision: 3688
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=3688
Log:
Issue : 'GUI not allowing some required special characters in voip username'
Fix: Instead of aborting with an alert, the gui will ask a confirmation whether
to process with using the special characters for the username or to abort.
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=3688&r1=3687&r2=3688
==============================================================================
--- branches/2.0/config/trunks_voip.html (original)
+++ branches/2.0/config/trunks_voip.html Wed Aug 20 11:00:54 2008
@@ -215,10 +215,15 @@
var edit_VOIPTrunk_save_go = function(){
var topreload = false;
- if ( !ASTGUI.checkRequiredFields(['edit_VOIPTrunk_Providername', 'edit_VOIPTrunk_Type' , 'edit_VOIPTrunk_Hostname' , 'edit_VOIPTrunk_Username' ]) ){
+ var tmp_username = ASTGUI.getFieldValue('edit_VOIPTrunk_Username');
+ if( /[^a-zA-Z_0-9\.]/.test(tmp_username) ){
+ var tmp_confirm = confirm('The Voip Username appears to contain special characters. \n Click \'OK\' to continue, \'Cancel\' to abort.');
+ if( !tmp_confirm ) return;
+ }
+
+ if ( !ASTGUI.checkRequiredFields(['edit_VOIPTrunk_Providername', 'edit_VOIPTrunk_Type' , 'edit_VOIPTrunk_Hostname']) ){
return ;
}
- if ( !ASTGUI.validateFields([ 'edit_VOIPTrunk_Username' ]) ) return ;
if( isNewTrunk == true ) {
// New Trunk
More information about the asterisk-gui-commits
mailing list