summaryrefslogtreecommitdiff
path: root/httemplate/elements/tr-input-mac_addr.html
blob: d768d4e71bc6574b093f8295c1b9ded2c6703ea9 (plain)
1
2
3
4
5
6
7
8
9
10
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>