<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>编辑问题</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="keywords" content="">
  <meta name="description" content="">
{aspbbs:template src=common/link}

<style>
{if: CheckWap() }
.note-editing-area img{max-width:30%;}
{end if}
</style>
</head>
<body>

{aspbbs:template src=common/header_user}

<div class="layui-container fly-marginTop" id="LAY_brain">
  <div class="fly-panel" pad20 style="padding-top: 5px;">
    <!--<div class="fly-none">没有权限</div>-->
    <div class="layui-form layui-form-pane">
      <div class="layui-tab layui-tab-brief" lay-filter="user">
        <ul class="layui-tab-title">
          <li class="layui-this">编辑帖子</li>
        </ul>
        <div class="layui-form layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
          <div class="layui-tab-item layui-show">
            <form action="{aspbbs:indexprefix}Topic_doEdit" method="post">
              <div class="layui-row layui-col-space15 layui-form-item">
                <div class="layui-col-md3">
                  <label class="layui-form-label">所在专栏</label>
                  <div class="layui-input-block">
                    <select name="SortID" lay-filter="column" {if: $_S.IsAdmin<>1}disabled{end if}> 
                      <option></option> 
					  {if: $_S.IsAdmin=1}
					  {aspbbs:looparr key=guestConfig.SortAdminName data=guestConfig.SortAdminID}
                      <option value="[looparr:data]" [looparr:data selected={aspbbs:thread.SortID}]>[looparr:key]</option>
					  {/aspbbs:looparr}  
					  {end if}
					  {aspbbs:looparr key=guestConfig.SortUserName data=guestConfig.SortUserID}
                      <option value="[looparr:data]" [looparr:data selected={aspbbs:thread.SortID}]>[looparr:key]</option>
					  {/aspbbs:looparr}
					  {aspbbs:looparr key=guestConfig.SortHideName data=guestConfig.SortHideID}
                      <option value="[looparr:data]" [looparr:data selected={aspbbs:thread.SortID}]>[looparr:key]</option>
					 {/aspbbs:looparr} 
                    </select>
                  </div>
                </div>
                <div class="layui-col-md9">
                  <label for="L_title" class="layui-form-label">标题</label>
                  <div class="layui-input-block">
                    <input type="text" id="L_title" name="Title" value="{aspbbs:func:Server.HTMLEncode($thread.title)}" required lay-verify="required" autocomplete="off" class="layui-input">
                    <input type="hidden" name="TopicID" value="{aspbbs:thread.TopicID}">
                    <input type="hidden" name="EditCount" value="{aspbbs:thread.EditCount}">
                  </div>
                </div>
              </div>
              <div class="layui-form-item layui-form-text">
                <div class="layui-input-block">
                  <textarea id="L_content" name="Content" required lay-verify="required" placeholder="详细描述" class="layui-textarea" 
				  style="height:{if:checkwap()}20rem{else}300px;{end if}"
				  {if:checkWap()}toolbar="{aspbbs:guestConfig.EditorToolMobile}"{end if}
				  >{aspbbs:thread.Content}</textarea>
				  {aspbbs:summernote}
                </div>
              </div>
              <div class="layui-form-item">
                <div class="layui-inline">
                  <label class="layui-form-label">{aspbbs:guestConfig.RewardTitle}</label>
                  <div class="layui-input-inline" style="width: 190px;">
                    <select name="AnswerReward" disabled>
					  {aspbbs:looparr data=$guestConfig.ThreadAnswerReward}
                      <option value="[looparr:data]" [looparr:data selected=$thread.AnswerReward]>[looparr:data]</option>
					  {/aspbbs:looparr}
                    </select>
                  </div>
                  <div class="layui-form-mid layui-word-aux">发表后无法更改{aspbbs:guestConfig.ExperienceName}</div>
                </div>
              </div>
			  {if: $_S.IsAdmin<>1 AND NOT checkwap()}
              <div class="layui-form-item">
                <label for="L_vercode" class="layui-form-label">图形码</label>
                <div class="layui-input-inline">
                  <input type="text" id="L_vercode" name="verify" required lay-verify="required" placeholder="请回答后面的验证码" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid">
                  <span style="color: #c00;">{aspbbs:checkimg}</span>
                </div>
              </div>
			  {end if}
              <div class="layui-form-item">
                <button class="layui-btn" lay-filter="*" alert="alert" lay-submit onclick="form.target='_self';form.action='{aspbbs:indexprefix}Topic_doEdit'">发布</button>
				
				<button class="layui-btn layui-btn-primary" alert="alert" onclick="form.target='hideIFrame';form.action='{aspbbs:indexprefix}Topic_doDraft';form.submit();return false;">存草稿</button>
              </div>
            </form>
<iframe id="hideFrame" name="hideIFrame" style="display:none;"></iframe>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
{aspbbs:template src=self/footer}

</body>
</html>