Improve help text on the confirm deletion page

This commit is contained in:
Alexander Nicolaysen Sørnes
2007-10-23 16:21:17 +02:00
committed by Chris Morgan
parent fb13cd7c13
commit ad73b6445f

View File

@@ -433,6 +433,22 @@ class ObjectManager
return; return;
} }
/* Why the user should write an explanation for the deletion */
if($oObject->objectGetSubmitterId() != $_SESSION['current']->iUserId)
{
$shWhyComment = "Please enter a reason why so that you don’t hurt the submitter’s".
" feelings.";
$oUser = new user($oObject->objectGetSubmitterId());
$sSubmitter = " (submitted by ".$oUser->objectMakeLink().")";
} else
{
$shWhyComment = "Although you submitted it it might be useful for other users to know why ".
"you are deleting it.";
$sSubmitter = "";
}
$oTable = new Table(); $oTable = new Table();
$oTableRow = new TableRow(); $oTableRow = new TableRow();
$oTable->setAlign("center"); $oTable->setAlign("center");
@@ -444,9 +460,8 @@ class ObjectManager
"Confirm deletion". "Confirm deletion".
"</div>". "</div>".
'<div class="info_contents">'. '<div class="info_contents">'.
"Are you sure you wish to delete this entry?<br />". "Are you sure you wish to delete this entry".$sSubmitter."?<br />".
"Please enter a reason why so that you don&#8217;t hurt the submitter&#8217;s". $shWhyComment.
" feelings.".
"</div>". "</div>".
"</div>". "</div>".