人人商城

fields-display.html 2.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. {template 'common/header'}
  2. {template 'user/user-header'}
  3. <div class="clearfix we7-margin-bottom">
  4. <form action="" method="get">
  5. <input type="hidden" name="c" value="user">
  6. <input type="hidden" name="a" value="fields">
  7. <div class="input-group pull-left col-sm-4">
  8. <input type="text" name="keyword" id="" value="{$_GPC['keyword']}" class="form-control" placeholder="请输入标题"/>
  9. <span class="input-group-btn"><button class="btn btn-default"><i class="fa fa-search"></i></button></span>
  10. </div>
  11. </form>
  12. <div class="pull-right">
  13. <a href="{url 'user/fields/post'}" class="btn btn-primary">+添加字段</a>
  14. </div>
  15. </div>
  16. <form action="" method="post" id="js-fields-display" ng-controller="FieldsDisplay" ng-cloak>
  17. <table class="table we7-table table-hover vertical-middle">
  18. <col width="100px"/>
  19. <col />
  20. <col />
  21. <col />
  22. <col />
  23. <col />
  24. <tr>
  25. <th >排序</th>
  26. <th class="text-left">字段名</th>
  27. <th>标题</th>
  28. <th>是否启用</th>
  29. <th>注册页显示</th>
  30. <th>是否必填</th>
  31. <th class="text-right">操作</th>
  32. </tr>
  33. <tr ng-repeat="field in fields">
  34. <td><input type="text" class="form-control" name="displayorder[{{field.id}}]" ng-model="field.displayorder"></td>
  35. <td class="text-left" ng-bind="field.field"></td>
  36. <td ng-bind="field.title"></td>
  37. <td>
  38. <div class="we7-form">
  39. <input id='check-{{field.id}}' type="checkbox" value="1" name='available[{{field.id}}]' ng-checked="field.available == 1">
  40. <label for="check-{{field.id}}">&nbsp;</label>
  41. </div>
  42. </td>
  43. <td>
  44. <div class="we7-form">
  45. <input id='regist-check-{{field.id}}' type="checkbox" value="1" name='showinregister[{{field.id}}]' ng-checked="field.showinregister == 1">
  46. <label for="regist-check-{{field.id}}">&nbsp;</label>
  47. </div>
  48. </td>
  49. <td>
  50. <div class="we7-form">
  51. <input id='require-check-{{field.id}}' type="checkbox" value="1" name='required[{{field.id}}]' ng-checked='field.required == 1'>
  52. <label for="require-check-{{field.id}}">&nbsp;</label>
  53. </div>
  54. </td>
  55. <td>
  56. <div class="link-group">
  57. <a ng-href="{{links.fieldPost}}id={{field.id}}">编辑</a>
  58. </div>
  59. </td>
  60. </tr>
  61. </table>
  62. <button type="submit" class="btn btn-primary" name="submit" value="submit" ng-style="{'padding': '6px 50px'}">保存</button>
  63. <input type="hidden" name="token" value="{$_W['token']}" />
  64. </form>
  65. <script>
  66. angular.module('userManageApp').value('config', {
  67. fields: {php echo !empty($fields) ? json_encode($fields) : 'null'},
  68. links: {
  69. fieldPost: "{php echo url('user/fields/post')}",
  70. },
  71. });
  72. angular.bootstrap($('#js-fields-display'), ['userManageApp']);
  73. </script>
  74. {template 'common/footer'}