From: Mark Wells Date: Thu, 24 Oct 2013 23:00:08 +0000 (-0700) Subject: masked input clipboard hack, #25599 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=8036349be340b25ad80e34de84f0722d3b1abb76 masked input clipboard hack, #25599 --- diff --git a/httemplate/elements/tr-input-mask.html b/httemplate/elements/tr-input-mask.html index 33725b9a5..8a494c8de 100644 --- a/httemplate/elements/tr-input-mask.html +++ b/httemplate/elements/tr-input-mask.html @@ -5,6 +5,7 @@ % } <& /elements/tr-input-text.html, id => $id, @_ &> + <%shared> my $init = 0; @@ -21,6 +53,8 @@ my %opt = @_; # must have a DOM id my $id = $opt{id} || sprintf('input%04d',int(rand(10000))); my $value = length($opt{curr_value}) ? $opt{curr_value} : $opt{value} || ''; + +my $clipboard_hack = $FS::CurrentUser::CurrentUser->option('enable_mask_clipboard_hack'); <%doc> Set up a text input field with input masking. diff --git a/httemplate/pref/pref-process.html b/httemplate/pref/pref-process.html index 84f0832bf..55f306a9e 100644 --- a/httemplate/pref/pref-process.html +++ b/httemplate/pref/pref-process.html @@ -52,6 +52,7 @@ unless ( $error ) { # if ($access_user) { spreadsheet_format mobile_menu enable_fuzzy_on_exact disable_html_editor disable_enter_submit_onetimecharge + enable_mask_clipboard_hack email_address snom-ip snom-username snom-password vonage-fromnumber vonage-username vonage-password diff --git a/httemplate/pref/pref.html b/httemplate/pref/pref.html index fcd259615..e504ffc3a 100644 --- a/httemplate/pref/pref.html +++ b/httemplate/pref/pref.html @@ -134,6 +134,13 @@ Email Address + + Don't copy MAC address delimiters to clipboard + + option('enable_mask_clipboard_hack') ? 'CHECKED' : '' %>> + + +