summaryrefslogtreecommitdiff
path: root/httemplate/edit
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/edit')
-rw-r--r--httemplate/edit/access_group.html3
-rw-r--r--httemplate/edit/cgp_rule.html4
-rw-r--r--httemplate/edit/payment_gateway.html2
-rwxr-xr-xhttemplate/edit/process/cust_credit.cgi7
-rw-r--r--httemplate/edit/process/tax_class.html4
-rw-r--r--httemplate/edit/rate_detail.html8
6 files changed, 16 insertions, 12 deletions
diff --git a/httemplate/edit/access_group.html b/httemplate/edit/access_group.html
index 1eed26dfe..b5757afca 100644
--- a/httemplate/edit/access_group.html
+++ b/httemplate/edit/access_group.html
@@ -18,6 +18,9 @@ tie my %rights, 'Tie::IxHash', FS::AccessRight->rights_info;
</%once>
<%init>
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
my $html_bottom_sub = sub {
my $access_group = shift;
diff --git a/httemplate/edit/cgp_rule.html b/httemplate/edit/cgp_rule.html
index 41275aba7..1f838e238 100644
--- a/httemplate/edit/cgp_rule.html
+++ b/httemplate/edit/cgp_rule.html
@@ -59,7 +59,7 @@ my $m2_error_callback_cond = sub {
my $num = $1;
if ( grep $cgi->param("ruleconditionnum$num$_"), @gfields ) {
my $x = new FS::cgp_rule_condition {
- 'ruleconditionnum' => $cgi->param("ruleconditionnum$num"),
+ 'ruleconditionnum' => scalar($cgi->param("ruleconditionnum$num")),
map { $_ => scalar($cgi->param("ruleconditionnum${num}_$_")) } @fields,
};
$x;
@@ -84,7 +84,7 @@ my $m2_error_callback_action = sub {
my $num = $1;
if ( grep $cgi->param("ruleactionnum$num$_"), @gfields ) {
my $x = new FS::cgp_rule_action {
- 'ruleactionnum' => $cgi->param("ruleactionnum$num"),
+ 'ruleactionnum' => scalar($cgi->param("ruleactionnum$num")),
map { $_ => scalar($cgi->param("ruleactionnum${num}_$_")) } @fields,
};
$x;
diff --git a/httemplate/edit/payment_gateway.html b/httemplate/edit/payment_gateway.html
index 62e35fcdb..cfb86048c 100644
--- a/httemplate/edit/payment_gateway.html
+++ b/httemplate/edit/payment_gateway.html
@@ -5,7 +5,7 @@
'fields' => $fields,
'field_callback' => $field_callback,
'labels' => {
- 'gatewaynum' => 'Gateway #',
+ 'gatewaynum' => 'Gateway',
'gateway_module' => 'Gateway',
'gateway_username' => 'Username',
'gateway_password' => 'Password',
diff --git a/httemplate/edit/process/cust_credit.cgi b/httemplate/edit/process/cust_credit.cgi
index a4330dcdd..776112ac0 100755
--- a/httemplate/edit/process/cust_credit.cgi
+++ b/httemplate/edit/process/cust_credit.cgi
@@ -42,9 +42,10 @@ if ($reasonnum == -1) {
$error = 'Enter a new reason (or select an existing one)'
unless $cgi->param('newreasonnum') !~ /^\s*$/;
- my $reason = new FS::reason({ 'reason_type' => $cgi->param('newreasonnumT'),
- 'reason' => $cgi->param('newreasonnum'),
- });
+ my $reason = new FS::reason {
+ 'reason_type' => scalar($cgi->param('newreasonnumT')),
+ 'reason' => scalar($cgi->param('newreasonnum')),
+ };
$error ||= $reason->insert;
$cgi->param('reasonnum', $reason->reasonnum)
unless $error;
diff --git a/httemplate/edit/process/tax_class.html b/httemplate/edit/process/tax_class.html
index 339c9083e..7b630ff52 100644
--- a/httemplate/edit/process/tax_class.html
+++ b/httemplate/edit/process/tax_class.html
@@ -10,8 +10,8 @@ die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
my $tax_class = new FS::tax_class {
- 'taxclass' => $cgi->param('taxclass'),
- 'description' => $cgi->param('description'),
+ 'taxclass' => scalar($cgi->param('taxclass')),
+ 'description' => scalar($cgi->param('description')),
};
#maybe this whole thing should be in a transaction. at some point, no biggie
diff --git a/httemplate/edit/rate_detail.html b/httemplate/edit/rate_detail.html
index d0b85095b..0e406897f 100644
--- a/httemplate/edit/rate_detail.html
+++ b/httemplate/edit/rate_detail.html
@@ -52,10 +52,10 @@
],
'new_hashref_callback' => sub {
- { ratenum => $cgi->param('ratenum'),
- dest_regionnum => $cgi->param('dest_regionnum'),
- ratetimenum => $cgi->param('ratetimenum'),
- cdrtypenum => $cgi->param('cdrtypenum'),
+ { ratenum => scalar($cgi->param('ratenum')),
+ dest_regionnum => scalar($cgi->param('dest_regionnum')),
+ ratetimenum => scalar($cgi->param('ratetimenum')),
+ cdrtypenum => scalar($cgi->param('cdrtypenum')),
min_included => 0,
conn_charge => 0,
}