<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="cm" uri="/commons-tags" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加员工扩展信息</title>
<link href="../resources/style/base.css" rel="stylesheet" type="text/css"/>
<s:include value="../common/head.jsp" />
</head>

<body>
<div class="body_form">
<s:include value="../common/body.jsp" />
<s:form action="emplInfoExtconfOperate" namespace="/employe"  onsubmit="return checkForm(this)">

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr class="form_tr">
      <td width="33%" align="right"><span class="required">•</span>字段名称：</td>
      <td width="67%" valign="top"><s:textfield name="extconf.name" title="字段名称为必填项" cssStyle="width:200px;"/>
      </td>
      </tr>
     <tr class="form_tr">
       <td align="right" valign="top"><span class="required">•</span>排序编号：</td>
       <td valign="top"><s:textfield name="extconf.orderBy" title="排序编号为必填项，且必须为数字。" cssStyle="width:200px;"/><div class="info">编号越小，排序越靠前</div></td>
     </tr>
     <tr class="form_tr">
       <td align="right" valign="top"><span class="required">•</span>字段类型：</td>
       <td valign="top">
      	<s:select cssStyle="width:200px;" onchange="typeChange(this.value)" title="字段类型为必填项" name="extconf.fieldType.id"  list='#request.SysCodeFinder.find("EMPL_EXT_FIELD_TYPE")'  headerKey="" headerValue="" listKey="id" listValue="codeName"/>
        <div id="initValuesSelectDiv" style="display:none; margin-bottom:5px;">
            <s:textarea  name="extconf.initValues" cssStyle="width:200px;height:100px;"/>
			<div class="info">请输入选项值，每行一个。</div>
        </div> 
		<script language="javascript">
        function typeChange(){
            gi("initValuesSelectDiv").style.display="none";
            var typeObj=gn("extconf.fieldType.id");
            var val=typeObj.options[typeObj.selectedIndex].value;
            if(val=="<s:property value='@com.hrmex.web.constants.ConstantCode$EmplifoExtconfFieldType@SELECT'/>"){
                gi("initValuesSelectDiv").style.display="";
            }	
        }
		typeChange();
        </script>           
       </td>
     </tr>
     <tr class="form_tr">
       <td width="33%" align="right" valign="top">备　　注：</td>
       <td width="67%" valign="top"><s:textarea  name="extconf.descr" cssStyle="width:200px;height:50px;"/>
        </td>
     </tr>
    <tr class="form_tr">
      <td width="33%" align="right">&nbsp;</td>
      <td width="67%" valign="top">
		 <s:if test="oper=='edit'">
            <input type="submit" name="button" id="button" value="修 改" />
          </s:if>
          <s:if test="oper=='add'">
            <input type="submit" name="button" id="button" value="添 加" />
          </s:if>
          &nbsp; 
        <!-- back begin -->
          <input name="winID" type="hidden" value="${param.winID}" />
          <input type="button" onclick="iframeWindowClose('${param.winID}')" name="button" id="button" value="返 回" />  
        <!-- back end -->
          <s:hidden name="extconf.id" />
          <s:hidden name="oper" />
        </td>
    </tr>
  </table>

</s:form>
</div>
</body>
</html>