edit.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <include file="public@header"/>
  2. <style type="text/css">
  3. .pic-list li{
  4. margin-bottom:5px;
  5. }
  6. </style>
  7. </head>
  8. <body>
  9. <div class="wrap js-check-wrap">
  10. <ul class="nav nav-tabs">
  11. <li><a href="{:url('AdminMatchmaker/index')}">红娘管理</a></li>
  12. <li><a href="{:url('AdminMatchmaker/add')}">添加红娘</a></li>
  13. <li class="active"><a href="javascript:void(0)">编辑红娘</a></li>
  14. </ul>
  15. <form action="{:url('AdminMatchmaker/editPost')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
  16. <input type="hidden" name="post[id]" value="{$post.id}">
  17. <div class="row">
  18. <div class="col-md-9">
  19. <table class="table table-bordered">
  20. <tr>
  21. <th>姓名<span class="form-required">*</span></th>
  22. <td>
  23. <input class="form-control" type="text" name="post[name]"
  24. id="name" required value="{$post.name}" placeholder="请输入姓名"/>
  25. </td>
  26. </tr>
  27. <tr>
  28. <th>手机号<span class="form-required">*</span></th>
  29. <td>
  30. <input class="form-control" type="text" name="post[mobile]"
  31. id="mobile" required value="{$post.mobile}" placeholder="请输入手机号"/>
  32. </td>
  33. </tr>
  34. <tr>
  35. <th>密码<span class="form-required">*</span></th>
  36. <td>
  37. <input class="form-control" type="text" name="post[password]"
  38. id="password" required value="{$post.password}" placeholder="请输入密码"/>
  39. </td>
  40. </tr>
  41. </table>
  42. <div class="form-group">
  43. <div class="col-sm-offset-2 col-sm-10">
  44. <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('EDIT')}</button>
  45. <a class="btn btn-default" href="{:url('AdminMatchmaker/index')}">{:lang('BACK')}</a>
  46. </div>
  47. </div>
  48. </div>
  49. <div class="col-md-3">
  50. <table class="table table-bordered">
  51. <tr>
  52. <th><b>主图</b></th>
  53. </tr>
  54. <tr>
  55. <td>
  56. <div style="text-align: center;">
  57. <input type="hidden" name="post[avatar]" id="thumbnail"
  58. value="{$post.avatar|default=''}">
  59. <a href="javascript:uploadOneImage('图片上传','#thumbnail');">
  60. <if condition="empty($post.avatar)">
  61. <img src="__TMPL__/public/assets/images/default-thumbnail.png"
  62. id="thumbnail-preview"
  63. width="135" style="cursor: pointer"/>
  64. <else/>
  65. <img src="{:cmf_get_image_preview_url($post.avatar)}"
  66. id="thumbnail-preview"
  67. width="135" style="cursor: pointer"/>
  68. </if>
  69. </a>
  70. <input type="button" class="btn btn-sm btn-cancel-thumbnail" value="取消图片">
  71. </div>
  72. </td>
  73. </tr>
  74. </table>
  75. </div>
  76. </div>
  77. </form>
  78. </div>
  79. <script type="text/javascript" src="__STATIC__/js/admin.js"></script>
  80. <script type="text/javascript">
  81. $(function () {
  82. $('.btn-cancel-thumbnail').click(function () {
  83. $('#thumbnail-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
  84. $('#thumbnail').val('');
  85. });
  86. });
  87. </script>
  88. </body>
  89. </html>