summaryrefslogtreecommitdiff
path: root/httemplate/elements/checkboxes-table.html
diff options
context:
space:
mode:
authorjeff <jeff>2008-06-28 19:25:24 +0000
committerjeff <jeff>2008-06-28 19:25:24 +0000
commita1871d3d13c1dafa93b956762c0d23728d261da7 (patch)
treeecd799ff28ca27d5e2ef07a615bcac49621dd391 /httemplate/elements/checkboxes-table.html
parent7588be4eb948426b972d0238dcdbb1537dc6a72a (diff)
agent virtualize address blocks and routers
Diffstat (limited to 'httemplate/elements/checkboxes-table.html')
-rw-r--r--httemplate/elements/checkboxes-table.html12
1 files changed, 9 insertions, 3 deletions
diff --git a/httemplate/elements/checkboxes-table.html b/httemplate/elements/checkboxes-table.html
index cdfa58eca..b6b04d111 100644
--- a/httemplate/elements/checkboxes-table.html
+++ b/httemplate/elements/checkboxes-table.html
@@ -28,9 +28,9 @@
% my $target_pkey = dbdef->table($opt{'target_table'})->primary_key;
%
% my( $source_pkey, $sourcenum, $source_obj );
-% if ( $opt{'source_obj'} ) {
+% if ( $opt{'source_obj'} || $opt{'object'} ) {
%
-% $source_obj = $opt{'source_obj'};
+% $source_obj = $opt{'source_obj'} || $opt{'object'};
% #$source_table = $source_obj->dbdef_table->table;
% $source_pkey = $source_obj->dbdef_table->primary_key;
% $sourcenum = $source_obj->$source_pkey();
@@ -48,11 +48,17 @@
%
% my $extra_sql = '';
%
+% if ( $opt{'agent_virt'} ) {
+% $extra_sql .= ' AND' . $FS::CurrentUser::CurrentUser->agentnums_sql(
+% 'null_right' => $opt{'agent_null_right'}
+% );
+% }
+%
% if ( $opt{'disable-able'} ) {
% $hashref->{'disabled'} = '';
%
% $extra_sql .= ( $sourcenum && $source_pkey )
-% ? "OR $source_pkey = $sourcenum"
+% ? " OR $source_pkey = $sourcenum"
% : '';
% }
%