$this->_setupEditForm($form);
}
- $objecttools = $this->objectTools($object);
+ $objecttools = array();
+ foreach ($this->objectTools($object) as $title => $action) {
+ if (!is_array($action)) {
+ $action = array(
+ 'url' => $action,
+ );
+ }
+ $action['title'] = $title;
+ if (!array_key_exists('method', $action))
+ $action['method'] = 'GET';
+ $objecttools[] = $action;
+ }
+
$extraMedia = $this->extraMedia($form);
return $this->fullContext(array(
<div id="content-main">
<ul class="object-tools">
{block objecttools}
- {foreach $objecttools as $ot_title => $ot_url}
- <li><a href="{$ot_url}">{$ot_title}</a></li>
+ {foreach $objecttools as $ot_index => $ot_action}
+ <li>
+ {if $ot_action['method'] == 'POST'}
+ <form id="id_ot_{$ot_index}" method="post" action="{$ot_action['url']}"><a href="javascript:void()" onclick="document.getElementById('id_ot_{$ot_index}').submit();">{$ot_action['title']}</a></form>
+ {else}
+ <a href="{$ot_action['url']}">{$ot_action['title']}</a>
+ {/if}
+ </li>
{/foreach}
{/block}
</ul>