From c7020c79d865f9ca98426072483c8bf0a63f35ed Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 24 Jan 2023 16:11:49 -0700 Subject: [PATCH] Calendar: Allow calendar integration to specify a caption, not just use app name --- calendar/inc/class.calendar_uiviews.inc.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/calendar/inc/class.calendar_uiviews.inc.php b/calendar/inc/class.calendar_uiviews.inc.php index b7f69f41ed..700baf9bcf 100644 --- a/calendar/inc/class.calendar_uiviews.inc.php +++ b/calendar/inc/class.calendar_uiviews.inc.php @@ -406,14 +406,14 @@ class calendar_uiviews extends calendar_ui $img = self::integration_get_icons($app, null, [])[0]; preg_match('//', $img, $results); $actions['integration_'.$app] = array( - 'caption' => $app, - 'iconUrl' => $results[1] ?: "$app\navbar", - 'checkbox' => true, - 'hint' => lang("show %1 from %2",lang(Link::get_registry($app,'entries') ?: 'entries'),lang(Link::get_registry($app,'name'))), - 'group' => 'integration', + 'caption' => $data['selects']['caption'] ?? $app, + 'iconUrl' => $results[1] ?: "$app\navbar", + 'checkbox' => true, + 'hint' => lang("show %1 from %2", lang(Link::get_registry($app, 'entries') ?: 'entries'), lang(Link::get_registry($app, 'name'))), + 'group' => 'integration', 'onExecute' => 'javaScript:app.calendar.toolbar_integration_action', - 'checked' => in_array($app, (array)$this->cal_prefs['integration_toggle']), - 'data' => array('toggle_off' => '0', 'toggle_on' => '1') + 'checked' => in_array($app, (array)$this->cal_prefs['integration_toggle']), + 'data' => array('toggle_off' => '0', 'toggle_on' => '1') ); }