summaryrefslogtreecommitdiff
path: root/httemplate/edit
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/edit')
-rw-r--r--httemplate/edit/cust_main-contacts.html22
-rw-r--r--httemplate/edit/elements/edit.html2
-rw-r--r--httemplate/edit/process/cust_main-contacts.html2
3 files changed, 24 insertions, 2 deletions
diff --git a/httemplate/edit/cust_main-contacts.html b/httemplate/edit/cust_main-contacts.html
index 76929a7c9..abef7505d 100644
--- a/httemplate/edit/cust_main-contacts.html
+++ b/httemplate/edit/cust_main-contacts.html
@@ -4,6 +4,21 @@ Hmm, this is now entirely redundant with edit/cust_main/contacts_new.html, and
this one isn't being maintained well. :/
</%doc>
+
+<SCRIPT>
+ function checkPasswordValidation(fieldid) {
+ var validationResult = document.getElementById(fieldid+'_result').innerHTML;
+ if (validationResult.match(/Password valid!/)) {
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+</SCRIPT>
+
+<& '/elements/validate_password_js.html', &>
+
<& elements/edit.html,
'name_singular' => 'customer contacts', #yes, we're editing all of them
'table' => 'cust_main',
@@ -45,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 9f3738830..0062b7e2d 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 =~ /^select-cgp_rule_/ ) {
+% if ( ($type eq 'selectlayers') || ($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/cust_main-contacts.html b/httemplate/edit/process/cust_main-contacts.html
index 2a7185b5c..6e94a290f 100644
--- a/httemplate/edit/process/cust_main-contacts.html
+++ b/httemplate/edit/process/cust_main-contacts.html
@@ -1,6 +1,6 @@
<% 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,