{#include file="sys/admin_header.htm"#}
<script type="text/javascript">
$(document).ready(function()
{
$("#FormData").validate({
 //debug: true,
// onsubmit:false,
//onfocusout :true,
   rules:{
   jobname:{
    required: true,
	minlength:2,
    maxlength:30
   },
   amount: {
	range:[0,999]
   },
   comname: "required",
   contact: "required",
   tel:{
   required: true,
   digits:true, 
	minlength:7
   },
   email: {
	   email:true
	   },
   address:{
   required: true
   },
   pwd:{
   required: true,
   minlength:6
   }
   ,
   detailed:{
   required: true,
   ISdetailed:true,
   maxlength:300
   }
	},
    messages: {
    jobname: {
    required: "请输入职位名称",
    minlength: jQuery.format("职位名称不能小于{0}个字符"),
	maxlength: jQuery.format("职位名称不能大于{0}个字符")
   },
   amount: {
    range: jQuery.format("请输入一个介于 {0} 和 {1} 之间的值")
   },
   comname: {
    required: "请输入公司名称"
   },
   contact: {
    required: "请输入联系人"
   },
   tel: {
    required: "请输入联系电话",
	digits: "联系电话必须是数字",
    minlength: jQuery.format("电话不能<{0}位数")
   },
   email: {
	email: jQuery.format("请正确填写电子邮箱")
   },
    address: {
    required: jQuery.format("请填写联系地址")
   },
    pwd: {
    required: jQuery.format("请输入管理密码"),
	minlength: jQuery.format("密码不能小于{0}个字符")
   }
   ,
    detailed: {
    required: jQuery.format("请输入具体要求"),
	maxlength: jQuery.format("具体要求不能大于{0}个字符")
 
   }
  },
  errorPlacement: function(error, element) {
    if ( element.is(":radio") )
        error.appendTo( element.parent().next().next() );
    else if ( element.is(":checkbox") )
        error.appendTo ( element.next());
	else if ( element.is("textarea") )
        error.appendTo ( $("#textareaerr"));
    else
        error.appendTo(element.parent());
	}
    });
	 //具体要求
	jQuery.validator.addMethod("ISdetailed", function(value, element) {
	var str="请填写招聘的具体要求，如：性别，学历，年龄，工作经验，工资待遇等相关信息";
	var flag=true;
	if (str==value)
	{
	flag=false;
	}
	return  flag || this.optional(element) ;
	}, "请填写具体要求");
	/////验证码部分
});
</script>
<div class="admin_main_nr_dbox">
<div class="pagetit">
	<div class="ptit"> {#$pageheader#}</div>
  {#include file="simple/admin_simple_nav.htm"#}
  <div class="clear"></div>
</div>
<form action="?act=simple_add_save" method="post"   name="FormData" id="FormData" >
<div class="toptit">新增微招聘</div>

  {#$inputtoken#}
<table width="100%" border="0" cellspacing="8" cellpadding="0">
  <tr>
    <td width="100" align="right">招聘职位：</td>
    <td><input name="jobname" type="text" class="input_text_200" id="jobname" maxlength="20"></td>
  </tr>
  <tr>
    <td align="right">招聘人数：</td>
    <td><input name="amount" type="text" id="amount" class="input_text_200" style="width:60px;" value="0" maxlength="3">
	<span class="admin_note">填写数字，"0"为若干</span>	</td>
  </tr>
  <tr>
    <td align="right">招聘单位：</td>
    <td><input name="comname" type="text" class="input_text_200" id="comname" maxlength="20"></td>
  </tr>
  <tr>
    <td align="right">联系人：</td>
    <td><input name="contact" type="text" class="input_text_200" id="contact" maxlength="15"></td>
  </tr>
  <tr>
    <td align="right">联系电话：</td>
    <td><input name="tel" type="text" class="input_text_200" id="tel" maxlength="25"></td>
  </tr>
  <tr>
    <td align="right">联系邮箱：</td>
    <td><input name="email" type="text" class="input_text_200" id="email" maxlength="30"></td>
  </tr>
  <tr>
    <td align="right">联系QQ：</td>
    <td><input type="text" name="qq"  id="qq" class="input_text_200"></td>
  </tr>
  <tr>
    <td align="right">联系地址：</td>
    <td><input name="address" type="text" class="input_text_400" id="address"   maxlength="50"></td>
  </tr>
  <tr>
    <td align="right">具体要求：</td>
    <td><textarea name="detailed" id="detailed" class="input_text_400" style="height:60px;" onblur="if(this.value==''){this.value='请填写招聘的具体要求，如：性别，学历，年龄，工作经验，工资待遇等相关信息'}" onfocus="if(this.value=='请填写招聘的具体要求，如：性别，学历，年龄，工作经验，工资待遇等相关信息'){this.value=''}">请填写招聘的具体要求，如：性别，学历，年龄，工作经验，工资待遇等相关信息</textarea></td>
  </tr>
    <tr>
    <td align="right"> </td>
    <td>不能大于300字符
	<span id="textareaerr"></span>
	</td>
  </tr>
  <tr>
    <td align="right">有效期：</td>
    <td>	
	<label><input type="radio" name="validity" value="7">7天</label>&nbsp;&nbsp;
	<label><input type="radio" name="validity" value="15">15天</label>&nbsp;&nbsp;
	<label><input name="validity" type="radio" value="30" checked>
	30天</label>&nbsp;&nbsp;
	<label><input type="radio" name="validity" value="60">60天</label>&nbsp;&nbsp;
	<label><input type="radio" name="validity" value="0">长期</label>
	<span class="simple_note">到期后系统将自动删除</span>	</td>
  </tr>
  <tr>
    <td align="right">管理密码：</td>
    <td><input name="pwd" type="text" class="input_text_200" id="pwd" style="width:100px;" maxlength="25">
	<span class="admin_note">管理密码可用于前台修改和删除信息</span>	</td>
  </tr>
  <tr>
    <td align="right">&nbsp;</td>
    <td height="60"  >
	
	 <input type="submit" name="Submit3" value="提交" class="admin_submit"   />
 
	</td>
  </tr>
</table>
</form>

</div>
{#include file="sys/admin_footer.htm"#}
</body>
</html>