I am using the hints from crythias howto "How To show freetext for specific Queues for Customers" http://forums.otrs.org/viewtopic.php?f=60&t=8032#p31758 to present some preformatted text for some queues only, in the Customer Interface (CustomerTicketMessage.dtl).
It works pretty good and I find it really useful.
There's a issue, however.
If a customer would like to open a ticket and select a queue which has this preformatted text... he fill in and customize the text according to his specific needs and _then_ he decide to load an attachment file to this ticket, the text of the subject and of the body gets reset to the preformatted text... that is, all the customisation of the customer is lost

In CustomerTicketMessage.dtl this is an example of the customized part - according to crythias' howto ...
Code: Select all
switch ($('#Dest').val() ) {
case "5\|\|New Employee": // need to slash escape the pipes
document.compose.Subject.value = "New Employee *Name Surname*";
document.compose.RichText.value = "Dear IT,<br/><br/>Please be kind to create the following email address:<br/>Name :<br/>Position :<br/>Company :<br/>Phone Number :<br/>Location :<br/><br/>Thanks<br/>";
break;
// [ ... some other definitions for specific queues ...]
default:
}
Code: Select all
<div>
<label for="Attachment">$Text{"Attachment"}:</label>
<input name="file_upload" id="Attachment" title="Attachment" type="file" size="40" />
<input type="hidden" id="AttachmentUpload" name="AttachmentUpload" value="0" />
<!--dtl:js_on_document_complete-->
<script type="text/javascript">//<![CDATA[
$('#Attachment').bind('change', function (Event) {
var $Form = $('#Attachment').closest('form');
Core.Form.Validate.DisableValidation($Form);
$Form.find('#AttachmentUpload').val('1').end().submit();
});
//]]></script>
<!--dtl:js_on_document_complete-->
<!-- dtl:block:Attachment -->
<div class="Attachment">
$QData{"Filename"} <span>$QData{"Filesize"}</span>
<button type="submit" name="AttachmentDelete$QData{"FileID"}" value="$Text{"Delete"}">$Text{"Delete"}</button>
</div>
<!-- dtl:block:Attachment -->
<div class="Clear"></div>
</div>
I am not so skilled with javascript but I think that this specific issue could be solved with some smart code adaptation
Any help ( crythias, if you are online, knock once for 'yes' please

Giulio