[SOLVED]OTRS Customer Template Tickets dropdownlist

Moderator: crythias

Locked
marty210578
Znuny newbie
Posts: 22
Joined: 04 Apr 2011, 16:15
Znuny Version: OTRS 3.0.10
Real Name: Martijn

[SOLVED]OTRS Customer Template Tickets dropdownlist

Post by marty210578 »

Hello.
I created 2 customer ticket templates based on the http://forums.otrs.org/viewtopic.php?f=60&t=10673 and specific http://www.youtube.com/watch?v=1B8mZ9Ku_bA
It works perfectly only disadvantage is that the users see buttons instead of a dropdown selection list.
For 2 templates that would be fine, for more then 10 it would be a cosmetic mess.

This is the code i have currently.
File : /opt/otrs/Kernel/Output/HTML/Standard/CustomerTicketMessage.dtl

Code: Select all

#############################################
# Ticket Templates customizations
#############################################
                <label>$Text{"Templates"}:</label>
                    <div class="Field">
                        <button type="button" onclick="$('#Template1').submit()" value="$Text{"Template : Virus detected"}">$Text{"Template : Virus detected"}</button>
                        <button type="button" onclick="$('#Template2').submit()" value="$Text{"Template : Grant access to mailbox"}">$Text{"Template : grant access to mailbox"}</button>
                    </div>
                    <div class="Clear"></div>
The actual forms that are in the file are:

Code: Select all

#############################################
# Ticket Templates 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="$QData{"FormID"}"/>
    <input type="hidden" name="ExpandCustomerName" value="2"/>
    <input type="hidden" name="Subject" value="VIRUS DETECTED ON PC"/>
    <input type="hidden" name="Dest" value="5||SupportCenter Inbox"/> 
    <input type="hidden" name="TypeID" value="4"/>
    <input type="hidden" name="PriorityID" value="3"/>
    <input type="hidden" name="ServiceID" value="2"/>
    <input type="hidden" name="Expand" value="1"/>
    <input type="hidden" name="Body" value="Computer Name: <br>Comment:"/>
</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="$QData{"FormID"}"/>
    <input type="hidden" name="ExpandCustomerName" value="2"/>
    <input type="hidden" name="Subject" value="Lotus Notes Grant access to mailbox"/>
    <input type="hidden" name="Dest" value="5||SupportCenter Inbox"/> 
    <input type="hidden" name="TypeID" value="4"/>
    <input type="hidden" name="PriorityID" value="3"/>
    <input type="hidden" name="ServiceID" value="2"/>
    <input type="hidden" name="Expand" value="1"/>
    <input type="hidden" name="Body" value="Computer Name: <br>Comment:"/>
</form>
I tried a few options with a pulldown menu, it provides me the options but when i select them it fails to fill in the drom data.

Code: Select all

<label>$Text{"Templates"}:</label>
       		<select size="1" id="template" name="template">
				<option value=""> - Select - </option>
				<option onselect="$('#Template1').submit()" value="$Text{"Template : Virus detected"}">$Text{"Template : Virus detected"}</option>
				<option onselect="$('#Template2').submit()" value="$Text{"Template : Grant access to mailbox"}">$Text{"Template : grant access to mailbox"}</option>
			</select>
Any help would highly be appreciated
Last edited by marty210578 on 27 Sep 2011, 12:35, edited 1 time in total.
OTRS Version OTRS 3.0.10
ITSM 3.05
Erwing
Znuny newbie
Posts: 16
Joined: 03 Jan 2011, 15:40
Znuny Version: 2.4.5

Re: OTRS Customer Template Tickets dropdownlist

Post by Erwing »

I am trying to achieve the same - please share if you get a solution on this

Thanks!

--- Erwing
OTRS 3.2.2 on CentOS - mySQL
Erwing
Znuny newbie
Posts: 16
Joined: 03 Jan 2011, 15:40
Znuny Version: 2.4.5

Re: OTRS Customer Template Tickets dropdownlist

Post by Erwing »

Maybe my soultion works?

http://forums.otrs.org/viewtopic.php?f=61&t=11381

-- Erwing
OTRS 3.2.2 on CentOS - mySQL
marty210578
Znuny newbie
Posts: 22
Joined: 04 Apr 2011, 16:15
Znuny Version: OTRS 3.0.10
Real Name: Martijn

Re: OTRS Customer Template Tickets dropdownlist

Post by marty210578 »

Erwing....

many many thanks!! this indeed did the Job :)
OTRS Version OTRS 3.0.10
ITSM 3.05
Locked