From 7556c796b35d61fa871b7651bb3c4bdfea40fe11 Mon Sep 17 00:00:00 2001 From: Sean Brennan Date: Fri, 18 Feb 2011 09:07:54 +1300 Subject: [PATCH] objectional content should ask for confirmation (Bug #692784) Added a javascript popup to prevent submission without confirming. Since this is a step backwards for eliminating javascript later work may include the exclusion of this and the replacement of a html pieform confirm. Signed-off-by: Sean Brennan --- htdocs/lang/en.utf8/view.php | 1 + htdocs/lib/view.php | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/htdocs/lang/en.utf8/view.php b/htdocs/lang/en.utf8/view.php index edffd00..cb2e326 100644 --- a/htdocs/lang/en.utf8/view.php +++ b/htdocs/lang/en.utf8/view.php @@ -120,6 +120,7 @@ $string['attachedfileaddedtofolder'] = "The attached file %s has been added to y $string['complaint'] = 'Complaint'; $string['date'] = 'Date'; $string['notifysiteadministrator'] = 'Notify site administrator'; +$string['notifysiteadministratorconfirm'] = 'Are you sure you wish to report this view as containing objectional material?'; $string['print'] = 'Print'; $string['reportobjectionablematerial'] = 'Report objectionable material'; $string['reportsent'] = 'Your report has been sent'; diff --git a/htdocs/lib/view.php b/htdocs/lib/view.php index 318ac22..7880358 100644 --- a/htdocs/lib/view.php +++ b/htdocs/lib/view.php @@ -3902,6 +3902,7 @@ function objection_form() { $form['elements']['submit'] = array( 'type' => 'submitcancel', 'value' => array(get_string('notifysiteadministrator', 'view'), get_string('cancel')), + 'confirm' => array(get_string('notifysiteadministratorconfirm', 'view')), ); return $form; } -- 1.7.1