<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Category_Edit.aspx.cs" Inherits="TotCms.Web.Admin.Category_Edit" EnableEventValidation="false" %>

<%@ Register src="UI/main_top.ascx" tagname="main_top" tagprefix="uc1" %>

<!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 runat="server">
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <title>修改栏目</title>
  <link href="style/global.css" rel="stylesheet" type="text/css" />
  <script type="text/javascript" src="js/common.js"></script>
  <script type="text/javascript">
  function AutoSavePath(){
    $('SavePath').value='/category/$CategoryId$';
    $('LinkUrl').value='/category/$CategoryId$';
  }
  function resizeup(obj) {
	  var newheight = parseInt($(obj).style.height, 10) + 50;
	  $(obj).style.height = newheight + 'px';
  }
  function resizedown(obj) {
	  var newheight = parseInt($(obj).style.height, 10) - 50;
	  if(newheight > 0) {
		  $(obj).style.height = newheight + 'px';
	  }
  }
  </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
      <uc1:main_top ID="main_top1" runat="server" />
    
    </div>
    <table style="width:100%;" border="0" cellpadding="0" cellspacing="1" 
      class="black_border">
      <tr class="suphead">
        <td colspan="2">
                    修改栏目</td>
    </tr>
    <tr>
      <td class="fields_text">
          栏目名称：</td>
      <td class="fields_input">
        <asp:TextBox ID="Title" runat="server"></asp:TextBox>
          <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
          ControlToValidate="Title" ErrorMessage="栏目名称不能为空"></asp:RequiredFieldValidator>
          </td>
    </tr>
    <tr>
      <td class="fields_text">
          父&nbsp; 栏&nbsp; 目：</td>
      <td class="fields_input">
        <asp:Label ID="CategoryTitle" runat="server" Text="Label"></asp:Label>
        <asp:TextBox ID="CategoryId" runat="server" CssClass="hidden"></asp:TextBox>
          <input id="Button4" type="button" value="..." onclick="popupWindow('Category_Tree.aspx','category_tree',400,300,1)" /></td>
    </tr>
    <tr>
      <td class="fields_text">
          栏目模板：</td>
      <td class="fields_input">
        <asp:TextBox ID="Template" runat="server" CssClass="input_middle"></asp:TextBox>
        <input id="Button3" type="button" value="..." onclick="popupWindow('Template_Files.aspx','file_template',400,300,1)" />
        <input type="button" value="编辑" onclick="popupWindow('File_Mod.aspx?file='+document.getElementById('Template').value,'template_savepath',400,300,1)" />
          <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
          ControlToValidate="Template" ErrorMessage="栏目模板不能为空"></asp:RequiredFieldValidator>
          </td>
    </tr>
    <tr>
      <td class="fields_text">
          保存路径：</td>
      <td class="fields_input">
        <asp:TextBox ID="SavePath" runat="server" CssClass="input_middle"></asp:TextBox>
          <input type="button" name="Submit3" value="..." onclick="popupWindow('Template_Savepath.aspx','template_savepath',400,300,1)" />
          <input type="button" name="Submit32" value="Auto" onclick="AutoSavePath()" />
          <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="SavePath" ErrorMessage="栏目保存路径不能为空"></asp:RequiredFieldValidator>
          &nbsp;
          </td>
    </tr>
    <tr>
      <td class="fields_text">
          链接URL：</td>
      <td class="fields_input">
        <asp:TextBox ID="LinkUrl" runat="server" CssClass="input_middle"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
          ControlToValidate="LinkUrl" ErrorMessage="链接URL不能为空"></asp:RequiredFieldValidator>
          </td>
    </tr>
    <tr>
      <td class="fields_text">
          栏目描述：</td>
      <td class="fields_input">
        <asp:TextBox ID="Desrb" runat="server" CssClass="text_normal" 
          TextMode="MultiLine"></asp:TextBox>
          <B><A href="javascript:resizeup('Desrb');">[+]</A> 
          <A href="javascript:resizedown('Desrb');">[-]</A></B>
          </td>
    </tr>
    <tr>
      <td class="fields_text">
          栏目关键字：</td>
      <td class="fields_input">
        <asp:TextBox ID="Keywords" runat="server" CssClass="text_normal" 
          TextMode="MultiLine"></asp:TextBox>
          <B><A href="javascript:resizeup('Keywords');">[+]</A> 
          <A href="javascript:resizedown('Keywords');">[-]</A></B>
          </td>
    </tr>
    <tr>
      <td class="fields_text">
          栏目排序：</td>
      <td class="fields_input">
        <asp:TextBox ID="SortNum" runat="server">0</asp:TextBox>
          </td>
    </tr>
    <tr>
      <td class="fields_text">
          是否频道：</td>
      <td class="fields_input">
        <asp:CheckBox ID="IsChannel" runat="server" />
          </td>
    </tr>
    <tr>
      <td class="fields_text">
          绑定文章模板：</td>
      <td class="fields_input">
        <asp:DropDownList ID="ShowTemplateId" runat="server">
        </asp:DropDownList>
          </td>
    </tr>
    <tr>
      <td class="fields_text">
          允许投稿：</td>
      <td class="fields_input">
          <asp:CheckBox ID="AllowContrib" runat="server" />
          </td>
    </tr>
    <tr>
    <td class="fields_text">
          内容模型：</td>
      <td class="fields_input">          
          <asp:RadioButtonList ID="DataModule" runat="server" 
            RepeatDirection="Horizontal" RepeatLayout="Flow">
          </asp:RadioButtonList>
          </td>
    </tr>
    <tr>
      <td colspan="2" align="center">
        <asp:Button ID="Button1" runat="server" Text="修改栏目" onclick="Button1_Click" />
        <input id="Button2" type="reset" value="取 消" onclick="javascript:history.back();" /></td>
    </tr>
  </table>
    </form>
</body>
</html>
