MDL-58220 block_login: Update icon rendering of idp list

This commit is contained in:
Damyon Wiese 2017-03-28 09:41:33 +08:00
parent 13b449f4a5
commit f59d81f487
2 changed files with 9 additions and 2 deletions

View file

@ -114,8 +114,13 @@ class block_login extends block_base {
$this->content->text .= '<h6>' . get_string('potentialidps', 'auth') . '</h6>';
$this->content->text .= '<div class="potentialidplist">';
foreach ($potentialidps as $idp) {
$this->content->text .= '<div class="potentialidp"><a href="' . $idp['url']->out() . '" title="' . s($idp['name']) . '">';
$this->content->text .= $OUTPUT->render($idp['icon'], $idp['name']) . s($idp['name']) . '</a></div>';
$this->content->text .= '<div class="potentialidp">';
$this->content->text .= '<a class="btn btn-secondary btn-block" ';
$this->content->text .= 'href="' . $idp['url']->out() . '" title="' . s($idp['name']) . '">';
if (!empty($idp['iconurl'])) {
$this->content->text .= '<img src="' . s($idp['iconurl']) . '" width="24" height="24" class="m-r-1"/>';
}
$this->content->text .= s($idp['name']) . '</a></div>';
}
$this->content->text .= '</div>';
$this->content->text .= '</div>';