edit.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <{include file='../public/admin_header.html'}>
  2. <{include file='../public/admin_navi.html'}>
  3. <!-- Right side column. Contains the navbar and content of the page -->
  4. <aside class="right-side">
  5. <!-- Content Header (Page header) -->
  6. <section class="content-header">
  7. <h1>
  8. 编辑客户信息
  9. <small>Control panel</small>
  10. </h1>
  11. <ol class="breadcrumb">
  12. <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
  13. <li class="active">Blank page</li>
  14. </ol>
  15. </section>
  16. <!-- Main content -->
  17. <section class="content">
  18. <div class="span9">
  19. <{if $info}>
  20. <div class="alert alert-danger alert-dismissable"><{$info}></div>
  21. <{/if}>
  22. <div id='main' class="form-actions">
  23. <form method="post" action="" id="update_customer">
  24. <input type="hidden" name="id" value="<{$id}>" />
  25. <table class="table table-bordered" style="margin-top:15px;">
  26. <tr>
  27. <td>客户名</td>
  28. <td>
  29. <input type="text" name="username" class="form-control" style="width:450px;" value="<{$one_info.uname}>" />
  30. </td>
  31. </tr>
  32. <tr>
  33. <td>手机号</td>
  34. <td>
  35. <input type="text" name="tel" id="tel" class="form-control" style="width:450px;" value="<{$one_info.tel}>" />
  36. </td>
  37. </tr>
  38. <tr>
  39. <td>所属分组</td>
  40. <td>
  41. <select name="group_name" style="width:450px;" id="group_name">
  42. <option value="0">请选择</option>
  43. <{foreach from=$group_list item=item}>
  44. <option value="<{$item.name}>" <{if $one_info.group_name==$item.name}>selected<{/if}> ><{$item.name}></option>
  45. <{/foreach}>
  46. </select>
  47. <span style="color:red;">所属分组必选</span>
  48. </td>
  49. </tr>
  50. <tr>
  51. <td>国家</td>
  52. <td>
  53. <input type="text" name="country" class="form-control" style="width:450px;" value="<{$one_info.country}>" />
  54. </td>
  55. </tr>
  56. <tr>
  57. <td>&nbsp;</td>
  58. <td >
  59. <input onclick="to_submit();" type="button" value="提交" class="btn btn-info" style="width:120px;" />
  60. </td>
  61. </tr>
  62. </table>
  63. </form>
  64. </div>
  65. </div>
  66. </section><!-- /.content -->
  67. </aside><!-- /.right-side -->
  68. </div><!-- ./wrapper -->
  69. <style>
  70. select{height:30px;}
  71. .form-actions li{list-style:none;width:25px;float:left;padding-bottom:8px;padding-right:5px;}
  72. </style>
  73. <script>
  74. $('#treeview9').addClass('active');
  75. $(".customer_list_left").addClass('active');
  76. function to_submit(){
  77. var tel = $('#tel').val();
  78. var group_name = $('#group_name').val();
  79. if(tel=='' || group_name==0){
  80. alert("邮箱和用户分组为必填项");
  81. }else{
  82. $('#update_customer').submit();
  83. }
  84. }
  85. </script>
  86. </body>
  87. </html>