Commit ae0ac744 authored by Nigel McNie's avatar Nigel McNie
Browse files

Show 'no authinstances' message as a session error message rather than in the template.

parent f3093875
......@@ -214,10 +214,10 @@ if ($institution || $add) {
if (!$add && empty($authinstances)) {
if ($USER->get('admin')) {
$smarty->assign('noauthmessage', get_string('adminnoauthpluginforinstitution', 'admin'));
$SESSION->add_error_msg(get_string('adminnoauthpluginforinstitution', 'admin'));
}
else {
$smarty->assign('noauthmessage', get_string('noauthpluginforinstitution', 'admin'));
$SESSION->add_error_msg(get_string('noauthpluginforinstitution', 'admin'));
}
}
......
......@@ -10,8 +10,6 @@
{if $institution_form}
{if $add}
<h3>{str tag="addinstitution" section="admin"}</h3>
{elseif ($noauthmessage)}
<div class="error">{$noauthmessage}</div>
{/if}
{$institution_form}
{else}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment