<!--#include file="../Include/Const.Asp" -->
<!--#include file="../Include/ConnSiteData.Asp" -->
<!--#include file="../Include/System_Language.asp" -->
<!--#include file="../Include/Version.Asp" -->
<!--#include file="CheckAdmin.Asp"-->
<!--#include file="Ky_Tags.asp"-->
<%
'*******************************************************
'软件名称：科蚁企业网站内容管理系统（KEYICMS）
'软件开发：成都神笔天成网络科技有限公司
'网   址：http://www.keyicms.com
'本信息不会影响您网站的正常使用，无论免费用户或是收费用户请保留这里的信息.
'神笔(26)天成网络享有软件著作权，如果您擅自删除这里的版权信息,我们将追究法律责任.
'未经公司同意禁止更改以下代码.
'*******************************************************
%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="<%=Keyicms_Lang_Copyright(13)%>">
<meta name="author" content="<%=Keyicms_Lang_Copyright(3)%>">
<title><%=Keyicms_Lang_Copyright(1)%> <%=Str_Soft_Version%></title>
<!--#Include file="Keyicms_css.Asp"-->

<script type="text/javascript">
function changeTagsControlType(select){
	var trTagsOptions = document.getElementById("trTagsOptions");
	if(select.options[select.selectedIndex].value>5)
		trTagsOptions.style.display = "";
	else
		trTagsOptions.style.display = "none";
}
function changeTagsCategoryType(select){
	var preShow = document.getElementById("preShow");
	var spShow  = document.getElementById("spShow");
	preShow.innerHTML = select.options[select.selectedIndex].value;
	if(spShow.innerHTML == "")spShow.innerHTML = "_";
	
}
</script>
</head>

<body>
<!--#Include file="Keyicms_Top.Asp"-->
<div id="wrap">
	<!--#Include file="Keyicms_Meun.Asp"-->
	<%
	If InStr(CompanyAdminPurview, "|10,") = 0 Then
		response.Write ("<br /><br /><div style='height:100%; text-align:center' class='main'><font style=""color:red; font-size:14px;"")>"&Keyicms_Lang_System(26)&"</font></div>")
		response.End
	End If
	%>
    <div class="main">
        <div class="row ">
            <ol class="breadcrumb">
                <li><i class="fa fa-home"></i><%=Keyicms_Lang_Copyright(14)%></li>
             <li class="active"><a href="">企业应用</a></li>
                <li class="active">自定义标签</li>
            </ol>	
        </div>	
        <div class="row">
            <div class="col-lg-12 hideInIE8">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h2><i class="fa fa-edit"></i><span class="break"></span><strong>自定义标签管理</strong></h2> 
                    </div>
                    <div class="panel-body">
                        <a class="ShortCut1" href="Ky_TagsAdd.Asp?Result=Add">  
                            <i class="fa fa-plus-square-o"></i>
                            <div class="title">标签添加</div>
                        </a>					
                        <a class="ShortCut2" href="Ky_Tags.Asp">  
                            <i class="fa fa-tasks"></i>
                            <div class="title">标签列表</div>
                        </a>										
                    </div>
                </div>
            </div>
        </div>

       <div class="row">
            <div class="col-md-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h2><i class="fa fa-gears"></i><span class="break"></span><strong>添加自定义标签</strong></h2>
                    </div>
                    <form action="?action=add" method="post" name="frmTags" class="form-horizontal">
                    <input type="hidden" name="TagsDiversification" value="<%=TagsDiversification%>" />
                    <input type="hidden" name="TagsID" value="<%=TagsID%>" />
                    
                    <div class="panel-body">
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input">参数名称：</label>
                            <div class="col-md-2">
                                <input name="TagsName" type="text" id="TagsName" class="form-control" value="<%=TagsName%>">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input">字段名称：</label>
                            <div class="col-md-4">

                                 <div class="input-group">
				                            <input onKeyUp="document.getElementById('endShow').innerHTML=value" name="TagsField" type="text" id="TagsField" class="form-control" value="<%=TagsField%>">
				                            <span class="input-group-btn">
				                            <button type="button" class="btn btn-primary">预览 [<span id="preShow"></span><span id="spShow"></span><span id="endShow"></span>]</button>
				                            </span>
				                        </div>
                                        <span class="help-block">必须填写字母或英文数字组合</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input">是否必填：</label>
                            <div class="col-md-4">
                                <input name="TagsNotNull" type="checkbox" id="TagsNotNull" <%if TagsNotNull then%>checked<%end if%> />
                                 <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input">控件类型：</label>
                           <div class="col-md-1">
                           <select name="TagsControlType" onChange="changeTagsControlType(this)" class="form-control" size="1">
                              <option value="0" selected>文本</option>
                              <option value="1">数字</option>
                              <option value="2">编辑器</option>
                              <option value="3">附件</option>
                              <option value="4">日期</option>
                              <option value="5">颜色</option>
                              <option value="6">单选</option>
                              <option value="7">多选</option>
                           </select>
							<script>
                            for(var i=0;i<frmTags.TagsControlType.options.length;i++){
                                if(frmTags.TagsControlType.options[i].value == "<%=TagsControlType%>")
                                    frmTags.TagsControlType.selectedIndex = i;}
                            </script>
                        </div>
                        </div>
                        <div style="display:none" class="form-group" id="trTagsOptions">
                            <label class="col-md-2 control-label" for="text-input">备选内容：</label>
                            <div class="col-md-4">
                                <textarea name="TagsOptions" cols="50" rows="5" class="form-control" style="width:500px;height:80px;"><%=TagsOptions%></textarea>
                                 <span class="help-block">多条请用回车区别</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input">应用模块：</label>
                            <div class="col-md-2">
                            <select name="TagsCategory" onChange="changeTagsCategoryType(this)" class="form-control">
                               <option value="P" selected>产品</option>
                               <option value="A">单页</option>
                               <option value="N">信息</option>
                               <option value="DL">下载</option>
                               <option value="HR">招聘</option>
                               <option value="FO">相册</option>
                              <option value="VI">视频</option>
                           </select>
					  <script>
                      for(var i=0;i<frmTags.TagsCategory.options.length;i++){
                          if(frmTags.TagsCategory.options[i].value == "<%=TagsCategory%>")
                              frmTags.TagsCategory.selectedIndex = i;
                      }
                      document.getElementById("preShow").innerHTML = frmTags.TagsCategory.options[frmTags.TagsCategory.selectedIndex].value;
                      document.getElementById("spShow").innerHTML = "_";
                      </script> 
                                 <span class="help-block">请选择对应模块</span>
                            </div>
                        </div>                
                        <div class="form-group">
                            <label class="col-md-2 control-label" for="text-input">排序：</label>
                            <div class="col-md-4">
                                <input name="TagsOrder" type="text" id="TagsOrder" class="form-control" value="10">
                            </div>
                        </div>
                    </div>
                        <div class="form-group button-container">
                            <div class="col-md-2 control-label"></div>
                            <div class="col-md-10">
                                <input type="submit" class="btn btn-danger" value="<%if request.QueryString("action")="edit" then%>编辑<%else%>添加<%end if%>" />
                                <input type="button" class="btn btn-success" value="<%=Keyicms_Lang_System(32)%>" onClick="history.go(-1)"/>
                            </div>	
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <!--#Include file="Keyicms_End.Asp"-->
</div>
<!--#Include file="Keyicms_js.Asp"-->
</body>
</html>
