From d32ed470ba0869a4005c0c577b98246c48f8be7d Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Thu, 17 Oct 2013 14:33:46 -0700 Subject: daily sales/receipts report: fix customer class and date selection, #24853 --- httemplate/elements/tr-input-beginning_ending.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/elements') diff --git a/httemplate/elements/tr-input-beginning_ending.html b/httemplate/elements/tr-input-beginning_ending.html index ffc903875..91f55eb69 100644 --- a/httemplate/elements/tr-input-beginning_ending.html +++ b/httemplate/elements/tr-input-beginning_ending.html @@ -7,7 +7,7 @@ From date: - MAXLENGTH=<%$maxlength%>>
m/d/y<% $time_hint %> + MAXLENGTH=<%$maxlength%>>
m/d/y<% $time_hint %> + <%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. -- cgit v1.2.1 From 422e87b24b866eaa420258d97d4ccdc089019f88 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Thu, 24 Oct 2013 16:04:10 -0700 Subject: masked input clipboard hack, part 2 --- httemplate/elements/tr-input-mask.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'httemplate/elements') diff --git a/httemplate/elements/tr-input-mask.html b/httemplate/elements/tr-input-mask.html index 8a494c8de..922f22f4b 100644 --- a/httemplate/elements/tr-input-mask.html +++ b/httemplate/elements/tr-input-mask.html @@ -37,7 +37,10 @@ t.onkeydown = function(e) { }; container.onkeyup = function(e) { if ( container.previous ) { - setTimeout(function() {container.previous.focus();}, 10); + setTimeout(function() { + container.previous.value = container.value; + container.previous.focus(); + }, 10); } return true; } -- cgit v1.2.1 From 7b20719d5f7269adfebf55975766cd6eca4a7dd5 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 24 Oct 2013 23:25:46 -0700 Subject: prevent browsers from saving passwords --- httemplate/elements/input-text.html | 1 + httemplate/elements/tr-password.html | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'httemplate/elements') diff --git a/httemplate/elements/input-text.html b/httemplate/elements/input-text.html index 827941501..18272ebe2 100644 --- a/httemplate/elements/input-text.html +++ b/httemplate/elements/input-text.html @@ -5,6 +5,7 @@ <% $size %> <% $maxlength %> <% $style %> + <% $opt{autocomplete} ? 'autocomplete="off"' : '' %> <% $opt{disabled} %> <% $onchange %> ><% $opt{'postfix'} %> diff --git a/httemplate/elements/tr-password.html b/httemplate/elements/tr-password.html index d19c4ed0e..8ad303c67 100644 --- a/httemplate/elements/tr-password.html +++ b/httemplate/elements/tr-password.html @@ -1,3 +1,4 @@ <& tr-input-text.html, @_, - 'type' => 'password', + 'type' => 'password', + 'autocomplete' => 1, &> -- cgit v1.2.1