setting.html 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. {include file="public/header" /}
  2. <div class="page">
  3. <form id="add_form" method="post">
  4. <table class="ds-default-table">
  5. <tbody>
  6. <tr class="noborder">
  7. <td class="required w150"><label class="validation">{$Think.lang.admin_voucher_setting_price}{$Think.lang.ds_colon}</label></td>
  8. <td class="vatop rowform">
  9. <input type="text" id="promotion_voucher_price" name="promotion_voucher_price" value="{$setting.promotion_voucher_price}" class="txt">
  10. </td>
  11. <td class="vatop tips">{$Think.lang.admin_voucher_setting_price_tip}</td>
  12. </tr>
  13. <tr class="noborder">
  14. <td class="required"><label class="validation">{$Think.lang.admin_voucher_setting_storetimes}{$Think.lang.ds_colon}</label></td>
  15. <td class="vatop rowform">
  16. <input type="text" id="promotion_voucher_storetimes_limit" name="promotion_voucher_storetimes_limit" value="{$setting.voucher_storetimes_limit}" class="txt">
  17. </td>
  18. <td class="vatop tips">{$Think.lang.admin_voucher_setting_storetimes_tip}</td>
  19. </tr>
  20. <tr class="noborder">
  21. <td class="required"><label class="validation">{$Think.lang.admin_voucher_setting_buyertimes}{$Think.lang.ds_colon}</label></td>
  22. <td class="vatop rowform">
  23. <input type="text" id="promotion_voucher_buyertimes_limit" name="promotion_voucher_buyertimes_limit" value="{$setting.voucher_buyertimes_limit}" class="txt">
  24. </td>
  25. <td class="vatop tips">{$Think.lang.admin_voucher_setting_buyertimes_tip}</td>
  26. </tr>
  27. </tbody>
  28. <tfoot>
  29. <tr class="tfoot">
  30. <td colspan="15"><input class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
  31. </tr>
  32. </tfoot>
  33. </table>
  34. </form>
  35. </div>
  36. <script>
  37. $(document).ready(function(){
  38. //页面输入内容验证
  39. $("#add_form").validate({
  40. errorPlacement: function(error, element){
  41. error.appendTo(element.parent().parent().find('td:last'));
  42. },
  43. rules : {
  44. promotion_voucher_price: {
  45. required : true,
  46. digits : true,
  47. min : 0
  48. },
  49. promotion_voucher_storetimes_limit: {
  50. required : true,
  51. digits : true,
  52. min : 1
  53. },
  54. promotion_voucher_buyertimes_limit: {
  55. required : true,
  56. digits : true,
  57. min : 1,
  58. max: 100,
  59. }
  60. },
  61. messages : {
  62. promotion_voucher_price: {
  63. required : '{$Think.lang.admin_voucher_setting_price_error}',
  64. digits : '{$Think.lang.admin_voucher_setting_price_error}',
  65. min : '{$Think.lang.admin_voucher_setting_price_error}'
  66. },
  67. promotion_voucher_storetimes_limit: {
  68. required : '{$Think.lang.admin_voucher_setting_storetimes_error}',
  69. digits : '{$Think.lang.admin_voucher_setting_storetimes_error}',
  70. min : '{$Think.lang.admin_voucher_setting_storetimes_error}'
  71. },
  72. promotion_voucher_buyertimes_limit: {
  73. required : '{$Think.lang.admin_voucher_setting_buyertimes_error}',
  74. digits : '{$Think.lang.admin_voucher_setting_buyertimes_error}',
  75. min : '{$Think.lang.admin_voucher_setting_buyertimes_error}',
  76. max : '{$Think.lang.admin_voucher_setting_buyertimes_error}'
  77. }
  78. }
  79. });
  80. });
  81. </script>