diff options
author | Mark Wells <mark@freeside.biz> | 2012-03-14 13:44:00 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2012-03-14 13:44:00 -0700 |
commit | a69299c596de60f4b26db7431165f7f3ffe928e2 (patch) | |
tree | 076319cad385baeb8bcf6fe9ce0ac980ccab50c7 /httemplate/elements/tr-input-mac_addr.html | |
parent | da590709ee5f3e6a661950fcfce39dbbf9d6add4 (diff) |
svc_hardware MAC address input format, #16266
Diffstat (limited to 'httemplate/elements/tr-input-mac_addr.html')
-rw-r--r-- | httemplate/elements/tr-input-mac_addr.html | 11 |
1 files changed, 11 insertions, 0 deletions
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); +</%init> |