'menubar' => '', #menubar arrayref
#agent virtualization
- 'agent_virt' => 1,
- 'agent_null_right' => 'Access Right Name',
+ 'agent_virt' => 1,
+ 'agent_null_right' => 'Access Right Name',
+ 'agent_clone_extra_sql' => '', #if provided, this overrides the extra_sql
+ #implementing agent virt, for clone
+ #operations. i.e. pass "1=1" to allow
+ #cloning anything
'viewall_dir' => '', #'search' or 'browse', defaults to 'search'
# HTML callbacks
###
+ 'body_etc' => '', # Additional BODY attributes, i.e. onLoad=""
+
'html_init' => '', #after the header/menubar
#string or coderef of additional HTML to add before </TABLE>
<% include('/elements/header'. ( $opt{popup} ? '-popup' : '' ). '.html',
$title,
- include( '/elements/menubar.html', @menubar )
+ include( '/elements/menubar.html', @menubar ),
+ $opt{'body_etc'},
)
%>
% 'layer_values' => $layer_values,
% 'html_between' => $f->{'html_between'},
%
-% #umm.
+% #umm. for select-agent_types at least
% 'disabled' => $f->{'disabled'},
% );
%
$clone = $1;
+ $qsearch{'extra_sql'} = ' AND '. $opt{'agent_clone_extra_sql'}
+ if $opt{'agent_clone_extra_sql'};
+
$object = qsearchs({ %qsearch, 'hashref' => { $pkey => $clone } });
&{$opt{'clone_callback'}}($cgi, $object, $fields, \%opt )
$value = $query;
}
$value =~ /^(\d+)$/ or die "unparsable $pkey";
- $object = qsearchs({ %qsearch, 'hashref' => { $pkey => $1 } });
+ $object = qsearchs({ %qsearch, 'hashref' => { $pkey => $1 } })
+ or die "$pkey $1 not found in $table";
warn "$table $pkey => $1"
if $opt{'debug'};