<%@ 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>
  <meta http-equiv="pragma" content="no-cache" >
  <TITLE><bean:message  key="hrm.title" /></TITLE>
  <jsp:include page="GenIncludes.jsp" flush="true" />
</head>


<BODY scroll="auto">

<html:form name="HrmTrngEmpAttForm" action="HrmTrngEmpAttBaseAction" type="wenrgise.hrms.webtier.form.HrmTrngEmpAttForm">
<bean:define id="ParentForm" name="HrmTrngEmpAttForm" toScope="request" />
<!-- Icon Menu -->
<jsp:include page="GenMenu.jsp" flush="true" />
<bean:define id="left" name="ParentForm" property="positionRequested"/>
<bean:define id="right" name="ParentForm" property="totalCount"/>
<table cellSpacing=0 bgColor=#bdd0ef>
<tr height=27>
  <td colSpan=11></td>
</tr>
  <TR > 
    <TD ><enrgise:img name="ParentForm" property="butQuery" onmouseover='this.src="../includes/images/query_act.jpg"' onmouseout='this.src="../includes/images/query.jpg"' alt="Query (Ctrl+Q)" src="../includes/images/query.jpg" onclick="doBaseQueryMode()" /><enrgise:img name="ParentForm" property="butInsert" onmouseover='this.src="../includes/images/insert_act.jpg"' onmouseout='this.src="../includes/images/insert.jpg"' alt="Insert (Alt+N)" src="../includes/images/insert.jpg"  onclick="doBaseInsertMode()"/></TD>
    <TD width="2%"></TD>
    <TD ><enrgise:img name="ParentForm" property="butExecute" onmouseover='this.src="../includes/images/execute_act.jpg"' onmouseout='this.src="../includes/images/execute.jpg"' alt="Execute (Ctrl+U)" src="../includes/images/execute.jpg" onclick="doBaseExecute()" /><enrgise:img name="ParentForm" property="butSave" onmouseover='this.src="../includes/images/save_act.jpg"' onmouseout='this.src="../includes/images/save.jpg"' alt="Save (Ctrl+S)" src="../includes/images/save.jpg" onclick="doBaseSave()" />
    <enrgise:img name="ParentForm" property="butDelete" onmouseover='this.src="../includes/images/delete_act.jpg"' onmouseout='this.src="../includes/images/delete.jpg"' alt="Delete (Ctrl+D)" src="../includes/images/delete.jpg" onclick="doBaseDelete()" /><enrgise:img name="ParentForm" property="butRefresh" onmouseover='this.src="../includes/images/refresh_act.jpg"' onmouseout='this.src="../includes/images/refresh.jpg"' alt="Refresh (Ctrl+R)"  src="../includes/images/refresh.jpg" onclick="doBaseRefresh()" />
    <enrgise:img name="ParentForm" property="butPrint" onmouseover='this.src="../includes/images/print_act.jpg"' onmouseout='this.src="../includes/images/print.jpg"' alt="Print (Ctrl+P)"  src="../includes/images/print.jpg" /></TD>
    <TD width="2%" bgColor=#bdd0ef></TD>
    <TD><enrgise:img name="ParentForm" property="butExit" onmouseover='this.src="../includes/images/exit_act.jpg"' onmouseout='this.src="../includes/images/exit.jpg"' alt="Exit (Alt+X)"  src="../includes/images/exit.jpg"   onclick="doBaseExit()" />
    <enrgise:img name="ParentForm" property="butHelp" onmouseover='this.src="../includes/images/help_act.jpg"' onmouseout='this.src="../includes/images/help.jpg"' alt="Help (Ctrl+?)" src="../includes/images/help.jpg" onclick="doBaseHelp()" /></TD>
    <TD width="50%"></TD>
    <TD ><enrgise:img name="ParentForm" property="butPrevHeader" src='../includes/images/butn_prev.jpg' onmouseover='this.src="../includes/images/butn_prev_act.jpg"' onmouseout='this.src="../includes/images/butn_prev.jpg"' alt="Butn_prev (Ctrl+<)" onclick="doBasePrevHeader()" /></td>
    <td class=dtlNavText><bean:write  name="left" /> of 
    <bean:write name="right" /></td>
    <td align=right><enrgise:img name="ParentForm" property="butNextHeader" src="../includes/images/butn_next.jpg" onmouseover='this.src="../includes/images/butn_next_act.jpg"' onmouseout='this.src="../includes/images/butn_next.jpg"' alt="Butn_next (Ctrl+>)" onclick="doBaseNextHeader()" /></td>
    <td align=right><enrgise:text property="newPositionRequested" size="1"  maxlength="3" onkeydown="isInteger(event)" title="wenrgise.common.jumpDetail" alt="N" disabledClass="locked" styleClass="optional" /></td>
    <td ><enrgise:img name="ParentForm" property="butJumpHeader" alt="Go (Ctrl+G)" src="../includes/images/go.jpg" onmouseover='this.src="../includes/images/go_act.jpg"' onmouseout='this.src="../includes/images/go.jpg"' onclick="doBaseJumpHeader()" /></td>
    <td > </td>
    
</TR>
</table>
<table>
<tr>
  <td colspan="11" class="userText"></td>
</tr>
<enrgise:checkSession/>
</TABLE>

<!-- Icon Menu -->
<!--Top Most Blue Bar-->
<TABLE cellSpacing=0 bgColor=#bdd0ef>
    <tr>
        <TD  colSpan=12 class=mainHeader height=10><bean:message key="hrm.HrmTrngEmpAtt.mainHeader" /></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 >
        <!--Inspection Header Starts -->
            <TR>
                  <TD class=subHeader colspan=6><bean:message  key="hrm.HrmTrngEmpAtt.subHeader" /></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.HrmTrngEmpAtt.courseName" /></td>
                  <td><html:text  property="courseName" altKey="hrm.HrmTrngEmpAtt.courseName" size="23" styleClass="locked" readonly="true" /><enrgise:img height="16" align="center" src="../includes/images/lov.jpg" name="HrmTrngEmpAttForm" property="butCourseName" onclick="showCourse()" /></td>
                  <td class=labelText><bean:message key="hrm.HrmTrngEmpAtt.institutionName" /></td>
                  <td><html:text  property="institutionName" altKey="hrm.HrmTrngEmpAtt.institutionName" size="26" styleClass="locked" readonly="true" /></td>
                  <td colspan="2"></td>                 
            </TR>
            
            <tr>
                 <td class=labelText><bean:message key="hrm.HrmTrngEmpAtt.startDate" /></td>
                 <td><html:text  property="startDate" altKey="hrm.HrmTrngEmpAtt.startDate" maxlength="15" size="26" styleClass="locked" readonly="true" /></td>
                 <td class=labelText><bean:message key="hrm.HrmTrngEmpAtt.endDate" /></td>
                 <td><html:text  property="endDate" altKey="hrm.HrmTrngEmpAtt.endDate" maxlength="15" size="26" styleClass="locked" readonly="true" /></td>
                 <td colspan="2"></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"><img src="../includes/images/pixel.gif" width="10" height="1" border="0"></td>
                          <td bgcolor="#4682B4" nowrap class=actTabText ><bean:message  key="hrm.HrmTrngEmpAtt.tableHeader" /><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 height=10>
              
            <!-- Detail table Container starts -->
              <TD colSpan=5>
              <TABLE cellSpacing=0 cellPadding=0 border=0>
                <TBODY>
                 <TR>
                  <TD >
                  <DIV id=divDtlTable style="height:250px">
                    <TABLE  border="0" cellSpacing=0 cellPadding=0>
                     <TBODY>
                          <tr>
                            
                            <TD class=tableHeader width="1%"><input type=checkbox disabled></TD>
                            <TD class=tableHeader width="4%"><bean:message  key="hrm.HrmTrngEmpAtt.employeeNo" /></td>
                            <TD class=tableHeader width="9%"><bean:message key="hrm.HrmTrngEmpAtt.employeeName" /></td>
                            <TD class=tableHeader width="7%"><bean:message  key="hrm.HrmTrngEmpAtt.trainingDate" /></td>
                            <TD class=tableHeader width="4%"><bean:message key="hrm.HrmTrngEmpAtt.attendance" /></td>
                            <TD class=tableHeader width="12%"><bean:message key="hrm.HrmTrngEmpAtt.reasonForAbsence" /></td>
                         </tr>   
                        <logic:iterate id="HrmTrngEmpAtt" name="HrmTrngEmpAttForm" property="arrTrngEmpAtt" type="wenrgise.hrms.bean.HrmTrngEmpAttDtlBean" indexId="idx" >
                            <logic:notEqual name="HrmTrngEmpAtt" property="status" value="D" >
                            <tr>
                              <TD class=tableText width="1%">
                                <html:hidden property="status"  name="HrmTrngEmpAtt" />
                                <html:hidden property="detailId"  name="HrmTrngEmpAtt"  />
                                <input type="checkbox" name="checked" disabled />
                                <html:hidden property="itemChecked" name="HrmTrngEmpAtt" />
                              </TD>
                              <TD class=tableText ><enrgise:text property="txtEmployeeNo" name="HrmTrngEmpAtt" style="width:100%"  styleClass="optional" disabledClass="locked" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                              <TD class=tableText ><enrgise:text property="txtEmployeeName" name="HrmTrngEmpAtt" style="width:100%" styleClass="optional" disabledClass="locked" onchange='<%="doChangeDetail("+idx.toString()+")"%>'  /></td>
                              <TD class=tableText><enrgise:text property="txtTrainingDate" name="HrmTrngEmpAtt" style="width:100%" styleClass="optional" disabledClass="locked" onchange='<%="doChangeDetail("+idx.toString()+")"%>'  /></td>
                              <TD class=tableText ><enrgise:select property="txtAttendance" name="HrmTrngEmpAtt" style="width:100%" styleClass="optional" disabledClass="locked" onchange="doBaseValidate()">
                                                   <enrgise:option value="Y" ><bean:message key="hrm.yes" /></enrgise:option>
                                                   <enrgise:option value="N" ><bean:message key="hrm.no" /></enrgise:option>
                                                   </enrgise:select></td>
                              <TD class=tableText ><enrgise:text property="txtReasonForAbsence" maxlength="60" name="HrmTrngEmpAtt" style="width:100%" styleClass="optional" disabledClass="locked" onchange='<%="doChangeDetail("+idx.toString()+")"%>'  /></td>
                            </tr>
                            </logic:notEqual>
                            <logic:equal name="HrmTrngEmpAtt" property="status" value="D" >
                            <tr>
                              <TD class=tableText width="1%">
                                <html:hidden property="status"  name="HrmTrngEmpAtt" />
                                <html:hidden property="detailId"  name="HrmTrngEmpAtt"  />
                                <input type="checkbox" name="checked" onclick='<%="setCheckedValues("+idx.toString()+")"%>' />
                                <html:hidden property="itemChecked" name="HrmTrngEmpAtt" />
                              </TD>
                              <TD class="tableText" ><enrgise:text property="txtEmployeeNo" name="HrmTrngEmpAtt" style="width:100%"  styleClass="deletedRow" disabledClass="locked" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                              <TD class="tableText" ><enrgise:text property="txtEmployeeName" name="HrmTrngEmpAtt" style="width:100%" styleClass="deletedRow" disabledClass="locked" onchange='<%="doChangeDetail("+idx.toString()+")"%>'  /></td>
                              <TD class="tableText"><enrgise:text property="txtTrainingDate" name="HrmTrngEmpAtt" style="width:100%" styleClass="deletedRow" disabledClass="locked" onchange='<%="doChangeDetail("+idx.toString()+")"%>'  /></td>
                              <TD class="tableText" ><html:select property="txtAttendance" name="HrmTrngEmpAtt" style="width:100%" styleClass="deletedRow"  onchange='doBaseValidate()'>
                                                   <html:option value="Y" ><bean:message key="hrm.yes" /></html:option>
                                                   <html:option value="N" ><bean:message key="hrm.no" /></html:option>
                                                   </html:select></td>  <TD class=tableText ><enrgise:text property="txtReasonForAbsence" name="HrmTrngEmpAtt" style="width:100%" styleClass="deletedRow" disabledClass="locked" onchange='<%="doChangeDetail("+idx.toString()+")"%>'  /></td>
                            </tr>
                            </logic:equal>
                         </logic:iterate>

                      </TBODY>
                      </TABLE>
                      </DIV>
                      </TD>
                    </TR>
               <tr>
                    <td colspan="11" >	
                    <!--Buttons for Add Row and Save row-->
                        <bean:define id="pageNo" name="ParentForm" property="pageRequested" toScope="request" />
                        <bean:define id="maxPage" name="ParentForm" property="totalPageCount" toScope="request" />
                        <TABLE border=0>
                          <tbody>
                          <TR>
                            <TD ><enrgise:button altKey="wenrgise.common.getDetail"  onclick="doBaseGetDetail()" property="butGetDetail" name="ParentForm" styleClass="bottomBarText">&nbsp;Get&nbsp;De<u>t</u>ail&nbsp;</enrgise:button> <enrgise:button altKey="wenrgise.common.addRow" name="ParentForm"  onclick="doBaseAddRow()" property="butAddRow"  styleClass="bottomBarText">&nbsp;&nbsp;Add&nbsp;<u>R</u>ow&nbsp;&nbsp;</enrgise:button><button altKey="wenrgise.common.delRow" name="ParentForm"
                            property="butDelRow" styleClass="bottomBarText" disabled="true" ><u>D</u>elete&nbsp;Row</button></TD>
                            <td width=50%></td>	
                            <TD ><enrgise:img name="ParentForm" property="butPrevDetail" src="../includes/images/butn_dtl_prev.jpg" onmouseover='this.src="../includes/images/butn_dtl_prev_act.jpg"' onmouseout='this.src="../includes/images/butn_dtl_prev.jpg"' alt="Butn_prev (Alt+<)"  onclick="doBasePrevDetail()"/></td>
                            <td class=dtlNavText><bean:write  name="pageNo" /> of <bean:write name="maxPage" /></td>
                            <td  align=right><enrgise:img name="ParentForm" property="butNextDetail" src="../includes/images/butn_dtl_next.jpg" onmouseover='this.src="../includes/images/butn_dtl_next_act.jpg"' onmouseout='this.src="../includes/images/butn_dtl_next.jpg"' alt="Butn_next (Alt+>)" onclick="doBaseNextDetail()"/></td>
                            <td  align=right><enrgise:text property="newPageRequested" size="1" onkeydown="isInteger(event)" styleClass="optional" disabledClass="locked" alt="N" titleKey="wenrgise.common.jumpDetail" /></td>
                            <td ><enrgise:img name="ParentForm" property="butJumpDetail" altKey="wenrgise.common.go" src="../includes/images/go_dtl.jpg" onmouseover='this.src="../includes/images/go_act.jpg"' onmouseout='this.src="../includes/images/go.jpg"' onclick="doBaseJumpDetail()" /></td>		     
                          </TR>
                        
                          </tbody>
                        </TABLE>
                     <!-- Detail Menu -->
                    </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>
</div>
<!-- Common Hidden Starts -->
<html:hidden name="HrmTrngEmpAttForm" property="screenName" value="HrmTrngEmpAtt" />
<html:hidden name="HrmTrngEmpAttForm" property="forwardedPage" />
<html:hidden name="HrmTrngEmpAttForm" property="positionRequested"  />
<html:hidden name="HrmTrngEmpAttForm" property="screenMode" />
<html:hidden name="HrmTrngEmpAttForm" property="detailDataChanged" />

<html:hidden name="HrmTrngEmpAttForm" property="lovKey"  />
<html:hidden name="HrmTrngEmpAttForm" property="txtSearchFields"  />
<html:hidden name="HrmTrngEmpAttForm" property="txtDisplayFields"  />
<input type="hidden" name="multipleFlag" >
<input type="hidden" name="queryParam" >

<html:hidden name="HrmTrngEmpAttForm" property="headerPrimaryKey"  />
<html:hidden name="HrmTrngEmpAttForm" property="headerDataChanged"  />
<html:hidden name="HrmTrngEmpAttForm" property="txtIndex"  />
<html:hidden name="HrmTrngEmpAttForm" property="userPageRequested" />
<html:hidden name="HrmTrngEmpAttForm" property="userPositionRequested"  />
<html:hidden name="HrmTrngEmpAttForm" property="pageRequested" />

<!--Screen Specific hidden -->
<html:hidden name="HrmTrngEmpAttForm" property="courseNameId" />

<!-- Hidden fields end -->
</html:form>
</body>
</html:html>

<script language="javascript">


function doQueryMode()
{
 
  return "HrmTrngEmpAttQueryModeAction.do";
}


function doInsertMode()
{

  return "HrmTrngEmpAttNewModeAction.do";
}


function doExecute()
{

  return "HrmTrngEmpAttGetHeaderAction.do";
}

function doSave()
{

  return "HrmTrngEmpAttSaveAction.do";
  
}

function doDelete()
{

  return "HrmTrngEmpAttDeleteAction.do";
  
}

function doRefresh()
{

  return "HrmTrngEmpAttRefreshAction.do";
  
}

function doPrevHeader()
{
  return "HrmTrngEmpAttGetNextHeaderAction.do"; 
}

function doNextHeader()
{
  return "HrmTrngEmpAttGetNextHeaderAction.do"; 
}

function doJumpHeader()
{
  return "HrmTrngEmpAttGetNextHeaderAction.do"; 
}

function doGetDetail()
{

  return "HrmTrngEmpAttGetDetailAction.do";
}

function doAddRow()
{

  return "HrmTrngEmpAttAddRowAction.do"; 
}

function doExit()
{

  return "HrmTrngEmpAttExitAction.do"; 
}

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

function doGetDetailTableName()
{
  return "HrmTrngEmpAtt";
}

function doPrevDetail()
{

  return "HrmTrngEmpAttGetDetailPageAction.do";  
}

function doNextDetail()
{

  return "HrmTrngEmpAttGetDetailPageAction.do";
}

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


function doGetInsertData()
{}

function doValidate()
{
  return "HrmTrngEmpAttValidateAction.do"
}

function showCourse()
{
        document.forms[0].lovKey.value = "HrmTrngEmpAttCrs" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmTrngEmpAtt.courseCode";
        document.forms[0].txtIndex.value = "";
        document.forms[0].txtDisplayFields.value = "courseNameId,courseName";
        document.forms[0].multipleFlag.value = "false";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmTrngEmpAttForm');
        return true;
}
</script>    
