Skip to content

Commit

Permalink
MDL-79250 admin: Add title to external_content_banner template
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Sep 4, 2023
1 parent 206c3a6 commit 3492efa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions admin/renderer.php
Expand Up @@ -897,7 +897,8 @@ protected function campaign_content(bool $showcampaigncontent): string {
$url = "https://campaign.moodle.org/current/lms/{$lang}/install/";
$params = [
'url' => $url,
'iframeid' => 'campaign-content'
'iframeid' => 'campaign-content',
'title' => get_string('campaign', 'admin'),
];

return $this->render_from_template('core/external_content_banner', $params);
Expand All @@ -918,7 +919,8 @@ protected function services_and_support_content(bool $showservicesandsupport): s
$url = "https://campaign.moodle.org/current/lms/{$lang}/servicesandsupport/";
$params = [
'url' => $url,
'iframeid' => 'services-support-content'
'iframeid' => 'services-support-content',
'title' => get_string('supportandservices', 'admin'),
];

return $this->render_from_template('core/external_content_banner', $params);
Expand Down
2 changes: 2 additions & 0 deletions lang/en/admin.php
Expand Up @@ -119,6 +119,7 @@
$string['calendartype'] = 'Calendar type';
$string['calendartype_desc'] = 'Choose a default calendar type for the whole site. This setting can be overridden in the course settings or by users in their personal profile.';
$string['calendar_weekend'] = 'Weekend days';
$string['campaign'] = 'Campaign';
$string['cannotdeletemodfilter'] = 'You cannot uninstall the \'{$a->filter}\' because it is part of the \'{$a->module}\' module.';
$string['cannotuninstall'] = '{$a} can not be uninstalled.';
$string['categoryemail'] = 'Email';
Expand Down Expand Up @@ -1342,6 +1343,7 @@
$string['stickyblockspagetype'] = 'Page type to configure';
$string['strictformsrequired'] = 'Strict validation of required fields';
$string['stripalltitletags'] = 'Remove HTML tags from all activity names';
$string['supportandservices'] = 'Support and services';
$string['supportcontact'] = 'Support contact';
$string['supportemail'] = 'Support email';
$string['supportemailsubject'] = 'Site support request - {$a}';
Expand Down
3 changes: 2 additions & 1 deletion lib/templates/external_content_banner.mustache
Expand Up @@ -34,10 +34,11 @@
{
"iframeid": "external-content",
"url": "http://example.com/link",
"title": "External content"
}
}}
<div class="alert alert-secondary alert-block fade in">
<iframe id="{{iframeid}}" class="w-100 border-0"></iframe>
<iframe id="{{iframeid}}" title="{{title}}" class="w-100 border-0"></iframe>
</div>
{{#js}}
(function() {
Expand Down

0 comments on commit 3492efa

Please sign in to comment.