create.html 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. {template 'common/header'}
  2. <div class="new-keyword">
  3. <ol class="breadcrumb we7-breadcrumb">
  4. <a href="{url 'user/display'}"><i class="wi wi-back-circle"></i> </a>
  5. <li><a href="{url 'user/display'}">用户管理</a></li>
  6. <li>添加用户</li>
  7. </ol>
  8. <form action="" class="we7-form" method="post" id="js-user-create" ng-controller="UserCreate" ng-cloak>
  9. <div class="form-group">
  10. <label for="" class="control-label col-sm-2">用户名</label>
  11. <div class="form-controls col-sm-8">
  12. <input type="text" name="username" id="username" ng-style="{'width': '600px'}" class="form-control" ng-model="user.username" placeholder="" autocomplete="off">
  13. <div class="help-block">请输入用户名,用户名为 3 到 30 个字符组成,包括汉字,大小写字母(不区分大小写)</div>
  14. </div>
  15. </div>
  16. <div class="form-group">
  17. <label for="" class="control-label col-sm-2">密码</label>
  18. <div class="form-controls col-sm-8">
  19. <input type="text" value="" class="hidden"/>
  20. <input type="text" name="password" id="password" ng-style="{'width': '600px'}" class="form-control" ng-model="user.password" placeholder="" autocomplete="off" ng-focus="changeType($event)">
  21. <div class="help-block">请填写密码,最小长度为 8 个字符</div>
  22. </div>
  23. </div>
  24. <div class="form-group">
  25. <label for="" class="control-label col-sm-2">确认密码</label>
  26. <div class="form-controls col-sm-8">
  27. <input type="text" name="repassword" id="repassword" ng-style="{'width': '600px'}" class="form-control" ng-model="user.repassword" placeholder="" autocomplete="off" ng-focus="changeType($event)">
  28. <div class="help-block">重复输入密码,确认正确输入</div>
  29. </div>
  30. </div>
  31. <div class="form-group">
  32. <label for="" class="control-label col-sm-2">到期时间</label>
  33. <div class="form-controls col-sm-8" ng-init="endtype = 2">
  34. <div class="form-group">
  35. <input type="radio" id="endtype-2" ng-click="endtype = 2" ng-checked="endtype == 2">
  36. <label class="radio-inline" for="endtype-2">永久</label>
  37. <input type="radio" id="endtype-1" ng-click="endtype = 1" ng-checked="endtype == 1">
  38. <label class="radio-inline" for="endtype-1">设置期限</label>
  39. <div ng-if="endtype == 1" class="we7-margin-top">
  40. {php echo tpl_form_field_date('endtime');}
  41. </div>
  42. <div class="help-block">用户的使用时间过期时,将无法使用系统功能。</div>
  43. </div>
  44. </div>
  45. </div>
  46. <div class="form-group">
  47. <label for="" class="control-label col-sm-2">所属用户组</label>
  48. <div class="form-controls col-sm-8">
  49. <select name="groupid" class="we7-select" id="groupid">
  50. <option value="0">请选择所属用户组</option>
  51. <option ng-repeat="group in groups" ng-value="group.id" ng-bind="group.name"></option>
  52. </select>
  53. <span class="help-block"> 分配用户所属用户组后,该用户会自动拥有此用户组内的模块操作权限</span>
  54. <span class="help-block"><strong class="text-danger">设置用户组后,系统会根据对应用户组的服务期限对用户的服务开始时间和结束时间进行初始化</strong></span>
  55. </div>
  56. </div>
  57. <div class="form-group account-package-extra" style="display:none;">
  58. <span class="control-label col-sm-2">应用权限:</span>
  59. <span class="js-extra-modules control-label col-sm-2" ></span>
  60. </div>
  61. <div class="form-group account-package-extra" style="display:none;">
  62. <span class="control-label col-sm-2">模板权限:</span>
  63. <span class="js-extra-templates"></span>
  64. </div>
  65. <div class="form-group">
  66. <label for="" class="control-label col-sm-2">其他权限</label>
  67. <td class="form-controls col-sm-8">
  68. <span class="btn btn-primary" data-toggle="modal" data-target="#jurisdiction-add">添加权限</span>
  69. </td>
  70. </div>
  71. {if permission_check_account_user('see_user_create_own_vice_founder')}
  72. <div class="form-group">
  73. <label for="" class="control-label col-sm-2">所属副创始人</label>
  74. <div class="form-controls col-sm-8">
  75. <input type="text" name="vice_founder_name" id="vice_founder" ng-style="{'width': '200px'}" class="form-control" ng-model="user.vice_founder_name" placeholder="" autocomplete="off">
  76. <div class="help-block">请输入副创始人姓名</div>
  77. </div>
  78. </div>
  79. {/if}
  80. <div class="form-group">
  81. <label for="" class="control-label col-sm-2">备注</label>
  82. <div class="form-controls col-sm-8">
  83. <textarea name="remark" rows="6" class="form-control" ng-style="{'width': '600px'}" ng-bind="user.remark" placeholder="方便注明此用户的身份"></textarea>
  84. </div>
  85. </div>
  86. <input type="submit" name="submit" id="" value="提交" class="btn btn-primary" ng-click="checkSubmit($event)" ng-style="{'padding': '6px 50px'}"/>
  87. <input type="hidden" name="token" value="{$_W['token']}" />
  88. <input type="hidden" name="do" value="{$_GPC['do']}" />
  89. <!-- 添加应用模态框 -->
  90. <div class="modal" id="jurisdiction-add">
  91. <div class="modal-dialog we7-modal-dialog">
  92. <div class="modal-content">
  93. <div class="modal-header">
  94. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  95. <ul role="tablist" class="nav nav-pills">
  96. <li class="active"><a class="we7-padding-horizontal" data-toggle="tab" role="tab" aria-controls="content-modules" href="#content-modules">模块</a></li>
  97. <li><a class="we7-padding-horizontal" data-toggle="tab" role="tab" aria-controls="content-templates" href="#content-templates">模板</a></li>
  98. </ul>
  99. </div>
  100. <div class="modal-body">
  101. <div class="tab-content">
  102. <div id="content-modules" class="tab-pane active" role="tabpanel">
  103. <table class="table we7-table table-hover vertical-middle">
  104. <col width="280px">
  105. <col width="220px">
  106. <col />
  107. <tr>
  108. <th>模块名称</th>
  109. <th>模块标识</th>
  110. <th></th>
  111. </tr>
  112. {loop $modules $module}
  113. <tr>
  114. <td>{$module['title']}{if $module['issystem']}<span class="label label-success">系统模块</span>{/if}</td>
  115. <td>{$module['name']}</td>
  116. <td><a class="btn btn-default js-btn-select {if is_array($extend['modules']) && in_array($module['name'], $extend['modules'])}btn-primary{/if}" data-title="{$module['title']}" data-name="{$module['name']}" onclick="$(this).toggleClass('btn-primary')">选取</a></td>
  117. </tr>
  118. {/loop}
  119. </table>
  120. </div>
  121. <div id="content-templates" class="tab-pane" role="tabpanel">
  122. <table class="table we7-table table-hover vertical-middle">
  123. <col width="280px">
  124. <col width="220px">
  125. <col />
  126. <tr>
  127. <th>模板名称</th>
  128. <th>模板标识</th>
  129. <th></th>
  130. </tr>
  131. {loop $templates $temp}
  132. <tr>
  133. <td>{$temp['title']}</td>
  134. <td>{$temp['name']}</td>
  135. <td><a class="btn btn-default js-btn-select {if is_array($extend['templates']) && in_array($temp['id'], $extend['templates'])}btn-primary{/if}" data-title="{$temp['title']}" data-name="{$temp['id']}" onclick="$(this).toggleClass('btn-primary')">选取</a></td>
  136. </tr>
  137. {/loop}
  138. </table>
  139. </div>
  140. </div>
  141. </div>
  142. <div class="modal-footer">
  143. <button type="button" class="btn btn-primary" ng-click="addPermission()">确定</button>
  144. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  145. </div>
  146. </div>
  147. </div>
  148. </div>
  149. </form>
  150. </div>
  151. <script type="text/javascript">
  152. angular.module('userManageApp').value('config', {
  153. groups: {php echo !empty($groups) ? json_encode($groups) : 'null'},
  154. });
  155. angular.bootstrap($('#js-user-create'), ['userManageApp']);
  156. </script>
  157. {template 'common/footer'}