summaryrefslogtreecommitdiff
path: root/httemplate/edit/process
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/edit/process')
-rwxr-xr-xhttemplate/edit/process/REAL_cust_pkg.cgi2
-rw-r--r--httemplate/edit/process/access_user.html10
-rw-r--r--httemplate/edit/process/bulk-cust_pkg.cgi9
-rwxr-xr-xhttemplate/edit/process/cust_pay.cgi10
-rwxr-xr-xhttemplate/edit/process/cust_refund.cgi15
-rwxr-xr-xhttemplate/edit/process/domain_record.cgi17
-rwxr-xr-xhttemplate/edit/process/part_pkg.cgi2
-rw-r--r--httemplate/edit/process/prospect_main.html7
-rw-r--r--httemplate/edit/process/quick-cust_pkg.cgi6
-rw-r--r--httemplate/edit/process/svc_domain-defaultrecords.cgi6
10 files changed, 14 insertions, 70 deletions
diff --git a/httemplate/edit/process/REAL_cust_pkg.cgi b/httemplate/edit/process/REAL_cust_pkg.cgi
index 3a62ee001..570f0e031 100755
--- a/httemplate/edit/process/REAL_cust_pkg.cgi
+++ b/httemplate/edit/process/REAL_cust_pkg.cgi
@@ -20,7 +20,7 @@ my $pkgnum = $cgi->param('pkgnum') or die;
my $old = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
my %hash = $old->hash;
$hash{$_}= $cgi->param($_) ? parse_datetime($cgi->param($_)) : ''
- foreach qw( start_date setup bill last_bill adjourn expire contract_end );
+ foreach qw( start_date setup bill last_bill adjourn expire );
my @errors = ();
diff --git a/httemplate/edit/process/access_user.html b/httemplate/edit/process/access_user.html
index 8e7e70a06..e6258a9b1 100644
--- a/httemplate/edit/process/access_user.html
+++ b/httemplate/edit/process/access_user.html
@@ -10,7 +10,6 @@
'process_m2m' => { 'link_table' => 'access_usergroup',
'target_table' => 'access_group',
},
- 'precheck_callback'=> \&precheck_callback,
)
%>
% }
@@ -24,13 +23,4 @@ if ( FS::Conf->new->exists('disable_acl_changes') ) {
die "shouldn't be reached";
}
-sub precheck_callback {
- my $cgi = shift;
- my $o = FS::access_user->new({username => $cgi->param('username')});
- if( $o->is_system_user and !$cgi->param('usernum') ) {
- $cgi->param('username','');
- return "username '".$o->username."' reserved for system account."
- }
- return '';
-}
</%init>
diff --git a/httemplate/edit/process/bulk-cust_pkg.cgi b/httemplate/edit/process/bulk-cust_pkg.cgi
deleted file mode 100644
index ede3ee8cd..000000000
--- a/httemplate/edit/process/bulk-cust_pkg.cgi
+++ /dev/null
@@ -1,9 +0,0 @@
-<% $server->process %>
-<%init>
-
-die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
-
-my $server = new FS::UI::Web::JSRPC 'FS::cust_pkg::process_bulk_cust_pkg', $cgi;
-
-</%init>
diff --git a/httemplate/edit/process/cust_pay.cgi b/httemplate/edit/process/cust_pay.cgi
index d6bbf06b0..c8b0aa7df 100755
--- a/httemplate/edit/process/cust_pay.cgi
+++ b/httemplate/edit/process/cust_pay.cgi
@@ -27,6 +27,9 @@
%}
<%init>
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Post payment');
+
$cgi->param('linknum') =~ /^(\d+)$/
or die "Illegal linknum: ". $cgi->param('linknum');
my $linknum = $1;
@@ -49,13 +52,6 @@ my $new = new FS::cust_pay ( {
#} fields('cust_pay')
} );
-my @rights = ('Post payment');
-push @rights, 'Post check payment' if $new->payby eq 'BILL';
-push @rights, 'Post cash payment' if $new->payby eq 'CASH';
-
-die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right(\@rights);
-
my $error = $new->insert( 'manual' => 1 );
</%init>
diff --git a/httemplate/edit/process/cust_refund.cgi b/httemplate/edit/process/cust_refund.cgi
index 389bc990c..5749e5346 100755
--- a/httemplate/edit/process/cust_refund.cgi
+++ b/httemplate/edit/process/cust_refund.cgi
@@ -28,21 +28,8 @@ my $cust_main = qsearchs('cust_main', { 'custnum' => $custnum } )
my $link = $cgi->param('popup') ? 'popup' : '';
-my $payby = $cgi->param('payby');
-
-my @rights = ();
-push @rights, 'Post refund' if $payby /^(BILL|CASH)$/;
-push @rights, 'Post check refund' if $payby eq 'BILL';
-push @rights, 'Post cash refund ' if $payby eq 'CASH';
-push @rights, 'Refund payment' if $payby /^(CARD|CHEK)$/;
-push @rights, 'Refund credit card payment' if $payby eq 'CARD';
-push @rights, 'Refund Echeck payment' if $payby eq 'CHEK';
-
-die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right(\@rights);
-
my $error = '';
-if ( $payby =~ /^(CARD|CHEK)$/ ) {
+if ( $cgi->param('payby') =~ /^(CARD|CHEK)$/ ) {
my %options = ();
my $bop = $FS::payby::payby2bop{$1};
$cgi->param('refund') =~ /^(\d*)(\.\d{2})?$/
diff --git a/httemplate/edit/process/domain_record.cgi b/httemplate/edit/process/domain_record.cgi
index 8369f7114..ff0f2d414 100755
--- a/httemplate/edit/process/domain_record.cgi
+++ b/httemplate/edit/process/domain_record.cgi
@@ -1,14 +1,8 @@
%if ( $error ) {
% errorpage($error);
-%} elsif ( $recnum ) { #editing
-<% header('Nameservice record changed') %>
- <SCRIPT TYPE="text/javascript">
- window.top.location.reload();
- </SCRIPT>
- </BODY></HTML>
-%} else { #adding
+%} else {
% my $svcnum = $new->svcnum;
-<% $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum#dns") %>
+<% $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum") %>
%}
<%init>
@@ -27,11 +21,10 @@ my $new = new FS::domain_record ( {
my $error;
if ( $recnum ) {
- $new->svcnum( $old->svcnum );
- $error = $new->replace($old);
+ $error=$new->replace($old);
} else {
- $error = $new->insert;
- #$recnum = $new->getfield('recnum');
+ $error=$new->insert;
+ $recnum=$new->getfield('recnum');
}
</%init>
diff --git a/httemplate/edit/process/part_pkg.cgi b/httemplate/edit/process/part_pkg.cgi
index 97ae4e7ee..08cc14086 100755
--- a/httemplate/edit/process/part_pkg.cgi
+++ b/httemplate/edit/process/part_pkg.cgi
@@ -103,7 +103,7 @@ my $args_callback = sub {
$options{"usage_taxproductnum_$_"} = $value;
}
- foreach ( grep $_, $cgi->param('report_option') ) {
+ foreach ( $cgi->param('report_option') ) {
$error ||= "Illegal optional report class: $_" unless ( $_ =~ /^\d*$/ );
$options{"report_option_$_"} = 1;
}
diff --git a/httemplate/edit/process/prospect_main.html b/httemplate/edit/process/prospect_main.html
index ca4dfabfe..34d26421b 100644
--- a/httemplate/edit/process/prospect_main.html
+++ b/httemplate/edit/process/prospect_main.html
@@ -4,7 +4,7 @@
'agent_virt' => 1,
'process_o2m' => {
'table' => 'contact',
- 'fields' => \@contact_fields,
+ 'fields' => [qw( first last title comment )],
},
'redirect' => popurl(3). 'view/prospect_main.html?',
)
@@ -31,9 +31,4 @@ my $args_callback = sub {
};
-my @contact_fields = qw( first last title comment emailaddress );
-foreach my $phone_type ( qsearch({table=>'phone_type', order_by=>'weight'}) ) {
- push @contact_fields, 'phonetypenum'.$phone_type->phonetypenum;
-}
-
</%init>
diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi
index 599f7607c..2fde17f5e 100644
--- a/httemplate/edit/process/quick-cust_pkg.cgi
+++ b/httemplate/edit/process/quick-cust_pkg.cgi
@@ -66,10 +66,6 @@ my $cust_pkg = new FS::cust_pkg {
'discountnum_amount' => scalar($cgi->param('discountnum_amount')),
'discountnum_percent' => scalar($cgi->param('discountnum_percent')),
'discountnum_months' => scalar($cgi->param('discountnum_months')),
- 'contract_end' => ( scalar($cgi->param('contract_end'))
- ? parse_datetime($cgi->param('contract_end'))
- : ''
- ),
#'discountnum_disabled' => scalar($cgi->param('discountnum_disabled')),
};
@@ -78,7 +74,7 @@ my %opt = ( 'cust_pkg' => $cust_pkg );
if ( $locationnum == -1 ) {
my $cust_location = new FS::cust_location {
map { $_ => scalar($cgi->param($_)) }
- qw( custnum address1 address2 city county state zip country geocode )
+ qw( custnum address1 address2 city county state zip country )
};
$opt{'cust_location'} = $cust_location;
}
diff --git a/httemplate/edit/process/svc_domain-defaultrecords.cgi b/httemplate/edit/process/svc_domain-defaultrecords.cgi
index ec3d221f3..feb58406c 100644
--- a/httemplate/edit/process/svc_domain-defaultrecords.cgi
+++ b/httemplate/edit/process/svc_domain-defaultrecords.cgi
@@ -1,8 +1,4 @@
-% if ( $error ) {
-% errorpage($error);
-% } else {
-<% $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum#dns") %>
-% }
+<% $cgi->redirect(popurl(3). "view/svc_domain.cgi?$svcnum") %>
<%init>
die "access denied"