fields.html 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. {template 'common/header'}
  2. {template 'mc/common'}
  3. {if $do == 'list'}
  4. <form action="" method="post">
  5. <div id="js-fields-list" ng-controller="fieldsListCtrl">
  6. <table class="table we7-table table-hover vertical-middle">
  7. <thead class="navbar-inner">
  8. <tr>
  9. <th>排序</th>
  10. <th>字段</th>
  11. <th>标题</th>
  12. <th>是否启用</th>
  13. <th>操作</th>
  14. </tr>
  15. </thead>
  16. <tbody>
  17. <tr ng-repeat="field in account_member_fields">
  18. <td ng-bind="field.displayorder"></td>
  19. <td ng-bind="field.field"></td>
  20. <td ng-bind="field.title"></td>
  21. <td>
  22. <label>
  23. <input name="" class="form-control" type="checkbox" style="display: none;">
  24. <div ng-class="field.available == 1 ? 'switch switchOn' : 'switch'" ng-click="changeAvailable(field.id,field.available,$index)"></div>
  25. </label>
  26. </td>
  27. <td>
  28. <div class="link-group">
  29. <a href="javascript:;" title="编辑" ng-click="jumpTo(field.id)">编辑</a>
  30. </div>
  31. </td>
  32. </tr>
  33. </tbody>
  34. </table>
  35. </div>
  36. </form>
  37. {elseif $do == 'post'}
  38. <ol class="breadcrumb we7-breadcrumb">
  39. <a href="{php echo url('mc/fields/list')}"><i class="wi wi-back-circle"></i> </a>
  40. <li>
  41. <a href="{php echo url('mc/fields/list')}">会员管理</a>
  42. </li>
  43. <li>
  44. 会员字段管理
  45. </li>
  46. </ol>
  47. <form class="we7-form form" action="" method="post">
  48. <input type="hidden" name="id" value="{$field['id']}">
  49. <div class="form-group">
  50. <label class="col-sm-2 control-label">排序</label>
  51. <div class="col-sm-10 col-xs-12">
  52. <input type="text" class="form-control" name="displayorder" value="{$field['displayorder']}">
  53. </div>
  54. </div>
  55. <div class="form-group">
  56. <label class="col-sm-2 control-label">名称</label>
  57. <div class="col-sm-10 col-xs-12">
  58. <input type="text" class="form-control" name="title" value="{$field['title']}">
  59. </div>
  60. </div>
  61. <div class="form-group">
  62. <label class="col-sm-2 control-label">启用</label>
  63. <div class="col-sm-10 col-xs-12">
  64. <input type="radio" name="available" id="radio_1" value="1" {if empty($field) || $field['available'] == 1} checked{/if} />
  65. <label for="radio_1" class="radio-inline">
  66. </label>
  67. <input type="radio" name="available" id="radio_0" value="0" {if !empty($field) && $field['available'] == 0} checked{/if} />
  68. <label for="radio_0" class="radio-inline">
  69. </label>
  70. </div>
  71. </div>
  72. <div class="form-group">
  73. <label class="col-sm-2 control-label"></label>
  74. <div class="col-sm-10 col-xs-12">
  75. <input type="submit" class="btn btn-primary" name="submit" value="提交" />
  76. <input type="hidden" name="token" value="{$_W['token']}" />
  77. </div>
  78. </div>
  79. </form>
  80. {/if}
  81. <script>
  82. angular.module('profileApp').value('config', {
  83. changeAvailableUrl:"{php echo url('mc/fields/change_available')}",
  84. fieldPostUrl:"{php echo url('mc/fields/post')}",
  85. account_member_fields : {php echo json_encode($account_member_fields)}
  86. });
  87. angular.bootstrap($('#js-fields-list'), ['profileApp']);
  88. </script>
  89. {template 'common/footer'}