# --
# AdminGenericInterfaceTransportHTTPSOAP.dtl - provides HTML form for AdminLog
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# $Id: AdminGenericInterfaceTransportHTTPSOAP.dtl,v 1.17 2012-03-15 02:18:02 cr Exp $
# --
# 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.
# --
<div class="MainBox ARIARoleMain LayoutFixedSidebar SidebarFirst AdminGenericInterfaceTransportHTTPSOAP">
    <h1>$Text{"GenericInterface Transport HTTP::SOAP for Web Service %s", "$Data{"WebserviceName"}"}</h1>
    <div class="GenericInterfaceWebserviceConfigPath">
        <h3>
<!-- dtl:block:WebservicePathElement -->
            $Config{"GenericInterface::Webservice::Path::Separator"}
            <a href="$Env{"Baselink"}$Data{"Link"};Nav=$LQData{"Nav"}">
                $QData{"Name"}
            </a>
<!-- dtl:block:WebservicePathElement -->
<!-- dtl:block:WebservicePathElementNoLink -->
            $Config{"GenericInterface::Webservice::Path::Separator"}
            $QData{"Name"}
<!-- dtl:block:WebservicePathElementNoLink -->

        </h3>
    </div>

    <div class="SidebarColumn">
        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Actions"}</h2>
            </div>
            <div class="Content">
                <ul class="ActionList">
                    <li>
                        <a href="$Env{"Baselink"}Action=AdminGenericInterfaceWebservice;Subaction=Change;WebserviceID=$LQData{"WebserviceID"}" class="CallForAction"><span>$Text{"Go back to web service"}</span></a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <div class="ContentColumn">

        <div class="WidgetSimple">
            <div class="Header">
                <h2>$Text{"Network transport"}</h2>
            </div>
            <div class="Content">
                <h3>$Text{"Properties"}</h3>
                <form action="$Env{"CGIHandle"}" method="post" class="Validate PreventMultipleSubmits">
                    <input type="hidden" name="Action" value="$Env{"Action"}"/>
                    <input type="hidden" name="Subaction" value="$QData{"Action"}Action"/>
                    <input type="hidden" name="WebserviceID" value="$QData{"WebserviceID"}" id="WebserviceID"/>
                    <input type="hidden" name="CommunicationType" value="$QData{"CommunicationType"}" id="CommunicationType"/>
                    <div class="LayoutGrid ColumnsWithSpacing">
                        <fieldset class="TableLike">

                            <label>$Text{"Type"}:</label>
                            <div class="Field">$QData{"Type"}</div>
                            <div class="Clear"></div>

<!-- dtl:block:Endpoint -->
                            <label class="Mandatory" for="Endpoint">
                                <span class="Marker">*</span> $Text{"Endpoint"}:
                            </label>
                            <div class="Field">
                                <input id="Endpoint" class="W50pc Validate_Required $QData{"EndpointServerError"}" type="text" maxlength="250" value="$QData{"Endpoint"}" name="Endpoint"/>
                                <div id="EndpointError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                                <div id="EndpointServerError" class="TooltipErrorMessage"><p>$Text{"$Data{"EndpointServerErrorMessage"}"}</p></div>
                                <p class="FieldExplanation">
                                    $Text{"URI to indicate a specific location for accessing a service."}
                                    <br/>
                                    $Text{"e.g. http://local.otrs.com:8000/Webservice/Example"}
                                </p>
                            </div>
                            <div class="Clear"></div>
<!-- dtl:block:Endpoint -->

                            <label class="Mandatory" for="NameSpace"><span class="Marker">*</span>$Text{"Namespace"}:</label>
                            <div class="Field">
                                <input id="NameSpace" class="W50pc $QData{"NameSpaceServerError"} Validate_Required" type="text" maxlength="250" value="$QData{"NameSpace"}" name="NameSpace"/>
                                <div id="NameSpaceError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                                <div id="NameSpaceServerError" class="TooltipErrorMessage"><p>$Text{"$Data{"NameSpaceServerErrorMessage"}"}</p></div>
                                <p class="FieldExplanation">
                                    $Text{"URI to give SOAP methods a context, reducing ambiguities."}
                                    <br/>
                                    $Text{"e.g urn:otrs-com:soap:functions or http://www.otrs.com/GenericInterface/actions"}
                                </p>
                            </div>
                            <div class="Clear"></div>

<!-- dtl:block:TransportProvider -->
                            <label class="Mandatory" for="MaxLength"><span class="Marker">*</span>$Text{"Maximum message length"}:</label>
                            <div class="Field">
                                <input id="MaxLength" class="W25pc Validate_Required Validate_Number $QData{"MaxLengthServerError"}" type="text" maxlength="10" value="$QData{"MaxLength"}" name="MaxLength"/>
                                <div id="MaxLengthError" class="TooltipErrorMessage"><p>$Text{"This field should be an integer number."}</p></div>
                                <div id="MaxLengthServerError" class="TooltipErrorMessage"><p>$Text{"$Data{"MaxLengthServerErrorMessage"}"}</p></div>
                                <p class="FieldExplanation">
                                    $Text{"Here you can specify the maximum size (in bytes) of SOAP messages that OTRS will process."}
                                </p>
                            </div>
                            <div class="Clear"></div>
<!-- dtl:block:TransportProvider -->

<!-- dtl:block:TransportRequester -->
                            <label for="Encoding">$Text{"Encoding"}:</label>
                            <div class="Field">
                                <input id="Encoding" class="W50pc" type="text" maxlength="250" value="$QData{"Encoding"}" name="Encoding"/>
                                <p class="FieldExplanation">
                                    $Text{"The character encoding for the SOAP message contents."}
                                    <br/>
                                    $Text{"e.g utf-8, latin1, iso-8859-1, cp1250, Etc."}
                                </p>
                            </div>
                            <div class="Clear"></div>

                            <label for="SOAPAction">$Text{"SOAPAction"}:</label>
                            <div class="Field">
                                $Data{"SOAPActionStrg"}
                                <p class="FieldExplanation">
                                    $Text{"Set to "Yes" to send a filled SOAPAction header."}
                                    <br/>
                                    $Text{"Set to "No" to send an empty SOAPAction header."}
                                </p>
                            </div>
<!-- dtl:js_on_document_complete -->
<script type="text/javascript">//<![CDATA[
$('#SOAPAction').bind('change', function(){
    if ( $(this).val() === 'Yes') {
        $('.SOAPActionField').removeClass('Hidden');
    }
    else {
        $('.SOAPActionField').addClass('Hidden');
    }
});
//]]></script>
<!-- dtl:js_on_document_complete -->
                            <div class="Clear"></div>

                            <div class="SOAPActionField $QData{"SOAPActionHidden"}">
                                <fieldset class="TableLike">

                                    <label for="SOAPActionSeparator">$Text{"SOAPAction separator"}:</label>
                                    <div class="Field ">
                                        $Data{"SOAPActionSeparatorStrg"}
                                        <p class="FieldExplanation">
                                            $Text{"Character to use as separator between name space and SOAP method."}
                                            <br/>
                                            $Text{"Usually .Net web services uses a "/" as separator."}
                                        </p>
                                    </div>
                                    <div class="Clear"></div>

                                </fieldset>
                            </div>

                            <label  for="Authentication">$Text{"Authentication"}:</label>
                            <div class="Field">
                                $Data{"AuthenticationStrg"}
                                <p class="FieldExplanation">
                                    $Text{"The authentication mechanism to access the remote system."}
                                    <br/>
                                    $Text{"A "-" value means no authentication."}
                                </p>
                            </div>
<!-- dtl:js_on_document_complete -->
<script type="text/javascript">//<![CDATA[
$('#Authentication').bind('change', function(){
    if ( $(this).val() === 'BasicAuth') {
        $('.BasicAuthField').removeClass('Hidden');
        $('.BasicAuthField').find('#UserName').each(function(){
            $(this).addClass('Validate_Required');
        });
    }
    else {
        $('.BasicAuthField').addClass('Hidden');
        $('.BasicAuthField').find('#User').each(function(){
            $(this).removeClass('Validate_Required');
        });
    }
});
//]]></script>
<!-- dtl:js_on_document_complete -->
                            <div class="Clear"></div>

                            <div class="BasicAuthField $QData{"BasicAuthHidden"}">
                                <fieldset class="TableLike">

                                    <label class="Mandatory" for="User"><span class="Marker">*</span> $Text{"User"}:</label>
                                    <div class="Field">
                                        <input id="User" class="W50pc $QData{"UserValidateRequired"} $QData{"UserServerError"}" type="text" maxlength="250" value="$QData{"User"}" name="User"/>
                                        <div id="UserError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                                        <div id="UserServerError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                                        <p class="FieldExplanation">
                                            $Text{"The user name to be used to access the remote system."}
                                        </p>
                                    </div>
                                    <div class="Clear"></div>

                                    <label for="Password">$Text{"Password"}:</label>
                                    <div class="Field">
                                        <input id="Password" class="W50pc " type="password" maxlength="250" value="$QData{"Password"}" name="Password"/>
                                        <p class="FieldExplanation">
                                            $Text{"The password for the privileged user."}
                                        </p>
                                    </div>
                                    <div class="Clear"></div>
                                </fieldset>
                            </div>

                            <label  for="UseSSL">$Text{"Use SSL Options"}:</label>
                            <div class="Field">
                                $Data{"UseSSLStrg"}
                                <p class="FieldExplanation">
                                    $Text{"Show or hide SSL options to connect to the remote system."}
                                </p>
                            </div>
<!-- dtl:js_on_document_complete -->
<script type="text/javascript">//<![CDATA[
$('#UseSSL').bind('change', function(){
    if ( $(this).val() === 'Yes') {
        $('.SSLField').removeClass('Hidden');
        $('.SSLField').find('#SSLP12Certificate').each(function(){
            $(this).addClass('Validate_Required');
        });
        $('.SSLField').find('#SSLP12Password').each(function(){
            $(this).addClass('Validate_Required');
        });
    }

    else {
        $('.SSLField').addClass('Hidden');
        $('.SSLField').find('#SSLP12Certificate').each(function(){
            $(this).removeClass('Validate_Required');
        });
        $('.SSLField').find('#SSLP12Password').each(function(){
            $(this).removeClass('Validate_Required');
        });
    }
});
//]]></script>
<!-- dtl:js_on_document_complete -->

                            <div class="SSLField $QData{"SSLHidden"}">
                                <fieldset class="TableLike">

                                    <label class="Mandatory" for="SSLP12Certificate"><span class="Marker">*</span>$Text{"Certificate File"}:</label>
                                    <div class="Field">
                                        <input id="SSLP12Certificate" class="W50pc $QData{"SSLP12CertificateValidateRequired"} $QData{"SSLP12CertificateServerError"}" type="text" maxlength="250" value="$QData{"SSLP12Certificate"}" name="SSLP12Certificate"/>
                                        <div id="SSLP12CertificateError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                                        <div id="SSLCertificateServerError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                                        <p class="FieldExplanation">
                                            $Text{"The full path and name of the SSL certificate file (must be in .p12 format)."}
                                            <br/>
                                            $Text{"e.g. /opt/otrs/var/certificates/SOAP/certificate.p12"}
                                        </p>
                                    </div>
                                    <div class="Clear"></div>

                                    <label class="Mandatory" for="SSLP12Password"><span class="Marker">*</span>$Text{"Certificate Password File"}:</label>
                                    <div class="Field">
                                        <input id="SSLP12Password" class="W50pc $QData{"SSLP12PasswordValidateRequired"} $QData{"SSLP12PasswordServerError"}" type="password" maxlength="250" value="$QData{"SSLP12Password"}" name="SSLP12Password"/>
                                        <div id="SSLP12PasswordError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                                        <div id="SSLP12PasswordServerError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                                        <p class="FieldExplanation">
                                            $Text{"The password to open the SSL certificate."}
                                        </p>
                                    </div>
                                    <div class="Clear"></div>

                                    <label for="SSLCAFile">$Text{"Certification Authority (CA) File"}:</label>
                                    <div class="Field">
                                        <input id="SSLCAFile" class="W50pc " type="text" maxlength="250" value="$QData{"SSLCAFile"}" name="SSLCAFile"/>
                                        <p class="FieldExplanation">
                                            $Text{"The full path and name of the certification authority certificate file that validates SSL certificate."}
                                            <br/>
                                            $Text{"e.g. /opt/otrs/var/certificates/SOAP/CA/ca.pem"}
                                        </p>
                                    </div>
                                    <div class="Clear"></div>

                                    <label for="SSLCADir">$Text{"Certification Authority (CA) Directory"}:</label>
                                    <div class="Field">
                                        <input id="SSLCADir" class="W50pc " type="text" maxlength="250" value="$QData{"SSLCADir"}" name="SSLCADir"/>
                                        <p class="FieldExplanation">
                                            $Text{"The full path of the certification authority directory where the CA certificates are stored in the file system."}
                                            <br/>
                                            $Text{"e.g. /opt/otrs/var/certificates/SOAP/CA"}
                                        </p>
                                    </div>
                                    <div class="Clear"></div>

                                    <label for="SSLProxy">$Text{"Proxy Server"}:</label>
                                    <div class="Field">
                                        <input id="SSLProxy" class="W50pc " type="text" maxlength="250" value="$QData{"SSLProxy"}" name="SSLProxy"/>
                                        <p class="FieldExplanation">
                                            $Text{"URI of a proxy server to be used (if needed)."}
                                            <br/>
                                            $Text{"e.g. http://proxy_hostname:8080"}
                                        </p>
                                    </div>
                                    <div class="Clear"></div>
                                    <label for="SSLProxyUser">$Text{"Proxy User"}:</label>
                                    <div class="Field">
                                        <input id="SSLProxyUser" class="W50pc" type="text" maxlength="250" value="$QData{"SSLProxyUser"}" name="SSLProxyUser"/>
                                        <p class="FieldExplanation">
                                            $Text{"The user name to be used to access the proxy server."}
                                        </p>
                                    </div>
                                    <div class="Clear"></div>

                                    <label for="SSLProxyPassword">$Text{"Proxy Password"}:</label>
                                    <div class="Field">
                                        <input id="SSLProxyPassword" class="W50pc " type="password" maxlength="250" value="$QData{"SSLProxyPassword"}" name="SSLProxyPassword"/>
                                        <p class="FieldExplanation">
                                            $Text{"The password for the proxy user."}
                                        </p>
                                    </div>
                                    <div class="Clear"></div>
                                </fieldset>
                            </div>

<!-- dtl:block:TransportRequester -->

                            <div class="Field SpacingTop">
                                <button type="submit" class="Primary" value="$Text{"Save and continue"}">$Text{"Save"}</button>
<!-- dtl:block:SaveAndFinishButton -->
                                <button type="submit" id="SaveAndFinishButton" value="$Text{"Save and finish"}">$Text{"Save and finish"}</button>
                                <input type="hidden" name="ReturnToWebservice" id="ReturnToWebservice" value="" />
<!-- dtl:js_on_document_complete -->
<script type="text/javascript">//<![CDATA[
$('#SaveAndFinishButton').bind('click', function(){
    $('#ReturnToWebservice').val(1);
});
//]]></script>
<!-- dtl:js_on_document_complete -->
<!-- dtl:block:SaveAndFinishButton -->
                                $Text{"or"}
                                <a href="$Env{"Baselink"}Action=AdminGenericInterfaceWebservice;Subaction=Change;WebserviceID=$QData{"WebserviceID"}">$Text{"Cancel"}</a>
                            </div>
                            <div class="Clear"></div>
                        </fieldset>
                    </div>

                </form>
            </div>
        </div>

    </div>
    <div class="Clear"></div>
</div>
