create_user.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <{include file="./admin/header.html"}>
  2. <{include file="./admin/left.html"}>
  3. <{include file="./admin/nav.html"}>
  4. <style>
  5. .rowlabel {
  6. font-weight: 300!important;
  7. }
  8. #create_user_form input {
  9. max-width: 250px;
  10. }
  11. </style>
  12. <{if $errMsg.ok}>
  13. <div class="tip_message_success">创建成功</div>
  14. <{/if}>
  15. <{if !$errMsg.ok && $errMsg.msg}>
  16. <div class="tip_message_fail">创建失败,原因:<{$errMsg.msg}></div>
  17. <{/if}>
  18. <{if !$errMsg || $errMsg.msg}>
  19. <form id="create_user_form" action="<{$web_cfg.domain}>/?c=Admin_BackUser&a=CreateUser" method="post">
  20. <input name="id" type="hidden" value="<{$platformData.id}>">
  21. <div>
  22. <div class="form-group">
  23. <label class="control-label rowlabel">用户名</label>
  24. <input name="name" type="text" class="form-control" value="<{$submitData.name}>">
  25. </div>
  26. <div class="form-group">
  27. <label class="control-label rowlabel">密码</label>
  28. <input name="password" type="password" class="form-control" value="<{$submitData.password}>">
  29. </div>
  30. <div class="form-group">
  31. <label><input name="auto_generate" type="checkbox" value="1" <{if !$submitData || $submitData.auto_generate}>checked<{/if}>> 自动生成密码</label>
  32. </div>
  33. <div class="form-group">
  34. <label class="control-label rowlabel">邮箱</label>
  35. <input name="email" type="text" class="form-control" value="<{$submitData.email}>">
  36. </div>
  37. <div class="form-group">
  38. <label class="control-label rowlabel">部门</label>
  39. <input name="division" type="text" class="form-control" value="<{$submitData.division}>">
  40. </div>
  41. <div>
  42. <button id="add_platform_btn" class="button button-primary button-small">创建</button>
  43. </div>
  44. </div>
  45. </form>
  46. <{/if}>
  47. <{if $errMsg.ok}>
  48. <div>
  49. <div class="form-group">
  50. <label class="control-label rowlabel">用户名:</label>
  51. <{$user.name}>
  52. </div>
  53. <div class="form-group">
  54. <label class="control-label rowlabel">密码:</label>
  55. <{$user.password}>
  56. </div>
  57. <div class="form-group">
  58. <label class="control-label rowlabel">邮箱:</label>
  59. <{$user.email}>
  60. </div>
  61. <div class="form-group">
  62. <label class="control-label rowlabel">部门:</label>
  63. <{$user.division}>
  64. </div>
  65. </div>
  66. <{/if}>
  67. <script>
  68. KISSY.use('node', function (S, Node) {
  69. var $ = S.all;
  70. $('#add_platform_btn').on('click', function () {
  71. var name = $('input[name=name]').val();
  72. if (S.trim(name) == '') {
  73. showError('姓名不能为空');
  74. return false;
  75. }
  76. });
  77. function showError($msg) {
  78. alert($msg);
  79. }
  80. });
  81. </script>
  82. <{include file="./admin/bottom.html"}>