Commit 240b9a91 authored by Lisa Seeto's avatar Lisa Seeto
Browse files

Bug 1813096: report objectionable material link now



When a user selects to "report objectionable material" and
selects either notify administrator or cancel, the link or the message
should now display correctly.

Note: In the future Pieform needs a follow up for how it handles a user
cancelling the form probably similar to jsonsuccess

behatnotneeded

Change-Id: I6cf94289f6cee9e8d9ad6f2d1cc4b5852227a479
Signed-off-by: default avatarLisa Seeto <lisaseeto@catalyst.net.nz>
parent 972714d9
......@@ -71,7 +71,7 @@ function objectionSuccess(form, data) {
jQuery('#report-form').modal('hide');
}
// Update the objection menu link to be message sent one
if (jQuery('#objection_link').length) {
if (jQuery('#objection_link').length && typeof data.objection_cancelled == 'undefined') {
jQuery('#objection_link').parent().html('<span class="nolink"><span class="icon icon-lg icon-flag text-danger left" role="presentation" aria-hidden="true"></span>' + get_string_ajax('objectionablematerialreported', 'mahara') + '</span>');
}
}
......
......@@ -107,6 +107,7 @@ function objection_form_cancel_submit(Pieform $form) {
global $view;
$form->reply(PIEFORM_OK, array(
'goto' => $view->get_url(),
'objection_cancelled' => true,
)
);
}
......
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