objectManager: Display reply text when editing another user's entry

This commit is contained in:
Alexander Nicolaysen Sørnes
2007-09-29 22:12:40 +02:00
committed by Chris Morgan
parent 3e2029a354
commit 5875da01a7

View File

@@ -287,7 +287,7 @@ class ObjectManager
/* if this is a queue add a dialog for replying to the submitter of the
queued entry */
if($this->bIsQueue)
if($this->bIsQueue || ($oObject->objectGetSubmitterId() && $oObject->objectGetSubmitterId() != $_SESSION['current']->iUserId))
{
/* If it isn't implemented, that means there is no default text */
if(method_exists(new $this->sClass, "getDefaultReply"))
@@ -299,27 +299,29 @@ class ObjectManager
echo '<td><textarea name="sReplyText" style="width: 100%" cols="80" '.
'rows="10">'.$sDefaultReply.'</textarea></td></tr>',"\n";
/////////////////////////////////////////////////
// output radio buttons for some common responses
echo '<tr valign=top><td class="color0"></td><td class="color0">'.
'<b>Common replies</b><br/> Email <a href="mailto:'.APPDB_OWNER_EMAIL.'">'.
APPDB_OWNER_EMAIL.'</a> if you want to suggest a new common reply.</td></tr>',"\n";
// NOTE: We use the label tag so the user can click anywhere in
// the text of the radio button to select the radio button.
// Otherwise the user has to click on the very small circle portion
// of the button to select it
foreach($this->aCommonResponses as $iIndex => $sReply)
if($this->bIsQueue)
{
echo '<tr valign=top><td class="color0"></td>',"\n";
echo '<td class="color0"><label for="'.$iIndex.'"><input'.
' type="radio" name="sOMCommonReply" id="'.$iIndex.'" value="'.$sReply.'"/>'.
$sReply.'</label></td>',"\n";
echo '</tr>',"\n";
/////////////////////////////////////////////////
// output radio buttons for some common responses
echo '<tr valign=top><td class="color0"></td><td class="color0">'.
'<b>Common replies</b><br/> Email <a href="mailto:'.APPDB_OWNER_EMAIL.'">'.
APPDB_OWNER_EMAIL.'</a> if you want to suggest a new common reply.</td></tr>',"\n";
// NOTE: We use the label tag so the user can click anywhere in
// the text of the radio button to select the radio button.
// Otherwise the user has to click on the very small circle portion
// of the button to select it
foreach($this->aCommonResponses as $iIndex => $sReply)
{
echo '<tr valign=top><td class="color0"></td>',"\n";
echo '<td class="color0"><label for="'.$iIndex.'"><input'.
' type="radio" name="sOMCommonReply" id="'.$iIndex.'" value="'.$sReply.'"/>'.
$sReply.'</label></td>',"\n";
echo '</tr>',"\n";
}
// end output radio buttons for common responses
/////////////////////////////////////////////////
}
// end output radio buttons for common responses
/////////////////////////////////////////////////
/* buttons for operations we can perform on this entry */