form.html 5.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. {include file="public/header" /}
  2. <div class="page">
  3. <form method="post" id="bonus_form">
  4. <table class="ds-default-table">
  5. <tbody>
  6. <tr class="noborder">
  7. <td class="required w120">{$Think.lang.bonus_type}</td>
  8. <td class="vatop rowform">
  9. <select name="bonus_type" {if $Request.action eq 'edit'}disabled{/if}>
  10. {foreach name="bonus_type_list" item="v" key="k"}
  11. <option value="{$k}" {if condition="$bonus.bonus_type eq $k"}selected{/if}>{$v}</option>
  12. {/foreach}
  13. </select>
  14. </td>
  15. <td class="vatop tips"></td>
  16. </tr>
  17. <tr class="noborder">
  18. <td class="required w120">{$Think.lang.bonus_name}</td>
  19. <td class="vatop rowform"><input id="bonus_name" name="bonus_name" value="{$bonus.bonus_name|default=''}" class="input-txt" type="text"></td>
  20. <td class="vatop tips"></td>
  21. </tr>
  22. <tr class="noborder">
  23. <td class="required w120">{$Think.lang.bonus_blessing}</td>
  24. <td class="vatop rowform"><input id="bonus_blessing" name="bonus_blessing" value="{$bonus.bonus_blessing|default=''}" class="input-txt" type="text"></td>
  25. <td class="vatop tips"></td>
  26. </tr>
  27. <tr class="noborder">
  28. <td class="required w120">{$Think.lang.bonus_totalprice}</td>
  29. <td class="vatop rowform"><input id="bonus_totalprice" name="bonus_totalprice" value="{$bonus.bonus_totalprice|default=''}" class="input-txt" type="text" {if $Request.action eq 'edit'}disabled{/if}></td>
  30. <td class="vatop tips"></td>
  31. </tr>
  32. <tr class="noborder" {if $Request.action eq 'edit'}style="display:none;"{/if}>
  33. <td class="required w120">{$Think.lang.bonus_pricetype}</td>
  34. <td class="vatop rowform">
  35. <input id="bonus_pricetype" name="bonus_pricetype" value="1" type="radio" checked="checked" >{$Think.lang.bonus_pricetype_1}
  36. <input id="bonus_fixedprice" name="bonus_fixedprice" value="{$bonus.bonus_fixedprice|default=''}" class="input-txt w36" type="text" >
  37. <br/><br/>
  38. <input id="bonus_pricetype" name="bonus_pricetype" value="0" type="radio" >{$Think.lang.bonus_pricetype_0}
  39. <input id="bonus_randomprice_start" name="bonus_randomprice_start" value="{$bonus.bonus_randomprice_start|default=''}" class="input-txt w36" type="text" >-
  40. <input id="bonus_randomprice_end" name="bonus_randomprice_end" value="{$bonus.bonus_randomprice_end|default=''}" class="input-txt w36" type="text" >
  41. </td>
  42. </tr>
  43. <tr class="noborder">
  44. <td class="required w120">{$Think.lang.ds_begin_time}</td>
  45. <td class="vatop rowform"><input id="bonus_begintime" name="bonus_begintime" value="{$bonus.bonus_begintime|date='Y-m-d H:i'}" class="input-txt" type="text"></td>
  46. <td class="vatop tips"></td>
  47. </tr>
  48. <tr class="noborder">
  49. <td class="required w120">{$Think.lang.ds_end_time}</td>
  50. <td class="vatop rowform"><input id="bonus_endtime" name="bonus_endtime" value="{$bonus.bonus_endtime|date='Y-m-d H:i'}" class="input-txt" type="text"></td>
  51. <td class="vatop tips"></td>
  52. </tr>
  53. <tr class="noborder">
  54. <td class="required w120">{$Think.lang.bonus_remark}</td>
  55. <td class="vatop rowform"><textarea name="bonus_remark">{$bonus.bonus_remark|default=''}</textarea></td>
  56. <td class="vatop tips"></td>
  57. </tr>
  58. </tbody>
  59. <tfoot>
  60. <tr class="tfoot">
  61. <td colspan="15"><input type="submit" value="{$Think.lang.ds_confirm_submit}" class="btn" /></a>
  62. </tfoot>
  63. </table>
  64. </form>
  65. </div>
  66. <link rel="stylesheet" href="{$Think.PLUGINS_SITE_ROOT}/js/jquery-ui-timepicker/jquery-ui-timepicker-addon.min.css">
  67. <script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery-ui-timepicker/jquery-ui-timepicker-addon.min.js"></script>
  68. <script src="{$Think.PLUGINS_SITE_ROOT}/js/jquery-ui-timepicker/i18n/jquery-ui-timepicker-zh-CN.js"></script>
  69. <script>
  70. $(function () {
  71. $('#bonus_begintime').datetimepicker({dateFormat: 'yy-mm-dd'});
  72. $('#bonus_endtime').datetimepicker({dateFormat: 'yy-mm-dd'});
  73. $('#bonus_form').validate({
  74. errorPlacement: function(error, element) {
  75. error.appendTo(element.parent().parent().find('td:last'));
  76. },
  77. rules: {
  78. bonus_name : {
  79. required: true
  80. }
  81. },
  82. messages: {
  83. bonus_name : {
  84. required : '{$Think.lang.bonus_name_error}'
  85. }
  86. }
  87. });
  88. });
  89. </script>