人人商城

fields.html 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. {template 'common/header'}
  2. <div class="we7-page-title">会员管理</div>
  3. {template 'mc/common'}
  4. {if $do == 'list'}
  5. <form action="" method="post">
  6. <div class="panel panel-default">
  7. <div class="panel-heading">
  8. 字段管理
  9. </div>
  10. <div class="panel-body table-responsive">
  11. <table class="table table-hover">
  12. <thead class="navbar-inner">
  13. <tr>
  14. <th>排序</th>
  15. <th>字段</th>
  16. <th>标题</th>
  17. <th>是否启用</th>
  18. <th>操作</th>
  19. </tr>
  20. </thead>
  21. <tbody>
  22. {loop $account_member_fields $field}
  23. <tr>
  24. <td>
  25. <input type="text" class="form-control" style="width: 50%;" name="displayorder[{$field['fieldid']}]" value="{$field['displayorder']}" />
  26. <input type="hidden" name="id[{$field['fieldid']}]" value="{$field['id']}" />
  27. <input type="hidden" name="fieldid[{$field['fieldid']}]" value="{$field['fieldid']}" />
  28. <input type="hidden" name="title[{$field['fieldid']}]" value="{$field['title']}" />
  29. </td>
  30. <td>{$field['field']}</td>
  31. <td>{$field['title']}</td>
  32. <td>
  33. <input type="checkbox" name="available[{$field['fieldid']}]" value="1" {if $field['available']} checked {/if} />
  34. </td>
  35. <td>
  36. {if !empty($field['id'])}
  37. <a href="{php echo url('mc/fields/post', array('id' => $field['id']))}" title="编辑" class="btn btn-primary btn-sm">编辑</a>
  38. {/if}
  39. </td>
  40. </tr>
  41. {/loop}
  42. <tr>
  43. <td></td>
  44. <td></td>
  45. <td></td>
  46. <td>
  47. <input type="checkbox" id="selectAll" onclick="var ck = this.checked;$(':checkbox').each(function(){this.checked = ck});">
  48. <a class="btn btn-success btn-sm" style="margin-left: -25px;" onclick="$('#selectAll').click();">全选</a>
  49. </td>
  50. <td></td>
  51. </tr>
  52. </tbody>
  53. </table>
  54. </div>
  55. <div>
  56. <button type="submit" class="btn btn-primary col-lg-1" name="submit" value="提交">提交</button>
  57. <input type="hidden" name="token" value="{$_W['token']}" />
  58. </div>
  59. </div>
  60. </form>
  61. {elseif $do == 'post'}
  62. <div class="panel panel-default">
  63. <div class="panel-heading">
  64. 编辑字段
  65. </div>
  66. <div class="panel-body">
  67. <form class="form-horizontal form" action="" method="post">
  68. <input type="hidden" name="id" value="{$field['id']}">
  69. <div class="form-group">
  70. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">排序</label>
  71. <div class="col-sm-10 col-xs-12">
  72. <input type="text" class="form-control" name="displayorder" value="{$field['displayorder']}">
  73. </div>
  74. </div>
  75. <div class="form-group">
  76. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">名称</label>
  77. <div class="col-sm-10 col-xs-12">
  78. <input type="text" class="form-control" name="title" value="{$field['title']}">
  79. </div>
  80. </div>
  81. <div class="form-group">
  82. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">启用</label>
  83. <div class="col-sm-10 col-xs-12">
  84. <label for="radio_1" class="radio-inline">
  85. <input type="radio" name="available" id="radio_1" value="1" {if empty($field) || $field['available'] == 1} checked{/if} /> 是
  86. </label>
  87. <label for="radio_0" class="radio-inline">
  88. <input type="radio" name="available" id="radio_0" value="0" {if !empty($field) && $field['available'] == 0} checked{/if} /> 否
  89. </label>
  90. </div>
  91. </div>
  92. <div class="form-group">
  93. <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label"></label>
  94. <div class="col-sm-10 col-xs-12">
  95. <input type="submit" class="btn btn-primary" name="submit" />
  96. <input type="hidden" name="token" value="{$_W['token']}" />
  97. </div>
  98. </div>
  99. </form>
  100. </div>
  101. </div>
  102. {/if}
  103. {template 'common/footer'}