projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix disposition, add clid, RT#81941
[freeside.git]
/
httemplate
/
config
/
config-process.cgi
diff --git
a/httemplate/config/config-process.cgi
b/httemplate/config/config-process.cgi
index
d84edce
..
6af7d23
100644
(file)
--- a/
httemplate/config/config-process.cgi
+++ b/
httemplate/config/config-process.cgi
@@
-155,7
+155,9
@@
foreach my $type ( ref($i->type) ? @{$i->type} : $i->type ) {
}
} elsif ( $type eq 'checkbox' ) {
if ( defined $cgi->param($i->key.$n) ) {
}
} elsif ( $type eq 'checkbox' ) {
if ( defined $cgi->param($i->key.$n) ) {
- push @touch, $i->key;
+ my $error = &{$i->validate}('', $n) if $i->validate;
+ push @error, $error if $error;
+ push @touch, $i->key if !$error;
} else {
push @delete, $i->key;
}
} else {
push @delete, $i->key;
}
@@
-167,7
+169,7
@@
foreach my $type ( ref($i->type) ? @{$i->type} : $i->type ) {
if ( scalar(@{[ $cgi->param($i->key.$n) ]}) && $cgi->param($i->key.$n) ne '' ) {
my $error = &{$i->validate}([ $cgi->param($i->key.$n) ], $n) if $i->validate;
push @error, $error if $error;
if ( scalar(@{[ $cgi->param($i->key.$n) ]}) && $cgi->param($i->key.$n) ne '' ) {
my $error = &{$i->validate}([ $cgi->param($i->key.$n) ], $n) if $i->validate;
push @error, $error if $error;
- $conf->set($i->key, join("\n", @{[ $cgi->param($i->key.$n) ]} ), $agentnum);
+ $conf->set($i->key, join("\n", @{[ $cgi->param($i->key.$n) ]} ), $agentnum)
if !$error
;
} else {
$conf->delete($i->key, $agentnum);
}
} else {
$conf->delete($i->key, $agentnum);
}