廖井涛
2025-06-06 32e8ae44d542d6f6d2dc82896f5ffe58ce695889
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
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <title>任务管理</title>
</head>
 
<body>
    <form id="inputForm" action="${ctx}/task/${action}" method="post" class="form-horizontal">
        <input type="hidden" name="id" value="${task.id}"/>
        <fieldset>
            <legend><small>管理任务</small></legend>
            <div class="control-group">
                <label for="task_title" class="control-label">任务名称:</label>
                <div class="controls">
                    <input type="text" id="task_title" name="title"  value="${task.title}" class="input-large required" minlength="3"/>
                </div>
            </div>    
            <div class="control-group">
                <label for="description" class="control-label">任务描述:</label>
                <div class="controls">
                    <textarea id="description" name="description" class="input-large">${task.description}</textarea>
                </div>
            </div>    
            <div class="form-actions">
                <input id="submit_btn" class="btn btn-primary" type="submit" value="提交"/>&nbsp;    
                <input id="cancel_btn" class="btn" type="button" value="返回" onclick="history.back()"/>
            </div>
        </fieldset>
    </form>
    <script>
        $(document).ready(function() {
            //聚焦第一个输入框
            $("#task_title").focus();
            //为inputForm注册validate函数
            $("#inputForm").validate();
        });
    </script>
</body>
</html>