NewTicketWizardServiceFormEdit.tt 6.49 KB
# --
# NewTicketWizardServiceForm.tt - provides HTML form for NewTicketWizardServiceForm - SeTIC - UFSC - http://setic.ufsc.br/
# Rodrigo Gonçalves - rodrigo.g@ufsc.br
# 
# Version 01/12/2015 - Support for OTRS 4.0.3
# Version 2017-12-19 - Support for OTRS 6
#
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

<h1 class="InvisibleText">[% Translate("Manage Queue-Auto Response Relations") | html %]</h1>

    [% BreadcrumbPath = [
            {
                Name => Translate('Manage service forms'),
                Link => Env("Action"),
            },
        ]
    %]

    [% USE EditTitle = String(Translate("Customizing form for service")) %]
    [% BreadcrumbPath.push({ Name => EditTitle.append( ' ', Data.ServiceName ) }) %]
	[% IF Data.QueueName %]
   		[% USE QueuePrefix = String(Translate("Queue")) %]	
        [% BreadcrumbPath.push({ Name => QueuePrefix.append( ' ', Data.QueueName ) }) %]
   	[% END %]        

    [% INCLUDE "Breadcrumb.tt" Path = BreadcrumbPath %]

            <div class="Content">

<form action="[% Env("CGIHandle") %]?Action=[% Env("Action") %];SubAction=ServiceEdit;ServiceID=[% Data.ServiceID | html %]" method="post" class="Validate">
	<input type="hidden" name="Action" value="[% Env("Action") %]"/>
	<input type="hidden" name="Subaction" value="ServiceEdit"/>
	<input type="hidden" name="ServiceID" value="[% Data.ServiceID | html %]"/>
    
    
    <fieldset class="TableLike">
    <label for="QueueID"> [% Translate("Queue") | html %]:</label>
	<div class="Field">
    	[% Data.QueuesStrg %]
    </div>
    <div class="Clear"></div>
    </fieldset>	
</form>

[% RenderBlockStart("CustomQueueRemoval") %]
<form action="[% Env("CGIHandle") %]?Action=[% Env("Action") %]" method="post" class="Validate">
	<input type="hidden" name="Action" value="[% Env("Action") %]"/>
	<input type="hidden" name="Subaction" value="QueueFormRemoval"/>
	<input type="hidden" name="ServiceID" value="[% Data.ServiceID | html %]"/>
	<input type="hidden" name="QueueID" value="[% Data.QueueID | html %]"/>
	<fieldset class="TableLike">	
    <div class="Field SpacingTop">
		<button  type="submit" value="[% Translate("Remove customization for this queue") | html %]">[% Translate("Remove customization for this queue") | html %]</button>
    </div>
    </fieldset>
</form>
[% RenderBlockEnd("CustomQueueRemoval") %]


                <form action="[% Env("CGIHandle") %]" method="post" class="Validate">
                    <input type="hidden" name="Action" value="[% Env("Action") %]"/>
                    <input type="hidden" name="Subaction" value="ServiceSave"/>
                    <input type="hidden" name="ServiceID" value="[% Data.ServiceID | html %]"/>
                    <input type="hidden" name="QueueID" value="[% Data.QueueID | html %]"/>

                    <fieldset class="TableLike">

                        <label for="Introduction">[% Translate("Introduction") | html %]: </label>
                        <div class="Field">
                            <textarea name="Introduction" id="Introduction" class="W50pc Validate_Required" rows="5">[% Data.Introduction | html %]</textarea>
                        </div>
                        <div class="Clear"></div>

                        <label for="FormUI">[% Translate("Form") | html %]: </label>
                        <div class="Field">
                        	
                            <textarea name="Form" id="FormUI" style="width: 50%" class="W50pc " rows="20">[% Data.Form | html %]</textarea>
                            <button type="button" onclick='Core.Agent.Admin.NewTicketWizardServiceForm.mostraEsconde("FormUI"); return false;'>Exibir JSON</button>
                            <div id="jsonFormUIDlg" style="height: 300px; overflow: auto; border-style: solid; border-width: 1px;"><div id="jsonForm"></div></div>
                            
                        </div>
                        <div class="Clear"></div>
                        
                        <label for="Schema">[% Translate("Schema") | html %]: </label>
                        <div class="Field">
                            <textarea name="Schema" id="Schema" class="W50pc " rows="20">[% Data.Schema | html %]</textarea>
                            <button type="button" onclick='Core.Agent.Admin.NewTicketWizardServiceForm.mostraEsconde("Schema"); return false;'>Exibir JSON</button>
                            <div id="jsonSchemaDlg" style="height: 300px; overflow: auto; border-style: solid; border-width: 1px;"><div id="jsonSchema"></div></div>
                        </div>
                        <div class="Clear"></div>
                        
                        <label for="FixedValues">[% Translate("Fixed values") | html %]: </label>
                        <div class="Field">
                            <textarea name="FixedValues" id="FixedValues" class="W50pc " rows="20">[% Data.FixedValues | html %]</textarea>
                        </div>
                        <div class="Clear"></div>
                        
                        <label for="CustomProps">[% Translate("Custom Properties for basic schema. <BR/>S_xxxxx=yyyy => Schema<BR/>F_xxxxx=yyyy => Form")  %]: </label>
                        <div class="Field">
                            <textarea name="CustomProps" id="CustomProps" class="W50pc " rows="20">[% Data.CustomProps | html %]</textarea>
                            <button type="button" onclick='Core.Agent.Admin.NewTicketWizardServiceForm.mostraEsconde("CustomProps"); return false;'>Show JSON</button>
                            <div id="jsonCustomPropsDlg" style="height: 300px; overflow: auto; border-style: solid; border-width: 1px;">
                            <code class="chili-lang-javascript" id='jsCode'></code>
                            </div>
                        </div>
                        <div class="Clear"></div>
                        
                        <div class="Field SpacingTop">
                            <button class="Primary" type="submit" value="[% Translate("Submit") | html %]">[% Translate("Submit") | html %]</button>
                            [% Translate("or") | html %]
                            <a href="[% Env("Baselink") %]Action=[% Env("Action") %]">[% Translate("Cancel") | html %]</a>
                        </div>
                        <div class="Clear"></div>
                    </fieldset>

                </form>
            </div>