[freeside-commits] freeside/httemplate/edit/process/elements process.html, 1.18, 1.19
Ivan,,,
ivan at wavetail.420.am
Wed Dec 30 18:20:35 PST 2009
Update of /home/cvs/cvsroot/freeside/httemplate/edit/process/elements
In directory wavetail.420.am:/tmp/cvs-serv16477/httemplate/edit/process/elements
Modified Files:
process.html
Log Message:
prospecting: proper contact error handling when you add a prospect
Index: process.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/elements/process.html,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- process.html 28 Dec 2009 19:18:20 -0000 1.18
+++ process.html 31 Dec 2009 02:20:33 -0000 1.19
@@ -190,11 +190,26 @@
}
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;
More information about the freeside-commits
mailing list