<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head th:replace="fragment :: head(~{::title})">
    <title>通知新增</title>
</head>

<body>


<div class="ui attached pointing menu">
    <div class="ui container">
        <div class="right menu">
            <a href="#" th:href="@{/admin/notices/input}" class="teal active item">发布</a>
            <a href="#" th:href="@{/admin/notices}" class="item">列表</a>
        </div>
    </div>
</div>

<!--中间内容-->
<div  class="m-container m-padded-tb-big">
    <div class="ui container">                         <!--如果没id，则进行新增，若有id，则进行更新-->
        <form action="#" th:action=" @{/admin/notices}" method="post" class="ui form">
            <!--        <input type="hidden" name="id" >-->
            <div class="required field">
                <div class="ui left labeled input">
                    <label class="ui teal basic label" >通知</label>
                    <input type="text" name="content"   placeholder="请输入通知内容.." >
                </div>
            </div>

            <div class="ui error message"></div> <!--显示错误信息-->

            <div class="ui right aligned container">
                <button type="button" class="ui button" onclick="window.history.go(-1)" >返回</button>
                <button type="button" id="save-btn" class="ui secondary submit button">提交</button>
            </div>

        </form>
    </div>
</div>

<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<!--底部footer-->
<footer th:replace="fragment :: footer" >

</footer>



<script>

    $('.menu.toggle').click(function () {
        $('.m-item').toggleClass('m-mobile-hide');
    });

    $('.ui.dropdown').dropdown({
        on : 'hover'
    });

    $('.ui.form').form({
        fields : {
            title : {
                identifier: 'name',
                rules: [{
                    type : 'empty',
                    prompt: '请输入标签名称'
                }]
            }
        }
    });


</script>
</body>
</html>
