edit.html 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <form id="form" action="{:url('news/edit')}">
  2. <input type="hidden" id="id" name="id" value="{$info.id}"/>
  3. <input type="hidden" name="img" value="{$info.img}" id="img" />
  4. <table class="formtable">
  5. <tr><th>头条分类:</th><td>
  6. <select datatype="*" class="select w200" name="cate_id">
  7. <option value=" ">选择分类</option>
  8. {foreach $cate as $vo}<option value="{$vo.id}"{if $vo.id == $info.cate_id} selected{/if}>{$vo.title}</option>{/foreach}
  9. </select>
  10. </td></tr>
  11. <tr><th>头条类型:</th><td>
  12. <select datatype="*" class="select w200" name="types">
  13. <option value="0"{if $info.types == 0} selected{/if}>普通</option>
  14. <option value="1"{if $info.types == 1} selected{/if}>置顶</option>
  15. <option value="2"{if $info.types == 2} selected{/if}>推荐</option>
  16. <option value="3"{if $info.types == 3} selected{/if}>热点</option>
  17. <option value="4"{if $info.types == 4} selected{/if}>公告</option>
  18. </select>
  19. </td></tr>
  20. <tr><th><span class="red">*</span> 标题:</th><td><input class="input w500" datatype="*" type="text" name="title" value="{$info.title}"/></td></tr>
  21. <tr><th>引导图</th><td><div url="{:url('system/passport.common/upload')}" class="img-review fn-cp">{if $info.img}<img src="{$info.img}">{else /}<img src="__PUBLIC__/admin/review.png">{/if}</div></td></tr>
  22. <tr><th>简述</th><td><input class="input w500" datatype="*" type="text" name="desc" value="{$info.desc}" /></td></tr>
  23. <tr><th>内容</th><td><textarea class="textarea ui-editor" id="content" name="content">{$info.content|dehtml}</textarea></td></tr>
  24. <tr><th></th><td><input type="submit" value="确定" class="button button-blue submit" /> <input type="reset" value="重置" class="button button-blank" /></td></tr>
  25. </table>
  26. </form>
  27. <script type="text/javascript">
  28. Do('base','layer','form','editor',function () {
  29. $('#form').isForm({'upload':'{:url("system/passport.common/upload")}'});
  30. $(".img-review").win();
  31. })
  32. //添加图片
  33. function setImg(show_src){
  34. $("#img").val(show_src);
  35. $(".img-review").html('<img src="'+show_src+'">');
  36. }
  37. </script>