field_edit_form.inc.php 4.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <div class="mb-3 row" >
  2. <label class="col-md-2 col-form-label" >存储格式</label>
  3. <div class=" col-md-10">
  4. <ul class="list-group">
  5. <li class='list-group-item'>
  6. <div class='form-check'>
  7. <input type='radio' name='setting[save_format]' value='date' class='form-check-input' <?php if(isset($setting['save_format'])&&$setting['save_format']=='date') echo 'checked';?>>
  8. <label class='form-check-label'>日期(<?php echo date('Y-m-d');?>)</label>
  9. </div>
  10. </li>
  11. <li class='list-group-item'>
  12. <div class='form-check'>
  13. <input type='radio' name='setting[save_format]' value='datetime' class='form-check-input' <?php if(isset($setting['save_format'])&&$setting['save_format']=='datetime') echo 'checked';?>>
  14. <label class='form-check-label'>日期+24小时制时间(<?php echo date('Y-m-d H:i:s');?>)</label>
  15. </div>
  16. </li>
  17. <li class='list-group-item'>
  18. <div class='form-check'>
  19. <input type='radio' name='setting[save_format]' value='int' class='form-check-input' <?php if(isset($setting['save_format'])&&$setting['save_format']=='int') echo 'checked';?>>
  20. <label class='form-check-label'>整数时间戳</label>
  21. </div>
  22. </li>
  23. </ul>
  24. </div>
  25. </div>
  26. <div class="mb-3 row">
  27. <label class="col-md-2 col-form-label" >显示格式</label>
  28. <div class="col-md-10">
  29. <select class="form-select " name="setting[show_format]" >
  30. <option value="Y-m-d H:i:s" <?php if(isset($setting['show_format'])&&$setting['show_format']=='Y-m-d H:i:s') echo 'selected';?>>24小时制:<?php echo date('Y-m-d H:i:s');?></option>
  31. <option value="Y-m-d H:i" <?php if(isset($setting['show_format'])&&$setting['show_format']=='Y-m-d H:i') echo 'selected';?>><?php echo date('Y-m-d H:i');?></option>
  32. <option value="Y-m-d" <?php if(isset($setting['show_format'])&&$setting['show_format']=='Y-m-d') echo 'selected';?>><?php echo date('Y-m-d');?></option>
  33. <option value="m-d" <?php if(isset($setting['show_format'])&&$setting['show_format']=='m-d') echo 'selected';?>><?php echo date('m-d');?></option>
  34. </select>
  35. </div>
  36. </div>
  37. <div class="mb-3 row">
  38. <label class="col-md-2 col-form-label" >动态限制</label>
  39. <div class="col-md-10">
  40. <select class="form-select " name="setting[dynamic]" >
  41. <option value="">请选择</option>
  42. <option value="1" <?php if(isset($setting['dynamic'])&&$setting['dynamic']==1) echo 'selected';?>>今天以前的日期(包括今天)</option>
  43. <option value="2" <?php if(isset($setting['dynamic'])&&$setting['dynamic']==2) echo 'selected';?>>今天以后的日期(不包括今天)</option>
  44. <option value="3" <?php if(isset($setting['dynamic'])&&$setting['dynamic']==3) echo 'selected';?>>本月的日期1号至本月最后一天</option>
  45. </select>
  46. </div>
  47. </div>
  48. <div class="mb-3 row">
  49. <label class="col-md-2 col-form-label">静态限制</label>
  50. <div class="row col-md-10">
  51. <div class="col-sm-auto ">
  52. <label class="visually-hidden" >请输入</label>
  53. <input type="date" class="form-control" name="setting[min_date]" placeholder="起始日期" autocomplete="off" value="<?php echo isset($setting['min_date'])?$setting['min_date']:'';?>">
  54. </div>
  55. <div class="col-sm-auto">
  56. <label class="visually-hidden" >终止日期</label>
  57. <input type="date" class="form-control" name="setting[max_date]" placeholder="终止日期" autocomplete="off" value="<?php echo isset($setting['max_date'])?$setting['max_date']:'';?>">
  58. </div>
  59. <div class="text-muted input-word-aux"></div>
  60. </div>
  61. </div>
  62. <div class="mb-3 row" style="display: none">
  63. <label class="col-md-2 col-form-label" >控件Id</label>
  64. <div class="col-md-10">
  65. <input type="text" name="setting[input_id]" value="<?php echo isset($setting['input_id'])?$setting['input_id']:'';?>" autocomplete="off" class="form-control" >
  66. </div>
  67. </div>
  68. <div class="mb-3 row" style="display: none">
  69. <label class="col-md-2 col-form-label" >控件Name</label>
  70. <div class="col-md-10">
  71. <input type="text" name="setting[input_name]" value="<?php echo isset($setting['input_name'])?$setting['input_name']:'';?>" autocomplete="off" class="form-control" >
  72. </div>
  73. </div>
  74. <div class="mb-3 row" >
  75. <label class="col-md-2 col-form-label" >输入框只读</label>
  76. <div class=" col-md-10">
  77. <input value="1" id="switch-read_only" type="checkbox" switch="success" class="row-switch" name="setting[read_only]" <?php if(isset($setting['read_only'])&&$setting['read_only']) echo 'checked';?>>
  78. <label class="switch-check-label " for="switch-read_only" data-on-label="是" data-off-label="否"></label>
  79. </div>
  80. </div>