add.html 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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-content">
  7. <form method="post" action="{:url('add')}" class="form-horizontal">
  8. <input type="hidden" name="id" value="{$info['id']|default='0'}">
  9. <div class="form-group">
  10. <label class="col-sm-2 control-label">名称<span class="text-danger">*</span></label>
  11. <div class="col-sm-6">
  12. <input type="text" class="form-control" name="title" value="{$info.title|default=''}">
  13. </div>
  14. </div>
  15. <div class="form-group">
  16. <label class="col-sm-2 control-label">课件<span class="text-danger">*</span></label>
  17. <div class="col-sm-6">
  18. <select name="kj_id" class="form-control">
  19. {foreach $kj as $k=>$v}
  20. <option value="{$v['id']}">{$v['title']}</option>
  21. {/foreach}
  22. </select>
  23. </div>
  24. </div>
  25. <div class="form-group">
  26. <label class="col-sm-2 control-label">开始时间<span class="text-danger">*</span></label>
  27. <div class="col-sm-6">
  28. <input type="text" class="form-control" id="start" readonly name="start" value="{$info.start|default=''}">
  29. </div>
  30. </div>
  31. <div class="form-group">
  32. <label class="col-sm-2 control-label">结束时间<span class="text-danger">*</span></label>
  33. <div class="col-sm-6">
  34. <input type="text" class="form-control" id="end" readonly name="end" value="{$info.end|default=''}">
  35. </div>
  36. </div>
  37. <div class="form-group">
  38. <label class="col-sm-2 control-label">状态</label>
  39. <div class="col-sm-6">
  40. <label class="cr-inline">
  41. <input type="radio" value="1" name="enable">正常&nbsp;&nbsp;
  42. </label>
  43. <label class="cr-inline">
  44. <input type="radio" value="0" name="enable">禁用
  45. </label>
  46. </div>
  47. </div>
  48. <div class="hr-line-dashed"></div>
  49. <div class="form-group">
  50. <div class="col-sm-6 col-sm-offset-2">
  51. <button class="btn btn-primary ajax-post" data-layer="1" target-form="form-horizontal" type="submit">确 定</button>
  52. <button class="btn cancel-btn btn-default" type="button">取 消</button>
  53. </div>
  54. </div>
  55. </form>
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. {/block}
  61. {block name="script"}
  62. <script src="/static/layDate-v5.0.9/laydate.js"></script>
  63. <script>
  64. laydate.render({
  65. elem: '#start',
  66. trigger: 'click' ,
  67. theme: '#284a94',
  68. type:'datetime',
  69. format:"yyyy-MM-dd HH:mm:ss"
  70. });
  71. laydate.render({
  72. elem: '#end',
  73. trigger: 'click' ,
  74. theme: '#284a94',
  75. type:'datetime',
  76. format:"yyyy-MM-dd HH:mm:ss"
  77. });
  78. $(document).ready(function(){
  79. formSetValue("enable", {$info.enable|default=1});
  80. });
  81. </script>
  82. {/block}