Dear List,

Please have a look at the attached files and let me know what you think.
File list:
AgentEdit.diff - contains a diff for 2 files AgentZoomArticle.dtl and 
ModulesCustom.pm
AgentEdit.pm - the module itself.
AgentEdit.dtl - the template.

Provides an "Edit" link on ticket zoom and the ability to edit article data.
For OTRS 1.2 (CVS).
Based (copy-paste) on AgentForward module by Martin.
Doesn't do anything to attachments (yet).

Regards,
Boris Ratner.

diff -r /opt/otrs/Kernel/Config/ModulesCustom.pm 
/home/bratner/otrs/Kernel/Config/ModulesCustom.pm
11c11
< # Changed by Boris Ratner to include AgentEdit
---
> 
16c16
< $VERSION = '$Revision: 1.5brat $';
---
> $VERSION = '$Revision: 1.5 $';
28c28
< use Kernel::Modules::AgentEdit;
---
> 
diff -r /opt/otrs/Kernel/Output/HTML/Standard/AgentZoomArticle.dtl 
/home/bratner/otrs/Kernel/Output/HTML/Standard/AgentZoomArticle.dtl
18,22d17
< #--
< # Show edit
< #--
< <a 
href="$Env{"Baselink"}Action=AgentEdit&TicketID=$Data{"TicketID"}&ArticleID=$Data{"ArticleID"}&QueueID=$Data{"QueueID"}"
 onmouseover="window.status='$Text{"Edit"}'; return true;" 
onmouseout="window.status='';">$Text{"Edit"}</a>

Attachment: AgentEdit.pm
Description: Perl program

# --
# AgentEdit - provides HTML form for AgentEdit
#
# Original AgentForward.pm created by Martin Endenhofer.
# Copyright (C) 2002-2003 Martin Edenhofer <[EMAIL PROTECTED]>
# --
# $Id: AgentEdit.dtl,v 0.1 Boris Ratner <[EMAIL PROTECTED]>
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (GPL). If you
# did not receive this file, see http://www.gnu.org/licenses/gpl.txt.
# --
<!-- start edit form -->


<table border="0" width="100%" cellspacing="0" cellpadding="3" cols="1">
<tr> 
  <td align="left" class="table2"> 
  <b>$Env{"Box0"}$Text{"Edit article of ticket"}: $Data{"TicketNumber"}$Env{"Box1"}</b>
  </td>
</tr>
<tr> 
  <td align="left" valign="top" class="table1">

  <form action="$Env{"CGIHandle"}" method="post" name="edit">
  <input type="hidden" name="Action" value="AgentEdit">
  <input type="hidden" name="Subaction" value="SaveArticle">
  <input type="hidden" name="QueueID" value="$Data{"QueueID"}">
  <input type="hidden" name="TicketID" value="$Data{"TicketID"}">
  <input type="hidden" name="ArticleID" value="$Data{"ArticleID"}">
  <input type="hidden" name="NextScreen" value="$Data{"NextScreen"}">
  <input type="hidden" name="Email" value="$Data{"Email"}">
  <input type="hidden" name="InReplyTo" value="$Data{"InReplyTo"}">
  <table border="0">
    <tr>
      <td width="20%">$Text{"From"}:</td>
      <td width="80%"><input type="text" name="From" value="$Data{"From"}" 
size="65"></td>
    </tr>
    <tr>
      <td>$Text{"To"}:</td>
      <td><input type="text" name="To" value="$Data{"To"}" size="65"></td>
    </tr>
    <tr>
      <td>$Text{"Cc"}:</td>
      <td><input type="text" name="Cc" value="$Data{"Cc"}" size="65"></td>
    </tr>
    <tr>
      <td>$Text{"Subject"}:</td>
      <td><input type="text" name="Subject" value="$Data{"Subject"}" size="65"></td>
    </tr>
    <tr>
      <td valign="top">$Text{"Text"}:</td>
      <td>
<pre>
<textarea name="Body" rows="25" 
cols="$Config{"TextAreaEmailWindow"}">$Data{"Body"}</textarea>
</pre>
      </td>
    </tr>
    <tr>
      <td>$Text{"Article type"}:</td>
      <td>$Data{"ArticleTypesStrg"}</td>
    </tr>
    <tr>
      <td>$Text{"Article sender type "}:</td>
      <td>$Data{"ArticleSenderTypesStrg"}</td>
    </tr>

  </table>
  <br>
  <input class="button" type="submit" value="$Text{"Save"}"> 
  </form>

  </td> 
</tr>
</table>
<!-- end edit form -->
_______________________________________________
OTRS mailing list: dev - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/dev
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev

Reply via email to