summaryrefslogtreecommitdiff
path: root/httemplate/elements/tr-input-mac_addr.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/elements/tr-input-mac_addr.html')
-rw-r--r--httemplate/elements/tr-input-mac_addr.html11
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>