diff options
author | Ivan Kohler <ivan-debian@420.am> | 2012-03-15 13:56:48 -0700 |
---|---|---|
committer | Ivan Kohler <ivan-debian@420.am> | 2012-03-15 13:56:48 -0700 |
commit | 7d68066ea33f9f85fe14ce663372642d7ec2ad20 (patch) | |
tree | f659173a23d541da3032f8a8156f888810d7efda /httemplate/elements/tr-input-mac_addr.html | |
parent | d622dc369cc0856fb791658b35f889470a7da605 (diff) | |
parent | a69299c596de60f4b26db7431165f7f3ffe928e2 (diff) |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
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> |