cy
2022-06-21 129904537f66509f97b285e7eb4f42b3dc349dd0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>新增栏目</title>
 
[#include "/business/pages/include/static.html" /]
[#include "/component/HtmlEditor.html" /]
[#include "/component/webupload.html" /]
<style>
.edit_layout1 td{
    width:auto;
}
</style>
</head>
<body class="edit_txt_body">
 
<script type="text/javascript">
$(function() {
    $.formValidator.initConfig({formID:"myform",onError:function(msg){popupTips(msg)},onSuccess:function(){
                        document.getElementById("myform").target = window.top.openDialog("1","操作",
                         {},
                         {"width":40,"height":40},[{btnId:"tipBtnSure", btnName:"确定", btnStyle:"bluebtn"}]);
                         return true;
        }});
        
        
            $("#title").formValidator({empty:false,onShow:"请填写标题",onFocus:"标题不能为空!"}).inputValidator({min:1,max:100,onError:"标题长度不能超过100个字符!"});
            $("#titleimage").formValidator({empty:false,onShow:"请选择标题图片",onFocus:"标题图片不能为空!"}).regexValidator({
                    regExp : "picture1",
                    dataType : "enum",
                    onError : "错误的图片格式,格式如:jpg,jpeg,png,gif"
                });
            $("#show_num").formValidator({empty:false,onShow:"请输入顺序号",onFocus:"请输入顺序号"}).inputValidator({min:1,max:5,onError:"顺序号必须为1到5位数字"})
                .regexValidator({regExp:"intege", dataType:"enum", onError:"顺序号必须为1到5位数字"});
            $("#content").formValidator({onshow:"内容不能为空",onFocus:"内容不能为空"}).functionValidator({
                fun:function(val,elem){
                    var text = content.isEmpty();
                    if(text) {
                        return "请输入内容";
                    } 
                    return true;
                }
            });
})
</script>
 
<div class="edit_txt">
    <form action="addMessageSubmit.html" method="post"  id="myform" name="myform" enctype="multipart/form-data">
    <input type="hidden" name="categoryId" value="${categoryId}" />
         <table class="edit_layout edit_layout1" width="99%">
                <tr><th ><label class="required" >标题:</label></th>
                    <td><input class="general" type="text"  name="title" id="title"/>
                    <div id="titleTip" style="display:inline-block;"></div>
                    </td>
                </tr>
                [#if colunm.TITLEIMAGE == 1]
                        <tr>
                           <th ><label class="required" >图片:</label></th>  
                           <td><input type="file" name="titleimage" id="titleimage">
                           <div id="titleimageTip" style="display:inline-block;width:250px;"></div>
                           </td>
                        </tr>
                        [/#if]
                            [#if colunm.SUMMARY == 1]
                       <tr>
                            <th ><label class="required" >摘要:</label></th>
                            <td>
                            <textarea rows="5" cols="100" name="summary" class="general"></textarea>
                            </td>
                        </tr>
                     [/#if]
                       <tr>
                            <th ><label class="required" >内容:</label></th>
                            <td>
                            [@htmleditor id="content"  /]
                            </td>
                        </tr>
                        [#if colunm.ATTACHEMENTS == 1]
                        
                      <tr class="online">
                        <th ><label >附件:</label></th>
                        <td>
                               [@webupload multiple="true"  /]
                               </td>
                               </tr>
                        [/#if]
                        <tr>
                           <th><label class="required" >顺序号:</label></th>
                           <td>
                           <input name="show_num" class="general" id="show_num"/>
                           <div id="show_numTip" style="display:inline-block;width:250px;"></div>
                           </td>
                        </tr>
            </table>
     </form>
</div>
 
 
 
<script type="text/javascript">
function onDialogBtnClick(btnID, dialogID, config){
        if(btnID == "btnSure"){
            $("#myform").submit();
        }
    }
 
</script>
 
 
</body>
</html>