diff --git a/assets/js/sccp_manager.js b/assets/js/sccp_manager.js index 6c3b326..1fffeb4 100644 --- a/assets/js/sccp_manager.js +++ b/assets/js/sccp_manager.js @@ -214,12 +214,19 @@ $(document).ready(function () { e.preventDefault(); }); - $('#sccp_hw_mac').change(function() { + $('#sccp_hw_mac').focus(); + + $('#sccp_hw_mac').focusout(function() { var value = $(this).val(); const regex = new RegExp('^([0-9A-Fa-f]{2}[:.-]?){5}([0-9A-Fa-f]{2})$'); if ( regex.test(value) === false ) { + $('#ajaxsubmit2').attr('disabled', 'disabled'); + $('#ajaxsubmit').attr('disabled', 'disabled'); fpbxToast(_('Invalid Mac Address'),_('Invalid Mac Address'), 'warning'); - setTimeout(function(){document.getElementById("sccp_hw_mac").focus();},2000); + setTimeout(function(){ $('#sccp_hw_mac').focus();},2000); + } else { + $('#ajaxsubmit2').removeAttr('disabled'); + $('#ajaxsubmit').removeAttr('disabled'); }; }); diff --git a/conf/sccpgeneral.xml.v433 b/conf/sccpgeneral.xml.v433 index 48e3d92..47522ad 100644 --- a/conf/sccpgeneral.xml.v433 +++ b/conf/sccpgeneral.xml.v433 @@ -1253,8 +1253,9 @@ and open the template in the editor. Base Version before all crash :-) mac - 000000000 + sccp-custom + The MAC address of the phone. You must specify 12 characters in the format XXXX.XXXX.XXXX or XX-XX-XX-XX-XX-XX or XXXXXXXXXXXX @@ -1282,7 +1283,7 @@ and open the template in the editor. Base Version before all crash :-) mac - 000000000 + sccp-custom