X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Ftr-input-mask.html;h=93e322c6c0630fee0aba03c4437a2726c82f12bc;hp=922f22f4ba339cd208baae11fcb10ec448d15af3;hb=f822e27a1e00594332ffa487a1c284234c5580a6;hpb=df1ebf662a9fc3f89503036e0dbf6833c1b95f9e diff --git a/httemplate/elements/tr-input-mask.html b/httemplate/elements/tr-input-mask.html index 922f22f4b..93e322c6c 100644 --- a/httemplate/elements/tr-input-mask.html +++ b/httemplate/elements/tr-input-mask.html @@ -1,60 +1,74 @@ % if ( !$init ) { - % $init++; % } <& /elements/tr-input-text.html, id => $id, @_ &> - + <%shared> my $init = 0; <%init> my %opt = @_; # must have a DOM id -my $id = $opt{id} || sprintf('input%04d',int(rand(10000))); +my $id = $opt{id} || sprintf('input%04d',random_id(4)); my $value = length($opt{curr_value}) ? $opt{curr_value} : $opt{value} || ''; my $clipboard_hack = $FS::CurrentUser::CurrentUser->option('enable_mask_clipboard_hack');