edit.htm 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <link rel="stylesheet" href="/admin/assets/css/bootstrap.min.css" />
  2. <link rel="stylesheet" href="/admin/assets/css/font-awesome.min.css" />
  3. <link rel="stylesheet" href="/admin/assets/css/ace.min.css" />
  4. <link rel="stylesheet" href="/admin/assets/css/ace-rtl.min.css" />
  5. <link rel="stylesheet" href="/admin/assets/css/ace-skins.min.css" />
  6. <script src="/admin/script/jquery.min.js"></script>
  7. <script src="/admin/script/jquery.form.js"></script>
  8. <div class="page-content" style="height:450px;overflow:scroll;">
  9. <div class="page-header">
  10. <h1>编辑分类</h1>
  11. </div>
  12. <div class="row">
  13. <div class="col-xs-12">
  14. <form class="form-horizontal" action="/admin/materialType/update" method="post" id="submit_form">
  15. <div class="form-group">
  16. <label class="col-sm-3 control-label"><span style="color: #f00">*</span>名称</label>
  17. <div class="col-sm-9">
  18. <input type="text" name="title" class="col-xs-10 col-sm-5" style="border: 1px solid #ccc" value="${type.title!}" />
  19. </div>
  20. </div>
  21. <input type="hidden" value="${type.id}" name="id" />
  22. </form>
  23. </div>
  24. </div>
  25. </div>
  26. <div style="width:100%;text-align: center;">
  27. <button type="button" class="btn btn-info" onclick="return submitForm()" style="padding:0px 5px;margin-top:5px;">
  28. <i class="icon-ok bigger-110"></i>确定
  29. </button>
  30. &nbsp;&nbsp;
  31. <button type="reset" class="btn" onclick="parent.hideAlert()" style="padding:0px 5px;margin-top:5px;">
  32. <i class="icon-undo bigger-110"></i>取消
  33. </button>
  34. </div>
  35. <script>
  36. function submitForm(){
  37. $('#submit_form').ajaxSubmit({
  38. success: function(data){
  39. alert(data.msg);
  40. if(data.success){
  41. parent.location.reload();
  42. }
  43. }
  44. });
  45. }
  46. </script>