editType.htm 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. <link rel="stylesheet" href="/admin/css/style.css" />
  7. <script src="/admin/script/jquery.min.js"></script>
  8. <script src="/admin/script/jquery.form.js"></script>
  9. <div class="page-content" style="height:450px;overflow:scroll;">
  10. <div class="page-header">
  11. <h1>添加水源</h1>
  12. </div>
  13. <div class="row">
  14. <div class="col-xs-12">
  15. <form class="form-horizontal" action="/admin/bottle/updateType" method="post" id="submit_form">
  16. <div class="form-group">
  17. <label class="col-sm-3 control-label"><span style="color: #f00">*</span>名称</label>
  18. <div class="col-sm-9">
  19. <input type="text" name="title" value="${bottle_type.title!}" class="col-xs-10 col-sm-5" style="border: 1px solid #ccc" />
  20. </div>
  21. </div>
  22. <div class="space-4"></div>
  23. <div class="form-group">
  24. <label class="col-sm-3 control-label"><span style="color: #f00">*</span>价格/箱</label>
  25. <div class="col-sm-9">
  26. <input type="text" name="price" value="${bottle_type.price!}" class="col-xs-10 col-sm-5" style="border: 1px solid #ccc" />
  27. </div>
  28. </div>
  29. <input type="hidden" name="id" value="${bottle_type.id!}" />
  30. </form>
  31. </div>
  32. </div>
  33. </div>
  34. <div style="width:100%;text-align: center;">
  35. <button type="button" class="btn btn-info" onclick="return submitForm()" style="padding:0px 5px;margin-top:5px;">
  36. <i class="icon-ok bigger-110"></i>确定
  37. </button>
  38. &nbsp;&nbsp;
  39. <button type="reset" class="btn" onclick="parent.hideAlert()" style="padding:0px 5px;margin-top:5px;">
  40. <i class="icon-undo bigger-110"></i>取消
  41. </button>
  42. </div>
  43. <script>
  44. function submitForm(){
  45. $('#submit_form').ajaxSubmit({
  46. success: function(data){
  47. alert(data.msg);
  48. if(data.success){
  49. parent.location.reload();
  50. }
  51. }
  52. });
  53. }
  54. </script>