Content_edit.html 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <div id="msg"></div>
  2. <form name="myform" id="myform" action="<if condition="$action_name=='add'">{:U($module_name.'/insert')}<else />{:U($module_name.'/update')}</if>&iscreatehtml=1" method="post">
  3. <div id="filelist" class="hide"></div>
  4. <div class="error"><ul></ul></div>
  5. <table cellpadding=0 cellspacing=0 class="table_form" width="100%">
  6. <volist name="fields" id="r">
  7. <if condition="!empty($r['status'])">
  8. <tr>
  9. <td width="10%" ><if condition="$r['required']"><font color="red">*</font></if>{$r.name}</td>
  10. <td width="90%" id="box_{$r['field']}">
  11. {$r|getform=$form,###}
  12. </td>
  13. </tr>
  14. </if>
  15. </volist>
  16. </table>
  17. <div id="bootline"></div>
  18. <div id="btnbox" class="btn">
  19. <if condition="$vo['id']!=''"><input TYPE="hidden" name="id" value="{$vo.id}"></if>
  20. <input type="hidden" name="lang" value="{$langid}" />
  21. <input type="hidden" name="forward" value="{$_SERVER['HTTP_REFERER']}" />
  22. <INPUT TYPE="submit" value="{:L('dosubmit')}" class="button buttonBtn" >
  23. <input TYPE="reset" value="{:L('cancel')}" class="button">
  24. </div>
  25. </form>
  26. </div>
  27. <script>
  28. var catid = $("#catid"),
  29. tips = $(".thumb_tips");
  30. {if $action_name!='add'}
  31. tips.html({$datas[0]}+'*'+{$datas[1]}+"px");
  32. {/if}
  33. catid.change(function(){
  34. $.ajax({
  35. type : "post",
  36. url : "{:URL('Admin-Content/get_img')}",
  37. data : {
  38. cid : $(this).val(),
  39. model : "Article",
  40. },
  41. dataType : "json",
  42. success : function(msg){
  43. if(msg[0]){
  44. tips.html(msg[0]+'*'+msg[1]+"px");
  45. }else{
  46. tips.html("0");
  47. }
  48. }
  49. })
  50. })
  51. </script>