summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/elements
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/edit/process/elements')
-rw-r--r--httemplate/edit/process/elements/process.html25
1 files changed, 20 insertions, 5 deletions
diff --git a/httemplate/edit/process/elements/process.html b/httemplate/edit/process/elements/process.html
index e24f3f681..87cadb774 100644
--- a/httemplate/edit/process/elements/process.html
+++ b/httemplate/edit/process/elements/process.html
@@ -190,11 +190,26 @@ if ($old && exists($opt{'copy_on_empty'})) {
}
if ( $opt{'agent_virt'} ) {
- die "illegal agentnum"
- unless $curuser->agentnums_href->{$new->agentnum}
- or $opt{'agent_null_right'}
- && ! $new->agentnum
- && $curuser->access_right($opt{'agent_null_right'});
+
+ if ( ! $new->agentnum
+ && ( ! $opt{'agent_null_right'}
+ || ! $curuser->access_right($opt{'agent_null_right'})
+ )
+ )
+ {
+
+ $error ||= 'Select an agent';
+
+ } else {
+
+ die "illegal agentnum"
+ unless $curuser->agentnums_href->{$new->agentnum}
+ or $opt{'agent_null_right'}
+ && ! $new->agentnum
+ && $curuser->access_right($opt{'agent_null_right'});
+
+ }
+
}
$error ||= $new->check;