<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>编辑话题</title>
    <style>
    .label-info {background-color: #4285f4;}
    .label {
        display: inline;
        padding: .2em .6em .3em;
        line-height: 1;
        color: #fff;
        text-align: center;
        white-space: nowrap;
        vertical-align: baseline;
        border-radius: .25em;
    }
    .nav-tabs{border-style:none}
    .tools {position: absolute;right: 1px;top: 1px;width: 25px;line-height: 25px;text-align: center;background-color: #f1f1f1;}
    </style>
  </head>
  <body>
      <div class="email-head">
          <c:if test="${not empty errors}">
          <div class="email-head-title">${errors}<span class="icon mdi mdi-alert-polygon"></span></div>
          </c:if>
          <c:if test="${empty errors}">
          <div class="email-head-title">编辑话题<span class="icon mdi mdi-edit"></span></div>
          </c:if>
      </div>
      <form action="${ADMIN}/topic/edit" method="post">
      <div class="email-compose-fields">
          <div class="subject">
              <div class="form-group row pt-2">
                  <label class="col-md-1 control-label">主题</label>
                  <div class="col-md-11">
                      <input name="title" type="text" class="form-control" value="${form.title}" tabindex="1" required="required" />
                  </div>
              </div>
          </div>
          <div class="to">
              <div class="form-group row pt-0">
                  <label class="col-md-1 control-label">关键词:</label>
                  <div class="col-md-11">
                      <input name="words" type="text" class="form-control" data-role="tagsinput" tabindex="2" value="${form.words}"/>
                  </div>
              </div>
          </div>
      </div>
      <div class="email editor">
            <div id="content-editor"><textarea id="content" name="content" rows="5" tabindex="3" required="required" class="richeditor" data-query="height:450px,width:100%,upload:/upload/ckeditor">${form.content}</textarea></div>
            <div class="row">
                <div class="form-group col-md-12 col-sm-12">
                    <input type="hidden" name="record" value="${form.record}" />
                    <input type="hidden" name="token" value="${form.token}" />
                    <button type="submit" class="btn btn-primary btn-space" tabindex="4"><i class="icon s7-mail"></i> 提交</button>
                    <button type="button" class="btn btn-secondary btn-space"><i class="icon s7-close"></i> 取消</button>
                </div>
            </div>
      </div>
      </form>
  </body>
</html>