edit.html 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>TODO supply a title</title>
  5. {include file="../application/manage/view/commons/headers.html" }
  6. <script >
  7. // 保存信息
  8. function save(){
  9. var data=$("#myform").serialize();
  10. $.ajax({
  11. url:"/manage/examproject/save",
  12. data:data,type:"get",
  13. success:function(rs){
  14. if(rs.indexOf("insert_ok")>=0){
  15. alert('新增成功');
  16. document.location.href="edit?id="+rs.split(";")[1];
  17. }else if(rs=="update_ok"){
  18. alert('保存成功');
  19. }else{
  20. alert("保存失败!");
  21. }
  22. },error:function(e,e1,e2){
  23. alert(e2);
  24. }
  25. });
  26. }
  27. </script>
  28. </head>
  29. <body>
  30. <form id="myform" action="" method="get" >
  31. <input name="id" type="hidden" value="{if isset($exam_project) }{$exam_project.id}{/if}" />
  32. <table class="editform" width="99%" border="0" style="margin: 5px auto;" cellpadding="1" cellspacing="1" >
  33. <tr>
  34. <th width="105" height="38" align="right" >属性&nbsp;</th>
  35. <th colspan="3" >信息</th>
  36. </tr>
  37. <tr>
  38. <th height="32" align="right" >项目名称:</th>
  39. <td colspan="3" >
  40. <input name="name" type="text" class="easyui-textbox" size="55" value="{if isset($exam_project) }{$exam_project.name}{/if}" />
  41. </td>
  42. </tr>
  43. <tr>
  44. <th height="32" align="right" >父集class类:</th>
  45. <td colspan="3" >
  46. <select name="exam_class_id" class="easyui-combobox" style="width:200px;" >
  47. {volist name="class" id="cl"}
  48. <option value="{$cl.id}" {if isset($exam_project) }{if $cl.id==$exam_project.exam_class_id}selected{/if}{/if}>{$cl.insName}-{$cl.name}</option>
  49. {/volist}
  50. </select>
  51. </td>
  52. </tr>
  53. <tr>
  54. <th height="32" >&nbsp;</th>
  55. <td>
  56. <a type="button" class="easyui-linkbutton" data-options="iconCls:'icon-save'" icon="icon-save" onclick="save()" >保存</a>
  57. <a type="button" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" onclick="window.parent.closeEditWin('reload');" >关闭</a>
  58. </td>
  59. </tr>
  60. <tr >
  61. <th height="32" >&nbsp;</th>
  62. <td colspan="3" >
  63. &nbsp;
  64. </td>
  65. </tr>
  66. </table>
  67. </form>
  68. </body>
  69. </html>