<!-- 删除已上报标段 -->
<div id="del" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">删除确认</h5>
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            </div>
            <form method="post" action="/lib/delete?_csrf=<%= ctx.csrf %>" onsubmit="return check_delete_lib();">
                <input type="hidden" name="del_lib_id" value="<%= libInfo.id %>">
                <div class="modal-body">
                    <div class="form">
                        <div class="alert alert-danger">
                            删除	<%= libInfo.filename %> 后数据无法恢复，请谨慎操作；
                            <br>需要删除，请在以下输入框输入"&nbsp;&nbsp;&nbsp;<b>确认删除</b>&nbsp;&nbsp;&nbsp;"，再点击“确认删除”按钮。
                        </div>
                        <div class="form-group">
                            <input class="form-control" type="text" name="del_lib_text" id="del_lib_text" placeholder="输入 “确认删除”">
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-danger" type="submit">确认删除</button>
                    <button class="btn btn-secondary" type="button" data-dismiss="modal" aria-hidden="true">关闭</button>
                </div>
            </form>
        </div>
    </div>
</div>
<!-- 入库 -->
<div id="storage" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">入库确认</h5>
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            </div>
            <div class="modal-body">
                <div class="form">
                    <h5>入库后，才可以进行指标对比。确认入库后，仍然可以对参数进行重新设置，重新进行指标计算。</h5>
                </div>
            </div>
            <form method="post" action="/lib/enter?_csrf=<%= ctx.csrf %>">
                <input type="hidden" name="enter_lib_id" value="<%= libInfo.id %>">
            <div class="modal-footer">
                <button class="btn btn-primary" type="submit">确认入库</button>
                <button class="btn btn-secondary" type="button" data-dismiss="modal" aria-hidden="true">关闭</button>
            </div>
            </form>
        </div>
    </div>
</div>
<script>
    function check_delete_lib() {
        if($('#del_lib_text').val().trim() !== '确认删除') {
            alert('请在输入框中正确输入"确认删除"');
            return false;
        }
    }
</script>