<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/enrgise-html.tld" prefix="enrgise" %>

<html:html>
<html:base />
<head>
  <TITLE><bean:message  key="hrm.title" /></TITLE>
  <jsp:include page="GenIncludes.jsp" flush="true" />
</head>
<BODY   scroll=auto>

<html:form  action="HrmQualCriteriaBaseAction" name="HrmPrmQualCriteriaForm" type="wenrgise.hrms.webtier.form.HrmPrmQualCriteriaForm">
<bean:define id="ParentForm" name="HrmPrmQualCriteriaForm" toScope="request" />
<jsp:include page="GenIconMenu.jsp" />
<!--Top Most Blue Bar-->
<TABLE cellSpacing=0 bgColor=#bdd0ef>
    <tr>
        <TD  colSpan=12 class=mainHeader ><bean:message  key="hrm.HrmQualification.heading" /></TD>
    </TR>
</TABLE>
<!--//  Display Errors -->
<enrgise:errors/>
<logic:messagesPresent message="true">
<Table>
    <html:messages id="message" message="true">
    <TR><TD>
      <bean:write name="message"/>
    </TD></TR>
    </html:messages>      
</Table>
</logic:messagesPresent>
<!--//  Display Errors --> 
<TABLE cellSpacing=0 cellPadding=0 border=0 >
    <TR>
        <TD>
        
        <TABLE cellSpacing=0 cellPadding=0 >
        <!--KPA Header Starts -->
            <TR>
                  <TD class=subHeader colspan=6><bean:message  key="hrm.HrmQualification.header" /></TD>
            </TR>
            <TR>
                  <TD colspan=6 bgColor=#4682b4><IMG height=1 src="../includes/images/pixel.gif" width=1 border=0></TD>
            </TR>
            
            
            <TR> 
                  <td class=labelText><bean:message key="hrm.HrmPrmKPARating.gradeCode" /></td>
                  <td colspan=2 ><html:text  property="gradeCode"  maxlength="15" size="23" styleClass="required" onchange="doChangeHeader();" readonly="true" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butGrade" name="HrmPrmQualCriteriaForm" onclick="ShowGrade();" /><html:text  property="gradeDesc" altKey="hrm.HrmPrmKPARating.gradeDesc" maxlength="255" size="40" styleClass="locked" onchange="doChangeHeader();" readonly="true" /></td> 
            </TR>
            <TR> 
                  <td class=labelText><bean:message key="hrm.HrmPrmKPARating.desigCode" /></td>
                  <td  ><html:text  property="desigCode"  maxlength="15" size="23" styleClass="required" onchange="doChangeHeader();" readonly="true" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butDesig" name="HrmPrmQualCriteriaForm" onclick="ShowDesignation();" /><html:text  property="desigDesc" altKey="hrm.HrmPrmKPARating.desigDesc" maxlength="255" size="40" styleClass="locked" onchange="doChangeHeader();" readonly="true" /></td> 
            </TR>
            
            
            <tr height=10>
                 <td colspan=6></td>
            </tr>
         </table>
        
                      
         <table cellspacing=0 cellpadding=0 border=0>
          <!-- Detail Information Row starts -->
          <TR>
            <TD colspan=6>
            <!-- Tab Table Starts -->
            <TABLE cellSpacing=0 cellPadding=0 >
            <tr>                                             
                          <td bgcolor="#4682B4" width="10"><img src="../includes/images/pixel.gif" width="10" height="1" border="0"></td>
                          <td bgcolor="#4682B4" nowrap class=actTabText><bean:message key="hrm.HrmQualification.detail" /><img src="../includes/images/pixel.gif" width="10" height="1" border="0"></td>
                          <TD><IMG height=19  src="../includes/images/formtab_r.gif" width=10  border=0></TD>                              
                          <TD width="100%" background="../includes/images/line_t.gif">&nbsp;</TD>
                          <TD background="../includes/images/line_t.gif"><IMG height=1 src="../includes/images/pixel.gif" width=10 border=0></TD>
            </tr>
              <TR >
              
            <!-- Detail table Container starts -->
              <TD colSpan=6>
              <TABLE cellSpacing=0 cellPadding=0 border=0>
                <TBODY>
                 <TR>
                  <TD >
                  <DIV id=divDtlTable style="height:200px">
                    <TABLE  border="0" cellSpacing=0 cellPadding=0 id="QualCriteria">
                     <TBODY>
                          <tr>
                              <TD class=tableHeader width="1%"><html:checkbox property="selectAll" onclick="toggleCheckBox('checked')"  /></td>
                              <TD class=tableHeader width="35%"><bean:message key="hrm.HrmQualification.txtQualificationCode" /></td>  
                              <TD class=tableHeader width="40%"><bean:message key="hrm.HrmQualification.txtQualificationDesc" /></td>  
                              <TD class=tableHeader width="24%"><bean:message key="hrm.HrmQualification.txtMinPercentage" /></td>                                
                          </tr>  
                          
                      <logic:iterate id="QualCriteria" name="HrmPrmQualCriteriaForm" property="arylstHrmPrmQualCriteriaDtl" type="wenrgise.hrms.bean.HrmPrmQualCriteriaDtlBean" indexId="idx" >
                      <logic:notEqual name="QualCriteria" property="status" value="D" >           
                       <tr>
                           <td ><html:checkbox property="checked" alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);" /><html:hidden property="detailId" name="QualCriteria" /><html:hidden property="itemChecked" name="QualCriteria" /><html:hidden property="status"  name="QualCriteria" /><html:hidden property="hdnQualificationId"  name="QualCriteria" /><html:hidden property="hdnPrevDtlId"  name="QualCriteria" /></td>
                          <td ><html:text  property="txtQualCode" readonly="true"  name="QualCriteria" titleKey="hrm.HrmQualification.txtQualificationCode" size="15" styleClass="required"  style="width:95%" alt="P"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /><img src="../includes/images/lov.jpg" height="15" class="icon" align="center" name="butAdvAttrQuaReqCode"  alt="<%=idx.toString()%>"  onclick=" return ShowQuaReqCode(this.alt);" /></td>
                           <td ><html:text  property="txtQualDesc"  readonly="true" name="QualCriteria" titleKey="hrm.HrmQualification.txtQualificationDesc" size="15" styleClass="required"  style="width:100%" alt="P"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                          <td ><html:text  property="txtMinPercentage" name="QualCriteria" titleKey="hrm.HrmQualification.txtMinPercentage" maxlength="5" onkeydown="isFloat(event)" size="15" styleClass="required"  style="width:100%" alt="P"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                        </tr>
                  </logic:notEqual>
                  <logic:equal name="QualCriteria" property="status" value="D"  >
                        <tr>
                            <td ><html:checkbox  disabled="true" property="checked" alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);" /><html:hidden property="detailId" name="QualCriteria" /><html:hidden property="itemChecked" name="QualCriteria" /><html:hidden property="status"  name="QualCriteria" /><html:hidden property="hdnQualificationId"  name="QualCriteria" /><html:hidden property="hdnPrevDtlId"  name="QualCriteria" /></td>
                             <td ><html:text  property="txtQualCode" readonly="true"  name="QualCriteria" titleKey="hrm.HrmQualification.txtQualificationCode" size="15" styleClass="deletedRow"  style="width:95%" alt="P"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /><img src="../includes/images/lov_dis.jpg" height="15" class="icon" align="center" name="butAdvAttrQuaReqCode"  alt="<%=idx.toString()%>"   /></td>
                           <td ><html:text  property="txtQualDesc"  readonly="true" name="QualCriteria" titleKey="hrm.HrmQualification.txtQualificationDesc" size="15" styleClass="deletedRow"  style="width:100%" alt="P"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                          <td ><html:text  property="txtMinPercentage" readonly="true" name="QualCriteria" titleKey="hrm.HrmQualification.txtMinPercentage" size="15" styleClass="deletedRow"  style="width:100%" alt="P"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                         </tr>
                  </logic:equal>
                  </logic:iterate>
                          
                          
                      </TBODY>
                      </TABLE>
                      </DIV>
                      </TD>
                    </TR>
               <tr>
                <td>	
                <jsp:include page="GenDetailMenu.jsp" flush="true" />
		            </TD>
		            <td> </td>
               </tr>
        </TABLE>
      </td>
     </tr>
      <TR>
        <TD background="../includes/images/line_r.gif"><IMG src="../includes/images/pixel.gif" border=0></TD>
      </TR>
      
  </TABLE>
</td>
</tr>
              <!-- Tab Table Ends -->

      <!-- Bottom Blue Bar -->
       <TR>
            <td>
              <TABLE  cellspacing="0" cellpadding="0" border=0>
                    <tr>
                        <td width=40% align=center bgColor=#4682b4></td>
                        <td  bgColor=#4682b4></td>
                        <td  bgColor=#4682b4></td>                
                        <td bgColor=#4682b4></td>
                        <td align=right bgColor=#4682b4><img src="../includes/images/man.jpg"></td>
                   </TR>
                </table>
            </td>
          </tr>
	
<!-- Container Table Ending Columns Starts-->
    
</TBODY>
</TABLE>

<!-- Container Table Ends -->
<html:hidden property="screenName" name="HrmPrmQualCriteriaForm" value="HrmPrmQualCriteria" />
<html:hidden name="HrmPrmQualCriteriaForm"  property="forwardedPage" />
<html:hidden property="positionRequested" name="HrmPrmQualCriteriaForm" />
<html:hidden property="screenMode" name="HrmPrmQualCriteriaForm" />
<html:hidden property="detailDataChanged" name="HrmPrmQualCriteriaForm" />
<html:hidden property="headerDataChanged" name="HrmPrmQualCriteriaForm" />
<html:hidden property="headerPrimaryKey" name="HrmPrmQualCriteriaForm"  />
<html:hidden property="userPageRequested" name="HrmPrmQualCriteriaForm" />
<html:hidden property="userPositionRequested" name="HrmPrmQualCriteriaForm" />
<html:hidden property="pageRequested" name="HrmPrmQualCriteriaForm" />
<!------ addded for LOV ----->

<html:hidden property="lovKey" name="HrmPrmQualCriteriaForm"  />
<html:hidden property="txtSearchFields" name="HrmPrmQualCriteriaForm"  />
<html:hidden property="txtDisplayFields" name="HrmPrmQualCriteriaForm"  />
<html:hidden property="firstLoad" name="HrmPrmQualCriteriaForm"  />
<html:hidden property="txtIndex" name="HrmPrmQualCriteriaForm"  />

<html:hidden property="designationId" name="HrmPrmQualCriteriaForm"  />

<input type="hidden" name="multipleFlag" >
<input type="hidden" name="queryParam" >

</html:form>
</body>
</html:html>
<script language="javascript">

function doOnLoad()
{  
  if(document.forms[0].firstLoad.value!="false")
  {
    return  "HrmQualCriteriaOnLoadAction.do"; 
  }
}
function doExit()
{  
  
    return  "HrmQualCriteriaExitAction.do"; 
 
}
function boxClicked(val)
{    
    if(document.getElementsByName("checked")[val].checked)
    {      
      document.getElementsByName("itemChecked")[val].value = "Y";      
    }
    else
    {     
      document.getElementsByName("itemChecked")[val].value = "N";     
    }      
}

function doSave()
{
  return "HrmQualCriteriaSaveAction.do";
  
}
function doQueryMode()
{
  return "HrmQualCriteriaQueryModeAction.do";
}

function doRefresh()
{
  return "HrmQualCriteriaRefreshAction.do";  
}

function doGetDetail()
{
  return "HrmQualCriteriaGetDetailAction.do";
}

function doAddRow()
{ 
  return "HrmQualCriteriaAddRowAction.do"; 
}

function doDelRow()
{
 return "HrmQualCriteriaDeleteRowAction.do";  
}

function doGetDetailTableName()
{
  return "QualCriteria";
}

function doPrevDetail()
{
  return "HrmQualCriteriaGetDetailPageAction.do";  
}

function doNextDetail()
{
  return "HrmQualCriteriaGetDetailPageAction.do";
}

function doJumpDetail()
{
  return  "HrmQualCriteriaGetDetailPageAction.do"; 
}


function ShowQuaReqCode(i)
{        
        document.forms[0].lovKey.value = "PrmQualification" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmQualification.txtQualificationCode,hrm.HrmQualification.txtQualificationDesc";
        document.forms[0].txtIndex.value = i;
        document.forms[0].txtDisplayFields.value = "hdnQualificationId,txtQualCode,txtQualDesc";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmPrmQualCriteriaForm');
}
function ShowGrade()
{
        document.forms[0].lovKey.value = "PrmQualGrade" + "HrmPrmQualCriteriaForm" + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmPrmKPARating.gradeCode,hrm.HrmPrmKPARating.gradeDesc";
        document.forms[0].txtDisplayFields.value = "headerPrimaryKey,gradeCode,gradeDesc";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmPrmQualCriteriaForm');
        return true;
}

function ShowDesignation()
{
        document.forms[0].lovKey.value = "PrmQualDesig" + "HrmPrmQualCriteriaForm" + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmPrmKPARating.desigCode,hrm.HrmPrmKPARating.desigDesc";
        document.forms[0].txtDisplayFields.value = "designationId,desigCode,desigDesc";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmPrmQualCriteriaForm');
        return true;
}


function doOnChangeLov(lovName)
{
   if((lovName=="PrmQualGradeHrmPrmQualCriteriaFormQ") )
    {
    doBaseValidate();
    }
}

function doValidate()
{
  return "HrmQualCriteriaValidateAction.do"; 
}

</script>