<%@ page import="com.atlassian.jira.util.BuildUtils"%>
<%@ taglib uri="webwork" prefix="webwork" %>
<%@ taglib uri="webwork" prefix="ui" %>
<%@ taglib uri="webwork" prefix="iterator" %>
<%@ taglib uri="jiratags" prefix="jira" %>
<%@ taglib uri="sitemesh-page" prefix="page" %>

<html>
<head>
	<title><webwork:text name="'admin.supportrequest.support.request'"/></title>
</head>

<body>

<table width="100%" cellpadding="10" cellspacing="0" border="0">
    <tr>
        <td>
            <webwork:if test="/hasMailServer == true">
                <page:applyDecorator name="jiraform">
                    <page:param name="title"><webwork:text name="'admin.supportrequest.support.request'"/></page:param>
                    <page:param name="description"><webwork:text name="'admin.supportrequest.instructions'"/>
                        <p>
                        <webwork:text name="'admin.supportrequest.note'">
                            <webwork:param name="'value0'"><b></webwork:param>
                            <webwork:param name="'value1'"></b></webwork:param>
                        </webwork:text>
                    </page:param>
                    <page:param name="action">JiraSupportRequest.jspa</page:param>
                    <page:param name="submitName"><webwork:text name="'admin.common.words.submit'"/></page:param>

                    <ui:textfield label="text('admin.supportrequest.to')" name="'to'" size="60" maxlength="255">
                        <ui:param name="'description'"><webwork:text name="'admin.supportrequest.email.description'"/></ui:param>
                        <ui:param name="'mandatory'" value="true" />
                    </ui:textfield>

                    <ui:textfield label="text('admin.supportrequest.cc')" name="'cc'" size="60" maxlength="255">
                        <ui:param name="'description'"><webwork:text name="'admin.supportrequest.email.description'"/></ui:param>
                    </ui:textfield>

                    <ui:textfield label="text('admin.supportrequest.subject')" name="'subject'" size="60" maxlength="255">
                        <ui:param name="'description'"><webwork:text name="'admin.supportrequest.subject.description'"/></ui:param>
                        <ui:param name="'mandatory'" value="true" />
                    </ui:textfield>

                    <ui:textarea label="text('common.words.description')" name="'description'" cols="'70'" rows="'20'" >
                        <ui:param name="'description'" value="''" />
                        <ui:param name="'mandatory'" value="true" />
                    </ui:textarea>

                    <ui:checkbox label="text('admin.supportrequest.data.export')" name="'attachzipexport'" fieldValue="'true'">
                        <ui:param name="'description'"><webwork:text name="'admin.supportrequest.data.export.description'"/><br>
                            <webwork:text name="'admin.supportrequest.data.export.confidentiality'"/><br>
                            <webwork:text name="'admin.supportrequest.data.export.note'">
                                <webwork:param name="'value0'"><u></webwork:param>
                                <webwork:param name="'value1'"></u></webwork:param>
                            </webwork:text>
                        </ui:param>
                    </ui:checkbox>

                    <ui:checkbox label="text('admin.supportrequest.attach.jira.logs')" name="'attachlogs'" fieldValue="'true'">
                        <ui:param name="'description'"><webwork:text name="'admin.supportrequest.attach.jira.logs.description'"/><br>
                            <webwork:text name="'admin.systeminfo.location.of.atlassian.jira.log'"/>: <webwork:property value="logPath" /><br>
                        </ui:param>
                    </ui:checkbox>

                    <ui:textfield label="text('admin.supportrequest.contact.name')" name="'name'" size="60" maxlength="255">
                        <ui:param name="'mandatory'" value="true" />
                    </ui:textfield>

                    <ui:textfield label="text('admin.supportrequest.contact.email')" name="'email'" size="60" maxlength="255">
                        <ui:param name="'mandatory'" value="true" />
                    </ui:textfield>

                    <ui:textfield label="text('admin.supportrequest.contact.number')" name="'phone'" size="60" maxlength="255" />

                    <tr>
                        <td bgcolor="fffff0" align=right valign=top><webwork:text name="'admin.supportrequest.environment'"/>:</td>
                        <td bgcolor="ffffff">
                            <table class="borderedBox" bgcolor="f0f0f0" width="100%" cellpadding="1">

                                <webwork:iterator value="props(true)" status="'status'">
                                <tr>
                                    <td nowrap width=1%><b><webwork:property value="key" /></b></td>
                                    <td ><webwork:property value="value" /></td>
                                </tr>
                                </webwork:iterator>

                                <webwork:iterator value="JVMstats" status="'status'">
                                <tr>
                                    <td nowrap width=1%><b><webwork:property value="key" /></b></td>
                                    <td ><webwork:property value="value" /></td>
                                </tr>
                                </webwork:iterator>

                                <webwork:iterator value="buildStats" status="'status'">
                                <tr>
                                    <td nowrap width=1%><b><webwork:property value="key" /></b></td>
                                    <td ><webwork:property value="value" /></td>
                                </tr>
                                </webwork:iterator>

                            </table>
                        </td>
                    </tr>
                </page:applyDecorator>
            </webwork:if>
            <webwork:else>
                <page:applyDecorator name="jiraform">
                    <page:param name="action">ViewProjects.jspa</page:param>
                    <page:param name="submitName"><webwork:text name="'common.forms.cancel'"/></page:param>
                    <page:param name="autoSelectFirst">false</page:param>
                    <page:param name="title"><webwork:text name="'admin.supportrequest.support.request'"/></page:param>
                    <page:param name="width">100%</page:param>
                    <page:param name="description">
                        <p><webwork:text name="'admin.supportrequest.page.description'"/></p>
                        <p>
                            <webwork:text name="'admin.supportrequest.note.configure.mail.server'">
                                <webwork:param name="'value0'"><span class="note"></webwork:param>
                                <webwork:param name="'value1'"></span></webwork:param>
                                <webwork:param name="'value2'"><a id="configure_mail_server" href="ViewMailServers.jspa"></webwork:param>
                                <webwork:param name="'value3'"></a></webwork:param>
                            </webwork:text>
                        </p>
                    </page:param>
                </page:applyDecorator>
            </webwork:else>
        </td>
    </tr>
</table>

</body>
</html>