edit.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. {// 引入标签库 }
  2. <tagLib name="html" />
  3. <include file="Public:header" />
  4. <style>
  5. .delete {
  6. cursor: pointer;
  7. padding: 0px 5px;
  8. text-decoration: underline;
  9. color: red;
  10. }
  11. .uploaderMsgBox {
  12. width: 100%;
  13. border-bottom: 1px solid #888;
  14. }
  15. [act=cancel-upload]{
  16. text-decoration: none;
  17. cursor:pointer;
  18. }
  19. </style>
  20. <div class="main">
  21. <div class="main_title">{%EDIT} <a href="{:u("EduTeacher/index")}" class="back_list">{%BACK_LIST}</a></div>
  22. <div class="blank5"></div>
  23. <form name="edit" action="__APP__" method="post" enctype="multipart/form-data">
  24. <table class="form" cellpadding=0 cellspacing=0>
  25. <tr>
  26. <td colspan=2 class="topTd"></td>
  27. </tr>
  28. <tr>
  29. <td class="item_title">名称:</td>
  30. <td class="item_input"><input type="text" class="textbox disabled" name="title" value="{$vo.title}" disabled /></td>
  31. </tr>
  32. <tr>
  33. <td class="item_title">宣传视频:</td>
  34. <td class="item_input">
  35. <input type="text" class="textbox" name="file_id" id="file_id" value="{$vo.file_id}" />
  36. <input type="button" class="button" id="btn_upload" value="上传视频" />
  37. <input type="file" id="video_file" style="display: none">
  38. <span id="result"></span>
  39. </td>
  40. </tr>
  41. <tr>
  42. <td class="item_title">宣传封面:</td>
  43. <td class="item_input">
  44. <html:imgUpload name='desc_image' id='desc_image' value="$vo.desc_image" />
  45. <span class="tip_span" id="tip_span">&nbsp;[规格为:470px*300px]]</span>
  46. </td>
  47. </tr>
  48. <tr>
  49. <td class="item_title">教师介绍</td>
  50. <td class="item_input">
  51. <input type="text" class="textbox required" style="width: 750px;" name="description" value="{$vo.description}" />
  52. </td>
  53. </tr>
  54. <tr>
  55. <td class="item_title">是否允许直播:</td>
  56. <td class="item_input">
  57. <select name="allow_create_video">
  58. <option value="0" <if condition="$vo['allow_create_video'] eq 0">selected="selected"</if> >否</option>
  59. <option value="1" <if condition="$vo['allow_create_video'] eq 1">selected="selected"</if> >是</option>
  60. </select>
  61. </td>
  62. </tr>
  63. <tr>
  64. <td class="item_title">标签</td>
  65. <td class="item_input">
  66. <ul style="width: 100%">
  67. <foreach name="tags" item="tag">
  68. <li style="width: 30%; display: inline-block">
  69. <label class="col-xs-4">
  70. <input type="checkbox" name="tags[]" value="{$tag.title}" <if condition="$tag['is_checked'] eq true">checked="checked"</if> > {$tag.title}
  71. </label>
  72. </li>
  73. </foreach>
  74. </ul>
  75. <span class="tip_span" id="tip_span">最多选择 3 个标签</span>
  76. </td>
  77. </tr>
  78. <tr>
  79. <td class="item_title"></td>
  80. <td class="item_input">
  81. <!--隐藏元素-->
  82. <input type="hidden" name="{:conf("VAR_MODULE")}" value="EduTeacher" />
  83. <input type="hidden" name="{:conf("VAR_ACTION")}" value="update" />
  84. <input type="hidden" name="id" value="{$vo.id}" />
  85. <input type="hidden" id="secret_id" value="{$secret_id}" />
  86. <input type="hidden" id="after_sha_start_upload" value="1" />
  87. <!--隐藏元素-->
  88. <input type="submit" class="button" value="{%EDIT}" />
  89. <input type="reset" class="button" value="{%RESET}" />
  90. </td>
  91. </tr>
  92. <tr>
  93. <td colspan=2 class="bottomTd"></td>
  94. </tr>
  95. </table>
  96. </form>
  97. </div>
  98. <script>
  99. $('input[name="tags[]"]').change(function(){
  100. if($('input[name="tags[]"]:checked').length <= 3) {
  101. return;
  102. }
  103. if(this.checked) {
  104. this.checked = false;
  105. }
  106. });
  107. </script>
  108. <PHP>
  109. $time = time();
  110. </PHP>
  111. <script src="//imgcache.qq.com/open/qcloud/js/vod/sdk/ugcUploader.js"></script>
  112. <script type="text/javascript" src='__TMPL__Common/js/user_live.js?t={$time}'></script>
  113. <include file="Public:footer" />