edit.html 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <extend name="Public:base" />
  2. <block name="content">
  3. <div class="page-header">
  4. <h1>
  5. {$breadcrumb2}
  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='{$action}'>
  15. <notempty name="Think.get.id">
  16. <input name="weight_class_id" type="hidden" value="{$Think.get.id}" />
  17. </notempty>
  18. <div class="form-group">
  19. <label class="col-sm-1 control-label no-padding-left"> 优惠券名称 </label>
  20. <div class="col-sm-11">
  21. <div class="clearfix">
  22. <input name="voucher_title" id="voucher_title" placeholder=" 优惠券名称 " class="col-xs-10 col-sm-5" value="{$d.voucher_title|default=''}" type="text">
  23. </div>
  24. </div>
  25. </div>
  26. <div class="space-4"></div>
  27. <div class="form-group">
  28. <label class="col-sm-1 control-label no-padding-left"> 优惠券金额</label>
  29. <div class="col-sm-11">
  30. <div class="clearfix">
  31. <input name="credit" id="credit" class="col-xs-10 col-sm-5" placeholder=" 优惠券金额" value="{$d.credit|default=''}" type="text">
  32. </div>
  33. </div>
  34. </div>
  35. <div class="space-4"></div>
  36. <div class="form-group">
  37. <label class="col-sm-1 control-label no-padding-left"> 开始时间</label>
  38. <div class="col-sm-11">
  39. <div class="clearfix">
  40. <input name="begin_time" id="begin_time" class="col-xs-10 col-sm-5" value="<?php echo date('Y-m-d H:i:s',time()); ?>" type="text">
  41. </div>
  42. </div>
  43. </div>
  44. <div class="space-4"></div>
  45. <div class="form-group">
  46. <label class="col-sm-1 control-label no-padding-left"> 结束时间</label>
  47. <div class="col-sm-11">
  48. <div class="clearfix">
  49. <input name="end_time" id="end_time" class="col-xs-10 col-sm-5" value="<?php echo date('Y-m-d H:i:s',time()+86400); ?>" type="text">
  50. </div>
  51. </div>
  52. </div>
  53. <div class="space-4"></div>
  54. <div class="form-group">
  55. <label class="col-sm-1 control-label no-padding-left"> 满多少可用</label>
  56. <div class="col-sm-11">
  57. <div class="clearfix">
  58. <input name="limit_money" id="limit_money" placeholder=" 订单金额满多少才可用,为空或0不限制" class="col-xs-10 col-sm-5" value="{$d.limit_money}" type="text">
  59. </div>
  60. </div>
  61. </div>
  62. <div class="space-4"></div>
  63. <div class="form-group">
  64. <label class="col-sm-1 control-label no-padding-left"> 可领取人数</label>
  65. <div class="col-sm-11">
  66. <div class="clearfix">
  67. <input name="total_count" id="total_count" placeholder=" 一共生成多少张优惠券" class="col-xs-10 col-sm-5" value="{$d.total_count}" type="text">
  68. </div>
  69. </div>
  70. </div>
  71. <div class="space-4"></div>
  72. <div class="form-group">
  73. <label class="col-sm-1 control-label no-padding-left"> 每人可领取</label>
  74. <div class="col-sm-11">
  75. <div class="clearfix">
  76. <input name="person_limit_count" id="person_limit_count" placeholder=" 每人可领取几张,0为不限制" class="col-xs-10 col-sm-5" value="{$d.person_limit_count}" type="text">
  77. </div>
  78. </div>
  79. </div>
  80. <div class="space-4"></div>
  81. <div class="form-group">
  82. <label class="col-sm-1 control-label no-padding-left"> 推荐网站首页</label>
  83. <div class="col-sm-11">
  84. <div class="clearfix">
  85. <label><input type="radio" name="is_index_show" value="1" <?php if($d['is_index_show'] == 1){ ?> checked <?php } ?> /> 是 </label>
  86. <label><input type="radio" name="is_index_show" value="0" <?php if($d['is_index_show'] == 0){ ?> checked <?php } ?> /> 否 </label>
  87. </div>
  88. </div>
  89. </div>
  90. <div class="form-group">
  91. <label class="col-sm-1 control-label no-padding-left"> </label>
  92. <div class="col-sm-11">
  93. <input name="send" type="submit" value="提交" class="btn btn-primary" />
  94. </div>
  95. </div>
  96. </form>
  97. </div>
  98. </div>
  99. </block>
  100. <block name="javascript">
  101. <script src="__JS__/jquery.validate.min.js"></script>
  102. <script src="__PUBLIC__/js/moment/moment.js"></script>
  103. <script src="__PUBLIC__/js/moment/locale/zh-cn.js"></script>
  104. <script src="__PUBLIC__/js/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js"></script>
  105. <link rel="stylesheet" href="__PUBLIC__/js/bootstrap-timepicker/css/bootstrap-timepicker.css" />
  106. <script>
  107. $(function(){
  108. $('#begin_time').datetimepicker({
  109. format: 'YYYY/MM/DD H:mm:ss',//use this option to display seconds
  110. icons: {
  111. time: 'btn btn-lg icon-time',
  112. date: 'btn btn-lg icon-calendar',
  113. up: 'fa icon-chevron-up',
  114. down: 'fa icon-chevron-down',
  115. previous: 'fa icon-chevron-left',
  116. next: 'fa icon-chevron-right',
  117. today: 'fa icon-arrows ',
  118. clear: 'fa icon-trash',
  119. close: 'fa icon-times'
  120. }
  121. }).next().on(ace.click_event, function(){
  122. $(this).prev().focus();
  123. });
  124. $('#end_time').datetimepicker({
  125. format: 'YYYY/MM/DD H:mm:ss',//use this option to display seconds
  126. icons: {
  127. time: 'btn btn-lg icon-time',
  128. date: 'btn btn-lg icon-calendar',
  129. up: 'fa icon-chevron-up',
  130. down: 'fa icon-chevron-down',
  131. previous: 'fa icon-chevron-left',
  132. next: 'fa icon-chevron-right',
  133. today: 'fa icon-arrows ',
  134. clear: 'fa icon-trash',
  135. close: 'fa icon-times'
  136. }
  137. }).next().on(ace.click_event, function(){
  138. $(this).prev().focus();
  139. });
  140. });
  141. </script>
  142. </block>