<%@ Page Language="C#" MasterPageFile="Frame.master" AutoEventWireup="true" CodeBehind="JobEdit.aspx.cs"
    Inherits="ynhtm.Admin.JobEdit" %>

<asp:Content ID="contentTitle" ContentPlaceHolderID="contentTitlePlaceHolder" runat="server">
    <h1>
        <asp:Label ID="lblTitle" runat="server"></asp:Label></h1>
</asp:Content>
<asp:Content ID="contentRight" ContentPlaceHolderID="contentRightPlaceHolder" runat="server">
    <h2>
        选项</h2>
    <div class="form">
        <table cellpadding="0" cellspacing="10">
            <tr>
                <td>
                    <asp:CheckBox ID="chkEnabled" runat="server" Text="发布的" Checked="True" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label runat="server" AssociatedControlID="txtRewrite">重写地址:</asp:Label><br />
                    <asp:TextBox ID="txtRewrite" runat="server" Width="243px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label runat="server" AssociatedControlID="dropTheme">模板文件:</asp:Label><br />
                    <asp:DropDownList ID="dropTheme" runat="server" Width="250px">
                        <asp:ListItem Value="">(默认)</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Button ID="btnEdit" runat="server" OnClick="btnEdit_Click" Font-Bold="true" />
                </td>
            </tr>
        </table>
    </div>
    <h2>
        其他</h2>
    <div class="form">
        <table cellpadding="0" cellspacing="10">
            <tr>
                <td>
                    <asp:Label runat="server" AssociatedControlID="txtCount">招聘人数:</asp:Label><br />
                    <asp:TextBox ID="txtCount" runat="server" Width="50px"></asp:TextBox>
                    人
                </td>
                <td>
                    <asp:Label runat="server" AssociatedControlID="txtSalary">薪资:</asp:Label><br />
                    <asp:TextBox ID="txtSalary" runat="server" Width="50px"></asp:TextBox>
                    元
                </td>
                <td>
                    <asp:Label runat="server" AssociatedControlID="txtAge">年龄:</asp:Label><br />
                    <asp:TextBox ID="txtAge" runat="server" Width="50px"></asp:TextBox>
                </td>
            </tr>
        </table>
        <table cellpadding="0" cellspacing="10" style="margin-top: -10px;">
            <tr>
                <td>
                    <asp:Label runat="server" AssociatedControlID="dropType">类型:</asp:Label><br />
                    <asp:DropDownList ID="dropType" runat="server" AppendDataBoundItems="true" Width="250px">
                        <asp:ListItem Value="">(无类型)</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label runat="server" AssociatedControlID="txtArea">工作地区:</asp:Label><br />
                    <asp:TextBox ID="txtArea" runat="server" Width="243px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label runat="server" AssociatedControlID="dropSex">性别要求:</asp:Label><br />
                    <asp:DropDownList ID="dropSex" runat="server" AppendDataBoundItems="true" Width="250px">
                        <asp:ListItem Value="">(不限)</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label runat="server" AssociatedControlID="dropDegree">学历:</asp:Label><br />
                    <asp:DropDownList ID="dropDegree" runat="server" AppendDataBoundItems="true" Width="250px">
                        <asp:ListItem Value="">(不限)</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label runat="server" AssociatedControlID="dropExperience">工作经验:</asp:Label><br />
                    <asp:DropDownList ID="dropExperience" runat="server" AppendDataBoundItems="true"
                        Width="250px">
                        <asp:ListItem Value="">(不限)</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label runat="server" AssociatedControlID="txtEndDate">截止日期:</asp:Label><br />
                    <asp:TextBox ID="txtEndDate" runat="server" Width="80px"></asp:TextBox>
                    <a href="" onclick="javascript:$('[id$=&quot;txtEndDate&quot;]').val('');return false;">
                        消除</a>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
<asp:Content ID="contentLeft" ContentPlaceHolderID="contentLeftPlaceHolder" runat="server">
    <script type="text/javascript">
        function Upfile_Click(url, id) {
            var editor = FCKeditorAPI.GetInstance(Page.ContentID);
            if (url.match(/\.(jpg|jpeg|bmp|png|gif)$/i) != null) {
                var img = editor.InsertElement("img");
                img.src = url;
            } else {
                var a = editor.InsertElement("a");
                var n = "textContent";
                if("innerText" in a) n = "innerText";
                a[n] = url.match(/[^/]+$/)[0];
                a.href = url;
                a.target = "_blank";
            }
            setTimeout($.fancybox.close, 10);
        }

        var endDateID = $("[id$='txtEndDate']").attr("readonly", true).attr("id");
        Calendar.setup({
            align : "Tl",
            fixed : true,
            animation : false,
            inputField : endDateID,
            trigger    : endDateID,
            onSelect   : function() { this.hide(); }
        });

    </script>
    <h2>
        招聘内容</h2>
    <div class="form">
        <table cellpadding="0" cellspacing="10">
            <tr>
                <td>
                    <asp:Label runat="server" AssociatedControlID="txtName">职位:</asp:Label><br />
                    <asp:TextBox ID="txtName" runat="server" Width="70%"></asp:TextBox>
                    <asp:RequiredFieldValidator runat="server" ControlToValidate="txtName" ErrorMessage="职位不能为空"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label runat="server" AssociatedControlID="txtContent">正文:</asp:Label>
                    <a href="Upfile.htm" onclick="javascript:$.fancybox(this.href + '?ID=Content,' + upfilePar, { width: '75%', height: '90%', transitionIn: 'none', transitionOut: 'none', type: 'iframe' });return false;">
                        插入文件/图片</a><br />
                    <asp:TextBox runat="server" ID="txtContent" TextMode="MultiLine"></asp:TextBox>
                    <span class="hit">Enter键入&lt;p&gt;，Shift+Enter键入&lt;br /&gt;</span>
                    <script type="text/javascript">
                        var fckContent = new FCKeditor(Page.ContentID);
                        fckContent.ToolbarSet = "ynhtm.Content";
                        fckContent.Height = "400px";
                        fckContent.ReplaceTextarea(); 
                    </script>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
