Commit 989a0252 authored by Lisa Seeto's avatar Lisa Seeto Committed by Robert Lyon

Bug 1814476: Unsuspend institution form button repeated twice

- Removed the duplication of unspend institution button
- Updated the description text names and placement on page

behatnotneeded

Change-Id: I138dcab8c6bbf3f3e752eec04212511ca93e63a1
Signed-off-by: default avatarLisa Seeto <lisaseeto@catalyst.net.nz>
parent 210713db
......@@ -1267,18 +1267,10 @@ if ($institution && $institution != 'mahara') {
'usebuttontag' => true,
'class' => 'btn-default',
'value' => '<span class="icon icon-lg text-success icon-check left" role="presentation" aria-hidden="true"></span>' . get_string('unsuspendinstitution','admin'),
'description' => get_string('unsuspendinstitutiondescription','admin'),
),
)
);
$suspendform = pieform($suspendformdef);
// Create a second forms for unsuspension to go in the suspend message.
// This keeps the HTML IDs unique
$suspendformdef['name'] = 'institution_unsuspend_top';
$suspendformdef['renderer'] = 'oneline';
$suspendformdef['successcallback'] = 'institution_unsuspend_submit';
$suspendform_top = pieform($suspendformdef);
}
}
}
......@@ -1319,9 +1311,6 @@ if (isset($suspended)) {
}
if (isset($suspendform)) {
$smarty->assign('suspendform', $suspendform);
if (isset($suspendform_top)) {
$smarty->assign('suspendform_top', $suspendform_top);
}
}
}
......
......@@ -1140,8 +1140,8 @@ $string['suspendinstitutiondescription'] = 'Here you may suspend an institution.
$string['suspendedinstitutionmessage'] = 'This institution has been suspended.';
$string['unsuspendinstitution'] = 'Unsuspend institution';
$string['unsuspendinstitutiondescription'] = 'Here you may unsuspend an institution. Users of suspended institutions will be unable to log in until the institution is unsuspended.<br /><strong>Beware:</strong> Unsuspending an institution without resetting or turning off its expiry date may result in a daily re-suspension.';
$string['unsuspendinstitutiondescription_top'] = '<em>Beware:</em> Unsuspending an institution without resetting or turning off its expiry date may result in a daily re-suspension.';
$string['unsuspendinstitutiondescription_top_instadmin'] = 'Users of suspended institutions are unable to log in. Contact the site administrator to unsuspend the institution.';
$string['unsuspendinstitutiondescription_warning'] = '<em>Beware:</em> Unsuspending an institution without resetting or turning off its expiry date may result in a daily re-suspension.';
$string['unsuspendinstitutiondescription_instadmin'] = 'Users of suspended institutions are unable to log in. Contact the site administrator to unsuspend the institution.';
// Bulk Leap2A User export
$string['bulkexport'] = 'Export users';
......
......@@ -75,3 +75,9 @@
}
}
}
.panel-default > .panel-heading-warning {
background-color: $alert-warning-bg;
color: $alert-warning-text;
font-weight: 400;
}
\ No newline at end of file
......@@ -3,6 +3,8 @@
{if $suspendform}
<div class="btn-group btn-group-top">{$suspendform|safe}</div>
<p class="lead">{str tag="suspendinstitutiondescription" section="admin"}</p>
<p class="lead">{str tag="unsuspendinstitutiondescription_warning" section="admin"}</p>
{/if}
......@@ -18,17 +20,14 @@
{elseif $institution_form}
<div class="panel panel-default view-container">
{if $suspended}
<h2 class="title panel-heading">{$suspended}</h2>
<h2 class="title panel-heading panel-heading-warning">{$suspended}</h2>
{if !$USER->get('admin')}
<div class="panel-body">
<div class="detail">
{if $USER->get('admin')}
<p>{str tag="unsuspendinstitutiondescription_top" section="admin"}</p>
{else}
<p>{str tag="unsuspendinstitutiondescription_top_instadmin" section="admin"}</p>
{/if}
<p>{str tag="unsuspendinstitutiondescription_instadmin" section="admin"}</p>
</div>
<div>{$suspendform_top|safe}</div>
</div>
{/if}
{/if}
{if $add}
......
Markdown is supported
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