2 ================================================================================
4 ================================================================================
5 Copyright (C) 2017 AT&T Intellectual Property
6 ================================================================================
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 ================================================================================
20 <%@ page import="org.openecomp.portalsdk.analytics.util.AppConstants" %>
21 <%@ page import="org.openecomp.portalsdk.analytics.model.definition.ReportDefinition" %>
22 <%@ page import="org.openecomp.portalsdk.analytics.system.AppUtils" %>
23 <%@ page import="org.openecomp.portalsdk.analytics.controller.WizardSequence" %>
24 <%@ page import="java.util.Iterator" %>
25 <%@ page import="org.openecomp.portalsdk.analytics.xmlobj.FormFieldType" %>
26 <%@page import="org.openecomp.portalsdk.analytics.model.runtime.FormField"%>
27 <%@page import="org.openecomp.portalsdk.analytics.system.Globals"%>
29 ReportDefinition rdef = (ReportDefinition) request.getAttribute(AppConstants.SI_REPORT_DEFINITION);
30 WizardSequence ws = rdef.getWizardSequence();
34 <table class=mTAB width="100%" class="tableBorder" border="0" cellspacing="1" cellpadding="3" align=center>
36 <td class=rbg1 colspan=5 valign="Middle"><b class=rtableheader>Step <%= ws.getCurrentStepIndex() %> of <%= ws.getStepCount() %> - Report <%= ws.getCurrentStep() %></b></td>
39 <td align="center" valign="Middle" width="7%" height="30"><b class=rtableheader> No </b></td>
40 <td align="center" valign="Middle" width="72%"><b class=rtableheader>Field Name</b></td>
41 <td align="center" valign="Middle" width="7%"><b class=rtableheader>Re-order</b></td>
42 <td align="center" valign="Middle" width="14%" colspan=2>
43 <button type="submit" onClick="document.forma.<%= AppConstants.RI_WIZARD_ACTION %>.value='<%= AppConstants.WA_ADD %>';document.forma.submit()" border="0" width="40" height="28" att-button btn-type="primary" size="small" title='Add'>Add</button>
44 <button type="submit" onClick="document.forma.<%= AppConstants.RI_WIZARD_ACTION %>.value='<%= AppConstants.WSS_ADD_BLANK %>';document.forma.submit()" border="0" width="40" height="28" att-button btn-type="primary" size="small" title='Add Blank'>Add Blank</button>
48 if(rdef.getFormFieldList()!=null)
49 for(Iterator iter=rdef.getFormFieldList().getFormField().iterator(); iter.hasNext(); iCount++) {
50 FormFieldType fft = (FormFieldType) iter.next(); %>
51 <tr class=<%=(iCount % 2 == 0)?"rowalt1":"rowalt2"%>>
52 <td align="center" height="30"><font class=rtabletext><%= iCount+1 %><!--fft.getOrderBySeq(): <%= fft.getOrderBySeq() %>--></font></td>
53 <td><font class=rtabletext><%= fft.getFieldName() %> [<%= fft.getFieldId()%>]</font></td>
54 <td align="center" nowrap>
56 <img border="0" src="<%= AppUtils.getImgFolderURL() %>columnblankdown.gif" width="25" height="7">
58 <input type=image border="0" src="<%= AppUtils.getImgFolderURL() %>columnup.gif" width="25" height="7" onClick="document.forma.<%= AppConstants.RI_WIZARD_ACTION %>.value='<%= AppConstants.WA_MOVE_UP %>'; document.forma.<%= AppConstants.RI_DETAIL_ID %>.value='<%= fft.getFieldId() %>';">
60 <% if(iCount==rdef.getFormFieldList().getFormField().size()-1) { %>
61 <img border="0" src="<%= AppUtils.getImgFolderURL() %>columnblankup.gif" width="25" height="7">
63 <input type=image border="0" src="<%= AppUtils.getImgFolderURL() %>columndown.gif" width="25" height="7" onClick="document.forma.<%= AppConstants.RI_WIZARD_ACTION %>.value='<%= AppConstants.WA_MOVE_DOWN %>'; document.forma.<%= AppConstants.RI_DETAIL_ID %>.value='<%= fft.getFieldId() %>';">
68 <%if(!fft.getFieldType().equals(FormField.FFT_BLANK)) { %>
69 <input type=image border="0" src="<%= AppUtils.getImgFolderURL() %>pen_paper.gif" alt="Edit" width="12" height="12" onClick="document.forma.<%= AppConstants.RI_WIZARD_ACTION %>.value='<%= AppConstants.WA_EDIT %>'; document.forma.<%= AppConstants.RI_DETAIL_ID %>.value='<%= fft.getFieldId() %>';">
73 <td align="center"><input type=image border="0" src="<%= AppUtils.getImgFolderURL() %>deleteicon.gif" alt="Remove" width="12" height="12" onClick="if(! confirm('Are you sure you want to delete form field <%= fft.getFieldName() %> from the report?')) {return false;} else {document.forma.<%= AppConstants.RI_WIZARD_ACTION %>.value='<%= AppConstants.WA_DELETE %>'; document.forma.<%= AppConstants.RI_DETAIL_ID %>.value='<%= fft.getFieldId() %>'; }"></td>
78 <td colspan=5 align="center" height="30"><font class=rtabletext>No form fields defined</font></td>
82 <% if(Globals.customizeFormFieldInfo()) { %>
83 <% if(rdef.getFormFieldList()!=null) { %>
84 <table class=mTAB width="100%" class="tableBorder" border="0" cellspacing="1" cellpadding="3" align=center>
85 <tr><td class=rbg1 valign="middle"><b class=rtableheader> Defining the Information Bar </b></td></tr>
86 <tr><td align="center">
87 <textarea name="blueBarField" id="blueBarField" rows="20" cols="200" style="width: 200px"><%= nvl(rdef.getFormFieldList().getComment()).length()>0?rdef.getFormFieldList().getComment():""%></textarea>
89 <tr><td align="center">
90 <button type="submit" onClick="document.forma.<%= AppConstants.RI_WIZARD_ACTION %>.value='<%= AppConstants.WSS_INFO_BAR %>';document.forma.submit()" att-button btn-type="primary" size="small" title='Submit'>Submit</button>
97 <script language="JavaScript">
99 function dataValidate() {
105 <%! private String nvl(String s) { return (s==null)?"":s; }
106 private String nvl(String s, String sDefault) { return nvl(s).equals("")?sDefault:s; } %>