<%@ page extends="oneit.servlets.jsp.FormJSP"%>
<%@ include file="/setuprequest.jsp"%>
<%@ include file="inc/stdimports.jsp"%>
<%@ include file="/editor/stdimports.jsp"%>

<%! protected String getName (ServletConfig config) { return "testAnalysis_jsp"; } %>
<%
    ORMProcessState     process     = (ORMProcessState) ProcessDecorator.getDefaultProcess(request);
    ObjectTransaction   objTran     = process.getTransaction ();
    String              module      = "TestAnalysis";
    TestInput           testInput   = (TestInput) process.getAttribute(module);
    
    if(testInput == null)
    {
        testInput = TestInput.createTestInput(objTran);

        process.setAttribute(module, testInput);

        %><%@include file="/saferedirect.jsp"%><%
    }
    
    request.setAttribute("oneit.pageFormDetails", CollectionUtils.mapEntry("name", "FormAnalysisEngine").mapEntry("enctype", "multipart/form-data").toMap());
    request.setAttribute("oneit.pageHeaderTitle", "Analysis Engine");
%>

<%@include file="/editor/header.jsp"%>

<style>
    .ui-autocomplete-input 
    {
        width: 80%;
    } 
</style>

    <oneit:layout_total widths="<%= new double[] {1, 4, 1, 4, 2} %>" skin="bootstrap">
        <oneit:skin tagName="layout_row">
           <oneit:layout_label width="1"><oneit:ormlabel    obj="<%= testInput %>"  field="CSV" /></oneit:layout_label>
            <oneit:layout_field width="1">
                <oneit:ormInput obj="<%= testInput %>"  attributeName="CSV" type="file" class="form-control"    required="required" style="padding:4px;"    accept=".csv"/>
            </oneit:layout_field>
           <oneit:layout_label width="1"><oneit:ormlabel    obj="<%= testInput %>"  field="Level" /></oneit:layout_label>
            <oneit:layout_field width="1">
                <tagfile:ormsingleasso_autocomplete obj="<%= testInput %>"  assocName="Level"   searcher="<%= new LevelSearcher() %>"/>
            </oneit:layout_field>
            <oneit:layout_field width="1">
                <oneit:button   value="Generate"    name="testAnalysis" cssClass="btn btn-primary"  requestAttribs='<%= CollectionUtils.EMPTY_MAP %>'/>
            </oneit:layout_field>
        </oneit:skin>
    </oneit:layout_total>

<%@include file="/editor/footer.jsp"%>