Hello,
i want to povide a template for the text in the form, the customer fills out while creating a new ticket in OTRS (customer.pl?Action=CustomerTicketMessage).
I didn´t find a way to do it.
Thanks for any hints.
Greetings from Berlin and a happy new year.
Gregor
template for text in CustomerTicketMessage
Moderator: crythias
-
- Znuny superhero
- Posts: 629
- Joined: 24 Feb 2012, 03:58
- Znuny Version: LTS and Features
- Real Name: Mo Azfar
- Location: Kuala Lumpur, MY
- Contact:
Re: template for text in CustomerTicketMessage
if you know a bit around html, take a look at template example for agent ticket phone
1. https://github.com/znuny/Znuny/blob/9d2 ... one.tt#L53
2. https://github.com/znuny/Znuny/blob/9d2 ... ne.tt#L349
3. Then apply it to CustomerticketMessage.tt
Example
good luck
1. https://github.com/znuny/Znuny/blob/9d2 ... one.tt#L53
2. https://github.com/znuny/Znuny/blob/9d2 ... ne.tt#L349
3. Then apply it to CustomerticketMessage.tt
Example
Code: Select all
# example template for customizations, see hidden form at the end of the file
<label>[% Translate("Templates") | html %]:</label>
<div class="Field">
<button type="button" onclick="$('#Template1').submit()" value="[% Translate("Example Template 1") | html %]">[% Translate("Example Template 1") | html %]</button>
<button type="button" onclick="$('#Template2').submit()" value="[% Translate("Example Template 2") | html %]">[% Translate("Example Template 2") | html %]</button>
</div>
<div class="Clear"></div>
Code: Select all
# example template form for customizations
<form action="[% Env("CGIHandle") %]" method="post" enctype="multipart/form-data" id="Template1">
<input type="hidden" name="Action" value="[% Env("Action") %]"/>
<input type="hidden" name="Subaction" value="StoreNew"/>
<input type="hidden" name="FormID" value="[% Data.FormID | html %]"/>
<input type="hidden" name="Expand" value="1"/>
<input type="hidden" name="TypeID" value="1"/>
<input type="hidden" name="Dest" value="5||IT Department"/>
<input type="hidden" name="Subject" value="Example Subject 1"/>
<input type="hidden" name="Body" value="Name 1:<br/>
Product 1:<br/>
Comment 1:"/>
</form>
<form action="[% Env("CGIHandle") %]" method="post" enctype="multipart/form-data" id="Template2">
<input type="hidden" name="Action" value="[% Env("Action") %]"/>
<input type="hidden" name="Subaction" value="StoreNew"/>
<input type="hidden" name="FormID" value="[% Data.FormID | html %]"/>
<input type="hidden" name="Expand" value="1"/>
<input type="hidden" name="TypeID" value="2"/>
<input type="hidden" name="Dest" value="2||Raw"/>
<input type="hidden" name="Subject" value="Example Subject 2"/>
<input type="hidden" name="Body" value="Name 2:<br/>
Product 2:<br/>
Comment 2:"/>
</form>
My Github
OTRS CE/LTS Discord Channel
Cant Update Package Anymore ? Check This
Professional OTRS, Znuny & OTOBO services: efflux.de/en
Free and premium add-ons: English
OTRS CE/LTS Discord Channel
Cant Update Package Anymore ? Check This
Professional OTRS, Znuny & OTOBO services: efflux.de/en
Free and premium add-ons: English
-
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: template for text in CustomerTicketMessage
If you know some JavaScript, you could create a javascript file and a config file: https://os.perl-services.de/perl-academ ... uickticket
That doesn't require to change any framework files.
Or you could use https://feature-addons.de/znuny/Ticket/TicketTemplates
That doesn't require to change any framework files.
Or you could use https://feature-addons.de/znuny/Ticket/TicketTemplates
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
-
- Znuny newbie
- Posts: 8
- Joined: 13 Jun 2016, 15:51
- Znuny Version: 6.0.35
- Real Name: Gabi Schulz
Re: template for text in CustomerTicketMessage
The javascript works without any problems with Ticketphone.
Is it possible to use this javascript in the customer ticket message as well.
Is it possible to use this javascript in the customer ticket message as well.
-
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: template for text in CustomerTicketMessage
Code: Select all
$('#NewPhoneTicket>fieldset').prepend(
'<div class="Field"><button type="button" id="quickticket">QuickTicket</button></div><div class="Clear"></div>'
);
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
-
- Znuny newbie
- Posts: 8
- Joined: 13 Jun 2016, 15:51
- Znuny Version: 6.0.35
- Real Name: Gabi Schulz
Re: template for text in CustomerTicketMessage
The ID of the customer ticket message dialog is NewCustomerTicket.
I made the following changes .
Javascript:
XML:
But this doesn't work either.
I made the following changes .
Javascript:
Code: Select all
$('#NewCustomerTicket>fieldset').prepend(
$('#Attachment>fieldset').prepend(
'<div class="Field"><button type="button" id="quickticket1">Test</button></div><div class="Clear"></div>'
XML:
Code: Select all
<Setting Name="Loader::Module::CustomerTicketZoom###004-QuickTicket" Required="0" Valid="1">
<Description Translatable="1">Loader module registration for the Customer interface.</Description>
<Navigation>Frontend::Customer::ModuleRegistration::Loader</Navigation>
<value>
<hash>
<Item Key="JavaScript">
<array>
<Item>Custom.QuickTicket.js</Item>
</array>
</item>
</hash>
</Value>
</Setting>
-
- Znuny newbie
- Posts: 8
- Joined: 13 Jun 2016, 15:51
- Znuny Version: 6.0.35
- Real Name: Gabi Schulz
Re: template for text in CustomerTicketMessage
I fixed the problem.
The error was in the XML.
correct is:
Now it works as desired.
The error was in the XML.
correct is:
Code: Select all
<Setting Name="Loader::Module::CustomerTicketMessage###004-QuickTicket" Required="0" Valid="1">
<Description Translatable="1">Loader module registration for the Customer interface.</Description>
<Navigation>Frontend::Customer::ModuleRegistration::Loader</Navigation>
<Value>
<Hash>
<Item Key="JavaScript">
<Array>
<Item>Custom.QuickTicket.js</Item>
</Array>
</Item>
</Hash>
</Value>
</Setting>