add.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. {extend name="common/common2" /}
  2. {block name="main"}
  3. <div class="row">
  4. <div class="col-sm-12">
  5. <div class="ibox float-e-margins">
  6. <div class="ibox-title">
  7. <h5>{$title}</h5>
  8. <div class="ibox-tools">
  9. <a class="toback" href="{:url('index')}">
  10. 返回上一页
  11. </a>
  12. </div>
  13. </div>
  14. <div class="ibox-content">
  15. <form method="post" action="{:url('add')}" class="form-horizontal">
  16. <input type="hidden" name="id" value="{$info['id']|default='0'}">
  17. <div class="form-group">
  18. <label class="col-sm-2 control-label">服务名称<span class="text-danger">*</span></label>
  19. <div class="col-sm-6">
  20. <select name="service_id" class="form-control">
  21. <option value="">请选择</option>
  22. {volist name="service" id="i"}
  23. <option value="{$i['id']|default=''}">{$i['title']}</option>
  24. {/volist}
  25. </select>
  26. </div>
  27. </div>
  28. <div class="form-group">
  29. <label class="col-sm-2 control-label">日期<span class="text-danger">*</span></label>
  30. <div class="col-sm-6">
  31. {:widget_view('common/datepicker',['name'=>'day', 'val' => isset($info['day'])?$info['day']:''])}
  32. </div>
  33. </div>
  34. <div class="form-group">
  35. <label class="col-sm-2 control-label">开始时间<span class="text-danger">*</span></label>
  36. <div class="col-sm-6">
  37. {:widget_view('common/datehipicker',['name'=>'start', 'val' => isset($info['start'])?$info['start']:''])}
  38. </div>
  39. </div>
  40. <div class="form-group">
  41. <label class="col-sm-2 control-label">结束时间<span class="text-danger">*</span></label>
  42. <div class="col-sm-6">
  43. {:widget_view('common/datehipicker',['name'=>'end', 'val' => isset($info['end'])?$info['end']:''])}
  44. </div>
  45. </div>
  46. {if(isset($info['id']) < 1)}
  47. <div class="form-group">
  48. <label class="col-sm-2 control-label">连续执行天数</label>
  49. <div class="col-sm-6">
  50. <select name="days" class="form-control">
  51. {for start="0" end="31"}
  52. <option value="{$i}">{$i}天</option>
  53. {/for}
  54. </select>
  55. </div>
  56. <i>如果不需要重复设置为0即可</i>
  57. </div>
  58. {/if}
  59. <div class="form-group">
  60. <label class="col-sm-2 control-label">人数<span class="text-danger">*</span></label>
  61. <div class="col-sm-6">
  62. <input type="number" class="form-control" name="limit" value="{$info.limit|default=''}">
  63. </div>
  64. </div>
  65. <div class="form-group">
  66. <label class="col-sm-2 control-label">状态</label>
  67. <div class="col-sm-6">
  68. <label class="cr-inline">
  69. <input type="radio" value="1" name="enable">正常&nbsp;&nbsp;
  70. </label>
  71. <label class="cr-inline">
  72. <input type="radio" value="0" name="enable">禁用
  73. </label>
  74. </div>
  75. </div>
  76. <div class="hr-line-dashed"></div>
  77. <div class="form-group">
  78. <div class="col-sm-6 col-sm-offset-2">
  79. <button class="btn btn-primary ajax-post" target-form="form-horizontal" type="submit">确 定</button>
  80. <a href="{:url('index')}" class="btn btn-default">取 消</a>
  81. </div>
  82. </div>
  83. </form>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. {/block}
  89. {block name="script"}
  90. <script>
  91. $(document).ready(function(){
  92. formSetValue("enable", {$info.enable|default=1});
  93. });
  94. $(document).ready(function(){
  95. formSetValue("service_id", {$info.service_id|default=''});
  96. });
  97. </script>
  98. {/block}