edit.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. {// 引入标签库 }
  2. <tagLib name="html" />
  3. <include file="Public:header" />
  4. <div class="main">
  5. <div class="main_title">{%EDIT} <a href="{:u("WeiboIndex/index")}" class="back_list">{%BACK_LIST}</a></div>
  6. <div class="blank5"></div>
  7. <form name="edit" action="__APP__" method="post" enctype="multipart/form-data">
  8. <table class="form" cellpadding=0 cellspacing=0>
  9. <tr>
  10. <td colspan=2 class="topTd"></td>
  11. </tr>
  12. <tr>
  13. <td class="item_title">标题:</td>
  14. <td class="item_input"><input type="text" class="textbox require" name="title" value="{$vo.title}" /></td>
  15. </tr>
  16. <tr>
  17. <td class="item_title">图片:</td>
  18. <td class="item_input"><html:imgUpload name = 'image' id='image' value="$vo.image" />
  19. <span class="tip_span" id="tip_span">&nbsp;[启动广告图标规格为:750px*1334px][其他图片规格为:750px*400px]</span>
  20. </td>
  21. </tr>
  22. <tr>
  23. <td class="item_title">显示位置:</td>
  24. <td class="item_input">
  25. <select name="show_position" id="position">
  26. <foreach name="position" item="position_item" key="k">
  27. <option value="{$k}" <if condition="$vo['show_position'] eq $k">selected="selected"</if>>{$position_item}</option>
  28. </foreach>
  29. </select>
  30. </td>
  31. </tr>
  32. <tr id="select_type">
  33. <td class="item_title">类型:</td>
  34. <td class="item_input">
  35. <select name="type" id="type">
  36. <foreach name="type_list" item="type_item" key="k">
  37. <option value="{$k}" <if condition="$vo['type'] eq $k">selected="selected"</if> >{$type_item}</option>
  38. </foreach>
  39. </select>
  40. </td>
  41. </tr>
  42. <tr id="url">
  43. <td class="item_title">链接:</td>
  44. <td class="item_input"><input type="text" class="textbox" name="url" value="{$vo.url}" /></td>
  45. </tr>
  46. <tr id="family_id" <if condition="$vo['type'] neq 1">style="display: none"</if>>
  47. <td class="item_title">家族:</td>
  48. <td class="item_input">
  49. <select name="show_id" style="width:300px">
  50. <foreach name="family" item="f_item" key="k">
  51. <option value="{$f_item.id}" <if condition="$vo['show_id'] eq $f_item['id']">selected="selected"</if> >{$f_item.name}</option>
  52. </foreach>
  53. </select>
  54. </td>
  55. </tr>
  56. <tr id="edu_show_id" >
  57. <td class="item_title" id="edu_show_id_title" >会员id:</td>
  58. <td class="item_input">
  59. <input type="text" class="textbox" name="show_id" value="{$vo.show_id}" />
  60. </td>
  61. </tr>
  62. <tr>
  63. <td class="item_title">{%SORT}:</td>
  64. <td class="item_input"><input type="text" class="textbox" name="sort" value="{$vo.sort}" /></td>
  65. </tr>
  66. <tr>
  67. <td class="item_title"></td>
  68. <td class="item_input">
  69. <!--隐藏元素-->
  70. <input type="hidden" name="{:conf("VAR_MODULE")}" value="WeiboIndex" />
  71. <input type="hidden" name="{:conf("VAR_ACTION")}" value="update" />
  72. <input type="hidden" name="id" value="{$vo.id}" />
  73. <!--隐藏元素-->
  74. <input type="submit" class="button" value="{%EDIT}" />
  75. <input type="reset" class="button" value="{%RESET}" />
  76. </td>
  77. </tr>
  78. <tr>
  79. <td colspan=2 class="bottomTd"></td>
  80. </tr>
  81. </table>
  82. <script>
  83. $(function(){
  84. var type = $('#type option:selected').val();
  85. var position = $('#position option:selected').val();
  86. if(type==1){
  87. $('#family_id').show();
  88. }else{
  89. $('#family_id').hide();
  90. }
  91. if(type==0){
  92. $("#url").show();
  93. }else{
  94. $("#url").hide();
  95. }
  96. if(type==10 || type==11){
  97. $('#edu_show_id').show();
  98. if( type==10)
  99. $('#edu_show_id_title').html("会员id:");
  100. else
  101. $('#edu_show_id_title').html("动态id:");
  102. }else{
  103. $('#edu_show_id').hide();
  104. }
  105. if(position == 3){
  106. $("#select_type").hide();
  107. $("#type").val(0);
  108. $("#url").show();
  109. }else{
  110. $("#select_type").show();
  111. }
  112. $("#type").bind("click",function(){
  113. type = $(this).val();
  114. if(type==1){
  115. $('#family_id').show();
  116. }else{
  117. $('#family_id').hide();
  118. }
  119. if(type!=0){
  120. $("#url").hide();
  121. $("input[name='url']").val('');
  122. }else{
  123. $("#url").show();
  124. }
  125. if(type==10 || type==11){
  126. $('#edu_show_id').show();
  127. if( type==10)
  128. $('#edu_show_id_title').html("会员id:");
  129. else
  130. $('#edu_show_id_title').html("动态id:");
  131. }else{
  132. $('#edu_show_id').hide();
  133. }
  134. });
  135. $("#position").bind("click",function(){
  136. position = $(this).val();
  137. if(position == 3){
  138. $("#select_type").hide();
  139. $("#type").val(0);
  140. $("#url").show();
  141. }else{
  142. type = $('#type option:selected').val();
  143. if(type==0){
  144. $("#url").show();
  145. }else{
  146. $("#url").hide();
  147. $("input[name='url']").val('');
  148. }
  149. $("#select_type").show();
  150. }
  151. });
  152. });
  153. </script>
  154. </form>
  155. </div>
  156. <include file="Public:footer" />