Etemplate: Use the actual template attribute if set for action processing, instead of always using the deprecated options attribute

This commit is contained in:
nathangray 2020-11-12 14:41:23 -07:00
parent e225f8efe2
commit 15084c8439

View File

@ -255,7 +255,7 @@ class Nextmatch extends Etemplate\Widget
if (isset($value['actions']) && !isset($value['actions'][0])) if (isset($value['actions']) && !isset($value['actions'][0]))
{ {
$value['action_links'] = array(); $value['action_links'] = array();
$template_name = isset($value['template']) ? $value['template'] : $this->attrs['options']; $template_name = isset($value['template']) ? $value['template'] : ($this->attrs['template'] ?: $this->attrs['options']);
if (!is_array($value['action_links'])) $value['action_links'] = array(); if (!is_array($value['action_links'])) $value['action_links'] = array();
$value['actions'] = self::egw_actions($value['actions'], $template_name, '', $value['action_links']); $value['actions'] = self::egw_actions($value['actions'], $template_name, '', $value['action_links']);
} }