edit.html 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <extend name="Public:base" />
  2. <block name="content">
  3. <div class="page-header">
  4. <h1>
  5. 编辑{$spike.name}
  6. <small>
  7. <i class="icon-double-angle-right"></i>
  8. {$crumbs}
  9. </small>
  10. </h1>
  11. </div>
  12. <div class="row">
  13. <div class="col-xs-12">
  14. <form class="form-horizontal" id="validation-form" method="post" action='{:U("Spike/update")}'>
  15. <input type="hidden" name="id" value="{$spike.id}" />
  16. <div class="form-group required">
  17. <label class="col-sm-2 control-label">限时秒杀活动名称:</label>
  18. <div class="col-sm-10">
  19. <input class="form-control" type="text" placeholder="" name="name" value="{$spike.name}" />
  20. </div>
  21. </div>
  22. <div class="form-group required">
  23. <label class="col-sm-2 control-label">开始时间:</label>
  24. <div class="col-sm-10">
  25. <input class="form-control" type="text" id="begin_time" placeholder="开始时间" name="begin_time" value="<?php echo date('Y-m-d H:i:s',$spike['begin_time']) ?>" />
  26. </div>
  27. </div>
  28. <div class="form-group required">
  29. <label class="col-sm-2 control-label">结束时间:</label>
  30. <div class="col-sm-10">
  31. <input class="form-control" type="text" id="end_time" placeholder="结束时间" name="end_time" value="<?php echo date('Y-m-d H:i:s',$spike['end_time']) ?>" />
  32. </div>
  33. </div>
  34. <div class="form-group">
  35. <label class="col-sm-1 control-label no-padding-left"> </label>
  36. <div class="col-sm-11">
  37. <input name="send" type="submit" value="提交" class="btn btn-primary" />
  38. </div>
  39. </div>
  40. </form>
  41. </div>
  42. </div>
  43. </block>
  44. <block name="javascript">
  45. <script src="__PUBLIC__/js/moment/moment.js"></script>
  46. <script src="__PUBLIC__/js/moment/locale/zh-cn.js"></script>
  47. <script src="__PUBLIC__/js/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js"></script>
  48. <link rel="stylesheet" href="__PUBLIC__/js/bootstrap-timepicker/css/bootstrap-timepicker.css" />
  49. <script>
  50. $(function(){
  51. $('#begin_time').datetimepicker({
  52. format: 'YYYY/MM/DD H:mm:ss',//use this option to display seconds
  53. icons: {
  54. time: 'btn btn-lg icon-time',
  55. date: 'btn btn-lg icon-calendar',
  56. up: 'fa icon-chevron-up',
  57. down: 'fa icon-chevron-down',
  58. previous: 'fa icon-chevron-left',
  59. next: 'fa icon-chevron-right',
  60. today: 'fa icon-arrows ',
  61. clear: 'fa icon-trash',
  62. close: 'fa icon-times'
  63. }
  64. }).next().on(ace.click_event, function(){
  65. $(this).prev().focus();
  66. });
  67. $('#end_time').datetimepicker({
  68. format: 'YYYY/MM/DD H:mm:ss',//use this option to display seconds
  69. icons: {
  70. time: 'btn btn-lg icon-time',
  71. date: 'btn btn-lg icon-calendar',
  72. up: 'fa icon-chevron-up',
  73. down: 'fa icon-chevron-down',
  74. previous: 'fa icon-chevron-left',
  75. next: 'fa icon-chevron-right',
  76. today: 'fa icon-arrows ',
  77. clear: 'fa icon-trash',
  78. close: 'fa icon-times'
  79. }
  80. }).next().on(ace.click_event, function(){
  81. $(this).prev().focus();
  82. });
  83. })
  84. </script>
  85. </block>