summaryrefslogtreecommitdiff
path: root/httemplate/edit
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2017-06-29 13:39:47 -0700
committerIvan Kohler <ivan@freeside.biz>2017-06-29 13:39:47 -0700
commit9d6c810bf70d12221ff3b7916b717a6f0c924a1c (patch)
treea1c925e1bd90f34f9061875281d0c75c7bf25f32 /httemplate/edit
parent7565d61a5a62c57f34f4e3efd59d2e3211229181 (diff)
parente773f2d834f6757e7a0430184d9db6939e0b632d (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/edit')
-rw-r--r--httemplate/edit/cust_main-contacts-password.html34
1 files changed, 34 insertions, 0 deletions
diff --git a/httemplate/edit/cust_main-contacts-password.html b/httemplate/edit/cust_main-contacts-password.html
new file mode 100644
index 000000000..e3c1d6fa8
--- /dev/null
+++ b/httemplate/edit/cust_main-contacts-password.html
@@ -0,0 +1,34 @@
+<% include("/elements/header-popup.html", $title) %>
+For Contact <% $contact->first %> <% $contact->last %>
+<P>
+<& /elements/change_password.html,
+ 'contact_num' => $contactnum,
+ 'custnum' => $custnum,
+ 'curr_value' => '',
+ 'label' => $label,
+ 'popup' => $popup,
+&>
+
+<%init>
+
+my $curuser = $FS::CurrentUser::CurrentUser;
+
+$cgi->param('contactnum') =~ /^(\d+)$/ or die "illegal contactnum" if $cgi->param('contactnum');
+my $contactnum = $1;
+
+$cgi->param('custnum') =~ /^(\d+)$/ or die "illegal customernum" if $cgi->param('custnum');
+my $custnum = $1;
+
+my $label = "change password";
+$label = "set password" unless ($cgi->param('label') eq "change");
+my $title = $label;
+$title =~ s/\b(\w)/\U$1/g;
+
+my $popup = $cgi->param('popup');
+
+die "access denied"
+ unless $curuser->access_right(($custnum ? 'Edit' : 'New'). ' customer'); #password?
+
+my $contact = qsearchs('contact', { 'contactnum' => $contactnum } );
+
+</%init> \ No newline at end of file