From a69299c596de60f4b26db7431165f7f3ffe928e2 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Wed, 14 Mar 2012 13:44:00 -0700 Subject: svc_hardware MAC address input format, #16266 --- httemplate/elements/tr-input-mac_addr.html | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 httemplate/elements/tr-input-mac_addr.html (limited to 'httemplate/elements/tr-input-mac_addr.html') diff --git a/httemplate/elements/tr-input-mac_addr.html b/httemplate/elements/tr-input-mac_addr.html new file mode 100644 index 000000000..d768d4e71 --- /dev/null +++ b/httemplate/elements/tr-input-mac_addr.html @@ -0,0 +1,11 @@ +<& /elements/tr-input-mask.html, + format => '__:__:__:__:__:__', + allowed => '0123456789ABCDEFabcdef', + %opt, +&> +<%init> +my %opt = @_; +my $value = length($opt{curr_value}) ? $opt{curr_value} : $opt{value}; +$value =~ s/\W//g; +$opt{curr_value} = join(':', $value =~ /../g); + -- cgit v1.2.1