<%@ 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";
    TestAnalysis        testAnalysis    = (TestAnalysis) process.getAttribute(module);
    
    if(testAnalysis == null)
    {
        testAnalysis = TestAnalysis.createTestAnalysis(objTran);

        process.setAttribute(module, testAnalysis);

        %><%@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"%>

    <oneit:layout_total widths="<%= new double[] {1, 4, 7} %>" skin="bootstrap">
        <oneit:skin tagName="layout_row">
            <oneit:layout_label width="1">
                <strong style="line-height: 30px">CSV : </strong>
            </oneit:layout_label>
            <oneit:layout_field width="1">
                <oneit:ormInput obj="<%= testAnalysis %>"   attributeName="<%= TestAnalysis.FIELD_CSV %>"   type="file" class="form-control"    required="required" style="padding:4px;"    accept=".csv"/>
            </oneit:layout_field>
            <oneit:layout_field width="1">
                <oneit:button   value="Import CSV"  name="importCSV"    cssClass="btn btn-primary"  requestAttribs='<%= CollectionUtils.EMPTY_MAP %>'/>
            </oneit:layout_field>
        </oneit:skin>
    </oneit:layout_total>

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