Commit f4dbb016 authored by Tobias Zeuch's avatar Tobias Zeuch Committed by Robert Lyon
Browse files

Don't show delete-checkbox in outbox for internal notification´s



Bug 1382905: Don't show checkbox to delete internal notifications in the outbox
because these cannot be deleted.

Change-Id: I64cc46c4deedfabc71a2687c5a1393ad86563196
Signed-off-by: default avatarTobias Zeuch <tobias.zeuch@kit.edu>
parent 76c35fdf
......@@ -79,7 +79,7 @@ else if ($delete) {
}
}
db_commit();
$message = get_string('deletednotifications1', 'artefact.multirecipientnotification', $countdeleted);
$message = get_string('deletednotifications1', 'activity', $countdeleted);
}
// ------------ Change ------------
......
......@@ -71,12 +71,16 @@ $activitylist = activitylistout_html($type);
$star = json_encode($THEME->get_url('images/star.png'));
$readicon = json_encode($THEME->get_url('images/readusermessage.png'));
$strread = json_encode(get_string('read', 'activity'));
$strnodelete = json_encode(get_string('nodelete', 'activity'));
$javascript = <<<JAVASCRIPT
function markread(form, action) {
var e = getElementsByTagAndClassName(null,'tocheck'+action,form);
if (e.length === 0 && action == 'del') {
alert($strnodelete);
return;
}
var pd = {};
for (cb in e) {
......
......@@ -41,6 +41,7 @@ $string['selectallread'] = 'All unread notifications';
$string['selectalldelete'] = 'All notifications for deletion';
$string['recurseall'] = 'Recurse all';
$string['alltypes'] = 'All types';
$string['nodelete'] = 'No notifications to delete';
$string['markedasread'] = 'Marked your notifications as read';
$string['failedtomarkasread'] = 'Failed to mark your notifications as read';
......
......@@ -70,8 +70,10 @@
</td>
<td>{$item->date}</td>
<td class="center">
<label class="accessible-hidden" for="delete-{$item->table}-{$item->id}">{str tag='delete' section='mahara'}</label>
<input type="checkbox" class="tocheckdel" name="delete-{$item->table}-{$item->id}" id="delete-{$item->table}-{$item->id}">
{if $item->table === 'artefact_multirecipient_notification'}
<label class="accessible-hidden" for="delete-{$item->table}-{$item->id}">{str tag='delete' section='mahara'}</label>
<input type="checkbox" class="tocheckdel" name="delete-{$item->table}-{$item->id}" id="delete-{$item->table}-{$item->id}">
{/if}
</td>
</tr>
{/foreach}
\ No newline at end of file
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