pari: branch asterisknow r1850 - /branches/asterisknow/config/users.html

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Thu Nov 29 15:06:57 CST 2007


Author: pari
Date: Thu Nov 29 15:06:57 2007
New Revision: 1850

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1850
Log:
adding fields for polycom autoprovisioning

Modified:
    branches/asterisknow/config/users.html

Modified: branches/asterisknow/config/users.html
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/config/users.html?view=diff&rev=1850&r1=1849&r2=1850
==============================================================================
--- branches/asterisknow/config/users.html (original)
+++ branches/asterisknow/config/users.html Thu Nov 29 15:06:57 2007
@@ -29,7 +29,7 @@
 var callbacks = new Object;
 var extencallbacks = new Object;
 var allcodecs = new Array;
-var fieldnames = ['callwaiting' ,'cancel' ,'cid_number' ,'context' ,'delete' ,'email' ,'fullname' ,'group' ,'hasagent' ,'hasdirectory' ,'hasiax' ,'hasmanager' ,'hassip' ,'hasvoicemail' ,'deletevoicemail' ,'host' ,'mailbox' ,'name' ,'new' ,'save' ,'secret' ,'threewaycalling' ,'vmsecret' ,'zapchan', 'registeriax', 'registersip','canreinvite','nat','dtmfmode', 'disallow','allow', 'insecure'];
+var fieldnames = ['callwaiting' ,'cancel' ,'cid_number' ,'context' ,'delete' ,'email' ,'fullname' ,'group' ,'hasagent' ,'hasdirectory' ,'hasiax' ,'hasmanager' ,'hassip' ,'hasvoicemail' ,'deletevoicemail' ,'host' ,'mailbox' ,'name' ,'new' ,'save' ,'secret' ,'threewaycalling' ,'vmsecret' ,'zapchan', 'registeriax', 'registersip','macaddress','autoprov','label','canreinvite','nat','dtmfmode', 'disallow','allow', 'insecure'];
 
 var localextenlength = 4;
 var allow_aliasextns = "no";
@@ -138,6 +138,15 @@
 callbacks.checkparams = function(box) {
 	_$('mailbox').value = _$('name').value;
 	_$('group').value = '';
+
+        if($('macaddress').value.length > 0) {
+                $('autoprov').value = "yes";
+                $('label').value = $('name').value;
+        } else {
+                $('autoprov').value = "no";
+                $('label').value = "";
+        }
+
 	return false;
 }
 callbacks.newcategory = function() {
@@ -184,6 +193,12 @@
 	if (!check_patternonfields( ['name', 'fullname', 'secret','email', 'cid_number'] ) ){
 		return false;
 	}
+
+        if( _$('macaddress').value.length != 12 && _$('macaddress').value.length != 0 ) {
+                alert("Sorry, Phone Serial must be 12 characters !");
+                _$('macaddress').focus();
+                return false;
+        }
 
 	if(allow_aliasextns == "no"){	// check whether the selected analog line is assigned to another user extension
 		var tmp_usedanaloglines = [] ;
@@ -513,6 +528,13 @@
 				<tr><td class="field_text" tip="en,users,5">Analog Phone:</td><td><select size="1" id='zapchan' style='width:140px' class="input8"></select>
 				<span id="noanaloglines" style="display:none" class="field_text"><I>&nbsp;No Analog lines detected.</I></span></td></tr>
 				<tr><td class="field_text" tip="en,users,6">Dial Plan:</td><td><select size='1' id='context' style='width:120px' class="input8"></select></td></tr>
+
+                                <tr>    <td class="field_text" tip="en,users,99">Phone Serial:</td>
+                                        <td>    <input size='14' id='macaddress' pattern='^[0-9a-f]*$' class="input8">
+                                                <input type='hidden' id='autoprov'><input type='hidden' id='label'>
+                                        </td>
+                                </tr>
+
 				<tr><td colspan='2' align='center'><input type='hidden' id='mailbox'><input type='hidden' id='group'><input type='checkbox' id='registersip' style="display:none"><input type='checkbox' id='registeriax' style="display:none"></td></tr>
 				</table>
 			</td>




More information about the asterisk-gui-commits mailing list