fields-post.html 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. {template 'common/header'}
  2. <div class="new-keyword">
  3. <ol class="breadcrumb we7-breadcrumb">
  4. <a href="{url 'user/fields/display'}"><i class="wi wi-back-circle"></i> </a>
  5. <li><a href="{url 'user/fields/display'}">用户属性设置</a></li>
  6. <li>编辑字段</li>
  7. </ol>
  8. <div class="we7-form" id="js-field-post" ng-controller="FieldsPost" ng-cloak>
  9. <form action="" method="post">
  10. <input type="hidden" name="id" value="{$item['id']}">
  11. <div class="form-group">
  12. <label for="" class="control-label col-sm-2">字段</label>
  13. <div class="form-controls col-sm-8">
  14. <input type="text" id="" name="field" class="form-control" ng-blur="verifyField()" ng-model="item.field" readonly ng-if="!item" placeholder="请使用字母或数字或下划线组合字段名">
  15. <input type="text" id="" name="field" class="form-control" ng-blur="verifyField()" ng-model="item.field" ng-if="item" placeholder="请使用字母或数字或下划线组合字段名">
  16. </div>
  17. </div>
  18. <div class="form-group">
  19. <label for="" class="control-label col-sm-2">字段长度</label>
  20. <div class="form-controls col-sm-8">
  21. <select name="length" >
  22. <option value="64">64</option>
  23. <option value="128" ng-selected="item.field_length == 128">128</option>
  24. <option value="255" ng-selected="item.field_length == 255">255</option>
  25. </select>
  26. </div>
  27. </div>
  28. <div class="form-group">
  29. <label for="" class="control-label col-sm-2">排序</label>
  30. <div class="form-controls col-sm-8">
  31. <input type="text" name="displayorder" class="form-control" ng-model="item.displayorder">
  32. </div>
  33. </div>
  34. <div class="form-group">
  35. <label for="" class="control-label col-sm-2">名称</label>
  36. <div class="form-controls col-sm-8">
  37. <input type="text" id="" name="title" class="form-control" ng-model="item.title">
  38. </div>
  39. </div>
  40. <div class="form-group">
  41. <label for="" class="control-label col-sm-2">描述</label>
  42. <div class="form-controls col-sm-8">
  43. <textarea name="description" rows="4" class="form-control" ng-bind="item.description"></textarea>
  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. <input type="radio" name="available" id="radio-1" value="1" ng-checked="available">
  50. <label for="radio-1">是</label>
  51. <input type="radio" name="available" id="radio-2" value="0" ng-checked="!available">
  52. <label for="radio-2">否</label>
  53. <span class="help-block"></span>
  54. </div>
  55. </div>
  56. <div class="form-group">
  57. <label for="" class="control-label col-sm-2">是否必填</label>
  58. <div class="form-controls col-sm-8">
  59. <input id='radio-3' type="radio" name="required" value="1" ng-checked="required">
  60. <label for="radio-3">是</label>
  61. <input id='radio-4' type="radio" name="required" value="0" ng-checked="!required">
  62. <label for="radio-4">否</label>
  63. <span class="help-block"></span>
  64. </div>
  65. </div>
  66. <div class="form-group">
  67. <label for="" class="control-label col-sm-2">提交后不可修改</label>
  68. <div class="form-controls col-sm-8">
  69. <input id='radio-5' type="radio" name="unchangeable" value="1" ng-checked="unchangeable">
  70. <label for="radio-5">是</label>
  71. <input id='radio-6' type="radio" name="unchangeable" value="0" ng-checked="!unchangeable">
  72. <label for="radio-6">否</label>
  73. <span class="help-block"></span>
  74. </div>
  75. </div>
  76. <div class="form-group">
  77. <label for="" class="control-label col-sm-2">在注册页面显示</label>
  78. <div class="form-controls col-sm-8">
  79. <input id='radio-7' type="radio" name="showinregister" value="1" ng-checked="showinregister">
  80. <label for="radio-7">是</label>
  81. <input id='radio-8' type="radio" name="showinregister" value="0" ng-checked="!showinregister">
  82. <label for="radio-8">否</label>
  83. <span class="help-block"></span>
  84. </div>
  85. </div>
  86. <div class="col-sm-offset-2">
  87. <input type="submit" name="submit" value="保存" class="btn btn-primary" ng-style="{'padding': '6px 50px'}"/>
  88. <input type="hidden" name="token" value="{$_W['token']}" />
  89. </div>
  90. </form>
  91. </div>
  92. </div>
  93. <script>
  94. angular.module('userManageApp').value('config', {
  95. item: {php echo json_encode((array)$item)},
  96. });
  97. angular.bootstrap($('#js-field-post'), ['userManageApp']);
  98. </script>
  99. {template 'common/footer'}