objectManager: Show reply text when users edit their own entries
This commit is contained in:
@@ -416,80 +416,64 @@ class ObjectManager
|
|||||||
|
|
||||||
$this->oObject = $oObject;
|
$this->oObject = $oObject;
|
||||||
|
|
||||||
/* if this is a queue add a dialog for replying to the submitter of the
|
/* If it isn't implemented, that means there is no default text */
|
||||||
queued entry */
|
$sDefaultReply = $this->getOptionalSetting("getDefaultReply", "");
|
||||||
if($this->getIsQueue() || ($oObject->objectGetSubmitterId() && $oObject->objectGetSubmitterId() != $_SESSION['current']->iUserId))
|
|
||||||
|
echo html_frame_start("Reply text", "90%", "", 0);
|
||||||
|
echo "<table width='100%' border=0 cellpadding=2 cellspacing=0>\n";
|
||||||
|
echo '<tr valign=top><td class="color0"><b>email Text</b></td>',"\n";
|
||||||
|
echo '<td><textarea name="sReplyText" style="width: 100%" cols="80" '.
|
||||||
|
'rows="10">'.$sDefaultReply.'</textarea></td></tr>',"\n";
|
||||||
|
|
||||||
|
if($this->getIsQueue())
|
||||||
{
|
{
|
||||||
/* If it isn't implemented, that means there is no default text */
|
/////////////////////////////////////////////////
|
||||||
$sDefaultReply = $this->getOptionalSetting("getDefaultReply", "");
|
// 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";
|
||||||
|
|
||||||
echo html_frame_start("Reply text", "90%", "", 0);
|
// NOTE: We use the label tag so the user can click anywhere in
|
||||||
echo "<table width='100%' border=0 cellpadding=2 cellspacing=0>\n";
|
// the text of the radio button to select the radio button.
|
||||||
echo '<tr valign=top><td class="color0"><b>email Text</b></td>',"\n";
|
// Otherwise the user has to click on the very small circle portion
|
||||||
echo '<td><textarea name="sReplyText" style="width: 100%" cols="80" '.
|
// of the button to select it
|
||||||
'rows="10">'.$sDefaultReply.'</textarea></td></tr>',"\n";
|
foreach($this->aCommonResponses as $iIndex => $sReply)
|
||||||
|
|
||||||
if($this->getIsQueue())
|
|
||||||
{
|
{
|
||||||
/////////////////////////////////////////////////
|
echo '<tr valign=top><td class="color0"></td>',"\n";
|
||||||
// output radio buttons for some common responses
|
echo '<td class="color0"><label for="'.$iIndex.'"><input'.
|
||||||
echo '<tr valign=top><td class="color0"></td><td class="color0">'.
|
' type="radio" name="sOMCommonReply" id="'.$iIndex.'" value="'.$sReply.'">'.
|
||||||
'<b>Common replies</b><br> Email <a href="mailto:'.APPDB_OWNER_EMAIL.'">'.
|
$sReply.'</label></td>',"\n";
|
||||||
APPDB_OWNER_EMAIL.'</a> if you want to suggest a new common reply.</td></tr>',"\n";
|
echo '</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 */
|
|
||||||
echo '<tr valign=top><td class=color3 align=center colspan=2>' ,"\n";
|
|
||||||
echo '<input name="sSubmit" type="submit" value="Submit" class="button" '.
|
|
||||||
'>',"\n";
|
|
||||||
if(!$this->getOptionalSetting("objectHideDelete", FALSE))
|
|
||||||
{
|
|
||||||
echo '<input name="sSubmit" type="submit" value="Delete" '.
|
|
||||||
'class="button">',"\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if($this->sState == 'queued' && !$this->getOptionalSetting("objectHideReject", FALSE))
|
|
||||||
{
|
|
||||||
echo '<input name="sSubmit" type="submit" value="Reject" class="button" '.
|
|
||||||
'>',"\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo $this->handle_preview_button();
|
|
||||||
|
|
||||||
echo '<input name="sSubmit" type="submit" value="Cancel" class="button" '.
|
|
||||||
'>',"\n";
|
|
||||||
echo '</td></tr>',"\n";
|
|
||||||
echo '</table>';
|
|
||||||
echo html_frame_end();
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
// display the move children entry
|
|
||||||
$this->displayMoveChildren($oObject);
|
|
||||||
|
|
||||||
echo '<tr valign=top><td class=color3 align=center colspan=2>',"\n";
|
|
||||||
echo '<input name="sSubmit" type="submit" value="Submit" class="button">'.
|
|
||||||
' ',"\n";
|
|
||||||
echo '<input name="sSubmit" type="submit" value="Delete" class="button">'."\n";
|
|
||||||
$this->handle_preview_button();
|
|
||||||
echo "</td></tr>\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* buttons for operations we can perform on this entry */
|
||||||
|
echo '<tr valign=top><td class=color3 align=center colspan=2>' ,"\n";
|
||||||
|
echo '<input name="sSubmit" type="submit" value="Submit" class="button" '.
|
||||||
|
'>',"\n";
|
||||||
|
if(!$this->getOptionalSetting("objectHideDelete", FALSE))
|
||||||
|
{
|
||||||
|
echo '<input name="sSubmit" type="submit" value="Delete" '.
|
||||||
|
'class="button">',"\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->sState == 'queued' && !$this->getOptionalSetting("objectHideReject", FALSE))
|
||||||
|
{
|
||||||
|
echo '<input name="sSubmit" type="submit" value="Reject" class="button" '.
|
||||||
|
'>',"\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo $this->handle_preview_button();
|
||||||
|
|
||||||
|
echo '<input name="sSubmit" type="submit" value="Cancel" class="button" '.
|
||||||
|
'>',"\n";
|
||||||
|
echo '</td></tr>',"\n";
|
||||||
|
echo '</table>';
|
||||||
|
echo html_frame_end();
|
||||||
|
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
|
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user