summaryrefslogtreecommitdiff
path: root/httemplate/edit/cust_main-contacts-password.html
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2017-06-29 12:51:25 -0400
committerChristopher Burger <burgerc@freeside.biz>2017-06-29 12:51:25 -0400
commite773f2d834f6757e7a0430184d9db6939e0b632d (patch)
tree4d7fbe001ed6dc0197e532db6e238a5522380c65 /httemplate/edit/cust_main-contacts-password.html
parenta616d0c27799413dfbe07ee86e75df3e0d5a740f (diff)
RT# 75817 - updated set contact password to use popup window. fixes break in first contact.
Diffstat (limited to 'httemplate/edit/cust_main-contacts-password.html')
-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