diff options
| author | Christopher Burger <burgerc@freeside.biz> | 2017-07-06 11:52:22 -0400 |
|---|---|---|
| committer | Christopher Burger <burgerc@freeside.biz> | 2017-08-18 13:08:45 -0400 |
| commit | a08453e81bddef781785954516d4ca176bf7a6d8 (patch) | |
| tree | 79467106613810528df1591dd997ff1043533e96 /httemplate/elements/random_pass.html | |
| parent | ec479b83db152b2658e99901e03d29d2a458acb9 (diff) | |
RT# 75817 - fixed contact password page to be more consistant with svc password page, updated javascript to check password as you type rather than when you leave the field.
Conflicts:
FS/FS/contact.pm
FS/FS/cust_contact.pm
httemplate/elements/contact.html
Diffstat (limited to 'httemplate/elements/random_pass.html')
| -rw-r--r-- | httemplate/elements/random_pass.html | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/httemplate/elements/random_pass.html b/httemplate/elements/random_pass.html index 1517a55d7..778aa20e6 100644 --- a/httemplate/elements/random_pass.html +++ b/httemplate/elements/random_pass.html @@ -1,6 +1,6 @@ -<INPUT TYPE="button" VALUE="<% emt($label) %>" onclick="randomPass()"> +<INPUT TYPE="button" VALUE="<% emt($label) %>" onclick="<% $id %>randomPass()"> <SCRIPT TYPE="text/javascript"> -function randomPass() { +function <% $id %>randomPass() { var pw_set = <% $pw_set |js_string %>; var lower = <% $lower |js_string %>; var upper = <% $upper |js_string %>; @@ -19,11 +19,15 @@ function randomPass() { for(var j, x, i = pass.length; i; j = Math.floor(Math.random() * i), x = pass[--i], pass[i] = pass[j], pass[j] = x); pass = pass.join(''); document.getElementById('<% $id %>').value = pass; +% if ($submitid) { + document.getElementById('<% $submitid %>').disabled = false; +% } } </SCRIPT> <%init> my $id = shift; my $label = shift || 'Generate'; +my $submitid = shift; my $pw_set = join('', FS::Password_Mixin->pw_set); my $lower = join('', $pw_set =~ /[[:lower:]]/g); my $upper = join('', $pw_set =~ /[[:upper:]]/g); |
