diff options
Diffstat (limited to 'httemplate/edit')
| -rw-r--r-- | httemplate/edit/cust_main-contacts.html | 43 | ||||
| -rw-r--r-- | httemplate/edit/elements/edit.html | 2 | ||||
| -rw-r--r-- | httemplate/edit/process/cust_main-contacts.html | 2 | ||||
| -rwxr-xr-x | httemplate/edit/process/part_pkg.cgi | 2 |
4 files changed, 35 insertions, 14 deletions
diff --git a/httemplate/edit/cust_main-contacts.html b/httemplate/edit/cust_main-contacts.html index 7dedfe04d..b046c5b18 100644 --- a/httemplate/edit/cust_main-contacts.html +++ b/httemplate/edit/cust_main-contacts.html @@ -1,12 +1,27 @@ -<% include('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', - 'labels' => { 'custnum' => ' ', #XXX supress this line entirely, its being redundant - 'contactnum' => ' ', #'Contact', - #'locationnum' => ' ', - }, - 'fields' => [ +<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, + 'labels' => { 'custnum' => ' ', #XXX supress this line entirely, its being redundant + 'contactnum' => ' ', #'Contact', + #'locationnum' => ' ', + }, + 'fields' => [ { 'field' => 'contactnum', 'type' => 'contact', 'colspan' => 6, @@ -30,13 +45,19 @@ $conf->config('countrydefault') || 'US', 1, #no balance ), - ) -%> +&> <%init> 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 3826f9752..ff1da4945 100644 --- a/httemplate/edit/elements/edit.html +++ b/httemplate/edit/elements/edit.html @@ -633,7 +633,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 10ec3638f..f51c796b4 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 'process_o2m' => { diff --git a/httemplate/edit/process/part_pkg.cgi b/httemplate/edit/process/part_pkg.cgi index 1db3a9cd1..9e0fa5f55 100755 --- a/httemplate/edit/process/part_pkg.cgi +++ b/httemplate/edit/process/part_pkg.cgi @@ -172,7 +172,7 @@ my $update_svc = sub { foreach my $svc_part(@svcs) { my @part_svc_column = qsearch('part_svc_column',{ 'svcpart' => $svc_part->{Hash}->{svcpart}, 'columnflag' => 'P' }); - if ($svc_part->{Hash}->{svcdb} eq "svc_broadband" && (keys $args{fcc_options}) && @part_svc_column ) { + if ($svc_part->{Hash}->{svcdb} eq "svc_broadband" && (keys %{ $args{fcc_options} }) && @part_svc_column ) { ## find provisioned services to update my @svc_svcdb = qsearch({ 'table' => 'svc_broadband', |
