X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Ftr-input-mask.html;h=93e322c6c0630fee0aba03c4437a2726c82f12bc;hp=8a494c8de741f338219da8889f392f8b49f7f14c;hb=b7d4aaee22ceda078bbfcca47038eb0bf4230a1c;hpb=a5b0ddc40f119370fa4abf718931fb6832c34924 diff --git a/httemplate/elements/tr-input-mask.html b/httemplate/elements/tr-input-mask.html index 8a494c8de..93e322c6c 100644 --- a/httemplate/elements/tr-input-mask.html +++ b/httemplate/elements/tr-input-mask.html @@ -1,57 +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');