[freeside-commits] freeside/httemplate/elements tr-select-agent.html, 1.7, 1.8
Ivan,,,
ivan at wavetail.420.am
Thu Jul 22 17:11:53 PDT 2010
Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail.420.am:/tmp/cvs-serv13713/httemplate/elements
Modified Files:
tr-select-agent.html
Log Message:
'View customers of all agents' doesn't mean create them, or upload inventory, RT#7010
Index: tr-select-agent.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/tr-select-agent.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -w -d -r1.7 -r1.8
--- tr-select-agent.html 14 Feb 2009 00:40:11 -0000 1.7
+++ tr-select-agent.html 23 Jul 2010 00:11:51 -0000 1.8
@@ -1,3 +1,27 @@
+<%doc>
+
+Example:
+
+ include( '/elements/tr-select-agent.html',
+
+ #recommended to keep things "sticky" on errors
+ 'curr_value' => $curr_value,
+
+ ##
+ # optional
+ ##
+
+ 'label' => 'Agent for this thing',
+ 'empty_label' => 'Select agent', #override default
+ 'disable_empty' => 1,
+
+ #set to 'None' or something to override default of showing all agents
+ #for employees w/ 'View customers of all agents' right
+ viewall_right => 'None',
+
+ );
+
+</%doc>
% if ( scalar(@agents) == 1 ) {
<INPUT TYPE="hidden" NAME="<% $opt{'field'} || 'agentnum' %>" VALUE="<% $agents[0]->agentnum %>">
@@ -26,8 +50,11 @@
my %opt = @_;
my $agentnum = $opt{'curr_value'} || $opt{'value'};
-my @agents = $opt{'agents'}
+my @agents =
+ $opt{'agents'}
? @{ $opt{'agents'} }
- : $FS::CurrentUser::CurrentUser->agents;
+ : $FS::CurrentUser::CurrentUser->agents(
+ 'viewall_right' => $opt{'viewall_right'},
+ );
</%init>
More information about the freeside-commits
mailing list