{
'key' => 'passwordmin',
'section' => 'password',
- 'description' => 'Minimum password length (default 6)',
+ 'description' => 'Minimum password length (default 8)',
'type' => 'text',
},
if (clear) {
document.getElementById('<%$pre%>password').value = '';
document.getElementById('<%$pre%>password_result').innerHTML = '';
-}
+ document.getElementById('<%$change_button_id%>').disabled = true;
+ }
document.getElementById('<%$pre%>div').style.display =
toggle ? 'inline-block' : 'none';
% if (!$opt{'no_label_display'}) {
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;
+ document.getElementById('<% $id %>_result').innerHTML = '<IMG SRC="<% $p %>images/tick.png" style="width: 1em; display: inline-block; padding-right: .5em"> <SPAN STYLE="color: green;">Password valid!</SPAN>';
% if ($submitid) {
document.getElementById('<% $submitid %>').disabled = false;
% }
<% $cgi->redirect($fsurl.'view/svc_acct.cgi?'.$cgi->query_string) %>
% }
% elsif ($contactnum) {
- <% $cgi->redirect($fsurl.'view/cust_main.cgi?'.$cgi->param('custnum')) %>
+% my $freeside_status = "Contact ".$contact->{'Hash'}->{'first'}." ".$contact->{'Hash'}->{'last'}." password updated.";
+ <% $cgi->redirect( -uri => popurl(3). "view/cust_main.cgi?". $cgi->param('custnum'),
+ -cookie => CGI::Cookie->new(
+ -name => 'freeside_status',
+ -value => mt($freeside_status),
+ -expires => '+5m',
+ ),
+ )
+%>
% }
% }
<%init>
my $curuser = $FS::CurrentUser::CurrentUser;
+my $contact;
$cgi->param('svcnum') =~ /^(\d+)$/ or die "illegal svcnum" if $cgi->param('svcnum');
my $svcnum = $1;
$cgi->delete('password');
}
elsif ($contactnum) {
- my $contact = qsearchs('contact', { 'contactnum' => $contactnum } )
+ $contact = qsearchs('contact', { 'contactnum' => $contactnum } )
or return { 'error' => "Contact not found" . $contactnum };
$error = $contact->is_password_allowed($newpass)