From cef63582d0685a2c50db44ca47e922c883a455de Mon Sep 17 00:00:00 2001 From: luis daniel lucio quiroz Date: Tue, 23 Dec 2014 01:06:20 +0000 Subject: [PATCH] HTML5 input patter for mac address --- app/devices/device_edit.php | 2 +- app/extensions/extension_edit.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/devices/device_edit.php b/app/devices/device_edit.php index 5a7b005d5f..ff1b1b2ee7 100644 --- a/app/devices/device_edit.php +++ b/app/devices/device_edit.php @@ -440,7 +440,7 @@ require_once "resources/require.php"; echo " ".$text['label-device_mac_address'].":\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo " \n"; echo " \n"; echo "
\n"; diff --git a/app/extensions/extension_edit.php b/app/extensions/extension_edit.php index 0df001ada8..df186a36cd 100644 --- a/app/extensions/extension_edit.php +++ b/app/extensions/extension_edit.php @@ -1371,7 +1371,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { tb.className='formfld'; tb.setAttribute('id', 'device_mac_address'); tb.setAttribute('style', 'width: 80%;'); - tb.setAttribute('pattern', '^([0-9A-F]{2}[:-]?){5}([0-9A-F]{2})$'); + tb.setAttribute('pattern', '^([0-9A-Fa-f]{2}[:-]?){5}([0-9A-Fa-f]{2})$'); tb.value=obj.options[obj.selectedIndex].value; document.getElementById('btn_select_to_input_device_mac_address').style.visibility = 'hidden'; tbb=document.createElement('INPUT');