diff options
| author | Mark Wells <mark@freeside.biz> | 2012-03-14 13:43:26 -0700 |
|---|---|---|
| committer | Mark Wells <mark@freeside.biz> | 2012-03-14 13:43:26 -0700 |
| commit | 7c6789c622d1d5f84370b4ecf2c351f9c893f42c (patch) | |
| tree | 4a71e87d99039c03a34cc713c9ef8373f1128554 /httemplate/elements/tr-input-mac_addr.html | |
| parent | a59a347762666a70920ed975ce207568896ae19c (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> |
