From: Andrey Kutejko Date: Sat, 18 Jul 2015 17:30:29 +0000 (+0300) Subject: allow post method links in object tools X-Git-Tag: 0.6~47 X-Git-Url: https://git.andy128k.dev/?a=commitdiff_plain;h=cfc80f9413917721e47eaf1e9bf7bb5cb0ff42a2;p=ipf.git allow post method links in object tools --- diff --git a/ipf/admin/component.php b/ipf/admin/component.php index b69bd46..6986d0a 100644 --- a/ipf/admin/component.php +++ b/ipf/admin/component.php @@ -247,7 +247,19 @@ abstract class IPF_Admin_Component $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( diff --git a/ipf/admin/templates/admin/change.html b/ipf/admin/templates/admin/change.html index df21503..a8482dd 100644 --- a/ipf/admin/templates/admin/change.html +++ b/ipf/admin/templates/admin/change.html @@ -21,8 +21,14 @@