RT# 74959 - Fixed edit location link to acually save location
[freeside.git] / httemplate / edit / cust_main-contacts-password.html
1 <% include("/elements/header-popup.html", $title) %>
2 For Contact <% $contact->first %> <% $contact->last %>
3 <P>
4 <& /elements/change_password.html,
5               'contact_num' => $contactnum,
6               'custnum'     => $custnum,
7               'curr_value'  => '',
8               'label'       => $label,
9               'popup'       => $popup,
10 &>
11
12 <%init>
13
14 my $curuser = $FS::CurrentUser::CurrentUser;
15
16 $cgi->param('contactnum') =~ /^(\d+)$/ or die "illegal contactnum" if $cgi->param('contactnum');
17 my $contactnum = $1;
18
19 $cgi->param('custnum') =~ /^(\d+)$/ or die "illegal customernum" if $cgi->param('custnum');
20 my $custnum = $1;
21
22 my $label = "change password";
23 $label = "set password" unless ($cgi->param('label') eq "change");
24 my $title = $label;
25 $title =~ s/\b(\w)/\U$1/g;
26
27 my $popup = $cgi->param('popup');
28
29 die "access denied"
30     unless $curuser->access_right(($custnum ? 'Edit' : 'New'). ' customer'); #password?
31
32 my $contact = qsearchs('contact', { 'contactnum' => $contactnum } );
33
34 </%init>