diff options
author | ivan <ivan> | 2009-02-09 01:49:28 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-02-09 01:49:28 +0000 |
commit | df676d82034cb63ff357f8d8ed0f95ce788fb98b (patch) | |
tree | 11159ec986698a2b7b1b86cf1f68b4e0b67c5677 /httemplate/edit/elements/edit.html | |
parent | 24533a22a23e211888fcc36a5177c0def5c77de3 (diff) |
further work on agents editing own packages: fix fallout on package customization from turning agent_virt on in edit/part_pkg.cgi, add a "clone package" to package browse, like clone service, and have agent type selection disappear when you set an agentnum. RT#1331
Diffstat (limited to 'httemplate/edit/elements/edit.html')
-rw-r--r-- | httemplate/edit/elements/edit.html | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html index 76fcd384b..d18a37d5a 100644 --- a/httemplate/edit/elements/edit.html +++ b/httemplate/edit/elements/edit.html @@ -91,8 +91,12 @@ Example: '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' @@ -106,6 +110,8 @@ Example: # 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> @@ -172,7 +178,8 @@ Example: <% include('/elements/header'. ( $opt{popup} ? '-popup' : '' ). '.html', $title, - include( '/elements/menubar.html', @menubar ) + include( '/elements/menubar.html', @menubar ), + $opt{'body_etc'}, ) %> @@ -620,6 +627,9 @@ if ( $cgi->param('error') ) { $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 ) |