From 8ca45ec1f1ab960ee1e262ee764f05d214728d05 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Tue, 4 Sep 2018 08:30:35 -0400 Subject: RT# 75817 - Added password change link to cust main page --- httemplate/edit/cust_main-contacts.html | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/cust_main-contacts.html b/httemplate/edit/cust_main-contacts.html index 3783cb9e9..7c5a78209 100644 --- a/httemplate/edit/cust_main-contacts.html +++ b/httemplate/edit/cust_main-contacts.html @@ -5,18 +5,20 @@ this one isn't being maintained well. :/ - +<& '/elements/validate_password_js.html', &> + <& elements/edit.html, 'name_singular' => 'customer contacts', #yes, we're editing all of them 'table' => 'cust_main', -- cgit v1.2.1 From 4e00b1e784fdb369fefd538f27c1ac465e5abc9a Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Fri, 7 Sep 2018 10:55:19 -0400 Subject: RT# 75817 - fixed saving of password for new contacts, and password validation on dynamicly created rows --- httemplate/edit/cust_main-contacts.html | 7 +++++++ httemplate/edit/elements/edit.html | 2 +- httemplate/edit/process/elements/process.html | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/cust_main-contacts.html b/httemplate/edit/cust_main-contacts.html index 7c5a78209..abef7505d 100644 --- a/httemplate/edit/cust_main-contacts.html +++ b/httemplate/edit/cust_main-contacts.html @@ -60,6 +60,13 @@ this one isn't being maintained well. :/ my $curuser = $FS::CurrentUser::CurrentUser; my $conf = new FS::Conf; +if ( $cgi->param('redirect') ) { + my $session = $cgi->param('redirect'); + my $pref = $curuser->option("redirect$session"); + die "unknown redirect session $session\n" unless length($pref); + $cgi = new CGI($pref); +} + my $custnum; if ( $cgi->param('error') ) { $custnum = scalar($cgi->param('custnum')); diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html index 8ba703a2f..b7f2e7adb 100644 --- a/httemplate/edit/elements/edit.html +++ b/httemplate/edit/elements/edit.html @@ -669,7 +669,7 @@ Example: var newrow = <% include(@layer_opt, html_only=>1) |js_string %>; % #until the rest have html/js_only -% if ( ($type eq 'selectlayers') || ($type eq 'selectlayersx') || ($type =~ /^select-cgp_rule_/) ) { +% if ( ($type eq 'selectlayers') || ($type eq 'selectlayersx') || ($type =~ /^select-cgp_rule_/) || ($type eq 'contact') ) { var newfunc = <% include(@layer_opt, js_only=>1) |js_string %>; % } else { var newfunc = ''; diff --git a/httemplate/edit/process/elements/process.html b/httemplate/edit/process/elements/process.html index d2b037053..a3ea7ee59 100644 --- a/httemplate/edit/process/elements/process.html +++ b/httemplate/edit/process/elements/process.html @@ -127,7 +127,7 @@ Example: % " attempting to set redirect$session to ". $cgi->query_string."\n"; % } % -<% $cgi->redirect("$error_redirect?redirect=$session") %> +<% $cgi->redirect("$error_redirect"."redirect=$session") %> % % } else { % -- cgit v1.2.1 From 6edc36f4ffe2d2a53d4c8cea4318f3a95eda54b4 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Sun, 9 Sep 2018 17:34:35 -0400 Subject: RT# 75817 - fixed redirect error --- httemplate/edit/process/cust_main-contacts.html | 2 +- httemplate/edit/process/elements/process.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/process/cust_main-contacts.html b/httemplate/edit/process/cust_main-contacts.html index 5b8319f5a..6b7f1c2db 100644 --- a/httemplate/edit/process/cust_main-contacts.html +++ b/httemplate/edit/process/cust_main-contacts.html @@ -8,7 +8,7 @@ <% include('elements/process.html', 'table' => 'cust_main', - 'error_redirect' => popurl(3). 'edit/cust_main-contacts.html?', + 'error_redirect' => popurl(3). 'edit/cust_main-contacts.html', 'agent_virt' => 1, 'skip_process' => 1, #we don't want to make any changes to cust_main 'precheck_callback' => $precheck_callback, diff --git a/httemplate/edit/process/elements/process.html b/httemplate/edit/process/elements/process.html index a3ea7ee59..d2b037053 100644 --- a/httemplate/edit/process/elements/process.html +++ b/httemplate/edit/process/elements/process.html @@ -127,7 +127,7 @@ Example: % " attempting to set redirect$session to ". $cgi->query_string."\n"; % } % -<% $cgi->redirect("$error_redirect"."redirect=$session") %> +<% $cgi->redirect("$error_redirect?redirect=$session") %> % % } else { % -- cgit v1.2.1