Option to ignore old CDRs, RT#81480
[freeside.git] / httemplate / edit / cust_main-contacts.html
index 76929a7..317257b 100644 (file)
@@ -4,11 +4,27 @@ 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',
      'post_url'         => popurl(1). 'process/cust_main-contacts.html',
      'no_pkey_display'  => 1,
+     'submit_id'        => 'submit',
      'labels'           => {
                              'contactnum'  => ' ', #'Contact',
                              #'locationnum' => '&nbsp;',
@@ -45,6 +61,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'));