groupbuy_setting.html 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. {include file="public/header" /}
  2. <div class="page">
  3. <form id="add_form" method="post" enctype="multipart/form-data" >
  4. <table class="ds-default-table">
  5. <tbody>
  6. <tr class="noborder">
  7. <td class="required w120"><label class="validation">{$Think.lang.groupbuy_price}:</label></td>
  8. <td class="vatop rowform">
  9. <input type="text" id="groupbuy_price" name="groupbuy_price" value="{$setting.groupbuy_price}" class="txt">
  10. </td>
  11. <td class="vatop tips">{$Think.lang.groupbuy_price_tips}</td>
  12. </tr>
  13. <tr class="noborder">
  14. <td class="required"><label class="validation">{$Think.lang.groupbuy_review_day}:</label></td>
  15. <td class="vatop rowform">
  16. <input type="text" id="groupbuy_review_day" name="groupbuy_review_day" value="{$setting.groupbuy_review_day}" class="txt">
  17. </td>
  18. <td class="vatop tips">{$Think.lang.groupbuy_review_day_tips}</td>
  19. </tr>
  20. </tbody>
  21. <tfoot>
  22. <tr class="tfoot">
  23. <td colspan="15"><input class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
  24. </tr>
  25. </tfoot>
  26. </table>
  27. </form>
  28. </div>
  29. <script>
  30. $(document).ready(function(){
  31. //页面输入内容验证
  32. $("#add_form").validate({
  33. errorPlacement: function(error, element){
  34. error.appendTo(element.parent().parent().find('td:last'));
  35. },
  36. rules : {
  37. groupbuy_price: {
  38. required : true,
  39. digits : true,
  40. min : 0
  41. },
  42. groupbuy_review_day:{
  43. required : true,
  44. digits : true,
  45. min : 0
  46. }
  47. },
  48. messages : {
  49. groupbuy_price: {
  50. required : '{$Think.lang.ds_required_error}',
  51. digits : '{$Think.lang.ds_digits_error}',
  52. min : '{$Think.lang.ds_min_error}0'
  53. },
  54. groupbuy_review_day:{
  55. required : '{$Think.lang.ds_required_error}',
  56. digits : '{$Think.lang.ds_digits_error}',
  57. min : '{$Think.lang.ds_min_error}0'
  58. }
  59. }
  60. });
  61. });
  62. </script>