diff options
author | ivan <ivan> | 2009-12-31 02:20:33 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-12-31 02:20:33 +0000 |
commit | 2e928dafa3cf6383ea9e97f48af61af05e5a292a (patch) | |
tree | 107c9908948a9c5463ffcb80add9323245d6fa54 /httemplate/edit/process | |
parent | 0d2d8c0b11b715fa7ba1d889e04637194d97e275 (diff) |
prospecting: proper contact error handling when you add a prospect
Diffstat (limited to 'httemplate/edit/process')
-rw-r--r-- | httemplate/edit/process/elements/process.html | 25 |
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; |