add.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <include file="public@header"/>
  2. </head>
  3. <body>
  4. <div class="wrap js-check-wrap">
  5. <ul class="nav nav-tabs">
  6. <li><a href="{:url('user/adminIndex/index')}">{:lang('USER_INDEXADMIN_INDEX')}</a></li>
  7. <li class="active"><a>新增会员</a></li>
  8. </ul>
  9. <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('user/adminIndex/add_post')}">
  10. <fieldset>
  11. <div class="form-group">
  12. <label for="input-maintain_switch" class="col-sm-2 control-label"><span class="form-required">*</span>选择国家/地区</label>
  13. <div class="col-md-6 col-sm-10">
  14. <select class="form-control" name="country_code">
  15. <option value="">--选择国家/地区--</option>
  16. <foreach name="country_list" item="vo">
  17. <option value="{$vo['tel']}">{$vo['name']}</option>
  18. </foreach>
  19. </select>
  20. </div>
  21. </div>
  22. <div class="form-group" >
  23. <label for="input-user_login" class="col-sm-2 control-label"><span class="form-required">*</span>手机号</label>
  24. <div class="col-md-6 col-sm-10">
  25. <input type="text"class="form-control" id="input-user_login" name="user_login" value="">
  26. </div>
  27. </div>
  28. <div class="form-group" style="display: none;">
  29. <label for="input-user_login" class="col-sm-2 control-label"><span class="form-required">*</span>密码</label>
  30. <div class="col-md-6 col-sm-10">
  31. <input type="password" class="form-control" id="input-user_pass" name="user_pass" value="qwe123" autocomplete = 'new-password' />
  32. </div>
  33. </div>
  34. <div class="form-group" >
  35. <label for="input-user_nicename" class="col-sm-2 control-label"><span class="form-required">*</span>昵称</label>
  36. <div class="col-md-6 col-sm-10">
  37. <input type="text"class="form-control" id="input-user_nicename" name="user_nicename" value="" maxlength="8"> <p class="help-block">最多8个字</p>
  38. </div>
  39. </div>
  40. <div class="form-group">
  41. <label for="input-avatar" class="col-sm-2 control-label">头像/封面</label>
  42. <div class="col-md-6 col-sm-10">
  43. <input type="hidden" name="avatar" id="thumbewm" value="{$userinfo['avatar']}">
  44. <a href="javascript:uploadOneImage('图片上传','#thumbewm');">
  45. <if condition="$userinfo['avatar'] neq ''">
  46. <img src="{:cmf_get_image_preview_url($userinfo['avatar'])}"
  47. id="thumbewm-preview"
  48. style="cursor: pointer;max-width:150px;max-height:150px;"/>
  49. <else/>
  50. <img src="__TMPL__/public/assets/images/default-thumbnail.png" id="thumbewm-preview" style="cursor: pointer;max-width:150px;max-height:150px;"/>
  51. </if>
  52. </a>
  53. <input type="button" class="btn btn-sm btn-cancel-thumbewm" value="取消图片">
  54. </div>
  55. </div>
  56. <div class="form-group">
  57. <label for="input-bg_img" class="col-sm-2 control-label">背景图</label>
  58. <div class="col-md-6 col-sm-10">
  59. <input type="hidden" name="bg_img" id="bg_img" value="{$userinfo['bg_img']}">
  60. <a href="javascript:uploadOneImage('图片上传','#bg_img');">
  61. <if condition="$userinfo['avatar'] neq ''">
  62. <img src="{:cmf_get_image_preview_url($userinfo['avatar'])}"
  63. id="bg_img-preview"
  64. style="cursor: pointer;max-width:150px;max-height:150px;"/>
  65. <else/>
  66. <img src="__TMPL__/public/assets/images/default-thumbnail.png" id="bg_img-preview" style="cursor: pointer;max-width:150px;max-height:150px;"/>
  67. </if>
  68. </a>
  69. <input type="button" class="btn btn-sm btn-cancel-bg_img" value="取消图片">
  70. <p class="help-block">如果头像上传背景图没上传,默认赋值头像;如果头像和背景图都没上传,赋值平台默认头像</p>
  71. </div>
  72. </div>
  73. <div class="form-group">
  74. <label for="input-sex" class="col-sm-2 control-label"><span class="form-required">*</span>性别</label>
  75. <div class="col-md-6 col-sm-10">
  76. <label class="radio-inline"><input type="radio" name="sex" value="1" checked>男</label>
  77. <label class="radio-inline"><input type="radio" name="sex" value="2" >女</label>
  78. </div>
  79. </div>
  80. <div class="form-group">
  81. <label for="input-signature" class="col-sm-2 control-label">个性签名</label>
  82. <div class="col-md-6 col-sm-10">
  83. <textarea class="form-control" rows="2" cols="20" id="input-signature" name="signature" style="height: 100px; width: 500px;" ></textarea>
  84. </div>
  85. </div>
  86. <div class="form-group">
  87. <label for="input-user_status" class="col-sm-2 control-label"><span class="form-required">*</span>{:lang('STATUS')}</label>
  88. <div class="col-md-6 col-sm-10">
  89. <label class="radio-inline"><input type="radio" name="user_status" value="1" checked="checked" >{:lang('ENABLED')}</label>
  90. <label class="radio-inline"><input type="radio" name="user_status" value="0" />{:lang('DISABLED')}</label>
  91. </div>
  92. </div>
  93. </fieldset>
  94. <div class="form-group">
  95. <div class="col-sm-offset-2 col-sm-10">
  96. <button type="submit" class="btn btn-primary js-ajax-submit">添加</button>
  97. <a class="btn btn-default" href="{:url('user/adminIndex/index')}">{:lang('BACK')}</a>
  98. </div>
  99. </div>
  100. </form>
  101. </div>
  102. <script src="__STATIC__/js/admin.js"></script>
  103. <script type="text/javascript">
  104. (function(){
  105. $('.btn-cancel-thumbewm').click(function () {
  106. $('#thumbewm-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
  107. $('#thumbewm').val('');
  108. });
  109. $('.btn-cancel-bg_img').click(function () {
  110. $('#bg_img-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
  111. $('#bg_img').val('');
  112. });
  113. })()
  114. </script>
  115. </body>
  116. </html>