bargain_setting.html 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 colspan="2" class="required"><label class="validation">{$Think.lang.bargain_price}:</label></td>
  8. </tr>
  9. <tr class="noborder">
  10. <td class="vatop rowform">
  11. <input type="text" id="promotion_bargain_price" name="promotion_bargain_price" value="{$setting.promotion_bargain_price}" class="txt">
  12. </td>
  13. <td class="vatop tips">{$Think.lang.bargain_price_explain}</td>
  14. </tr>
  15. </tbody>
  16. <tfoot>
  17. <tr class="tfoot">
  18. <td colspan="15"><input class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
  19. </tr>
  20. </tfoot>
  21. </table>
  22. </form>
  23. </div>
  24. <script>
  25. $(document).ready(function(){
  26. //页面输入内容验证
  27. $("#add_form").validate({
  28. errorPlacement: function(error, element){
  29. error.appendTo(element.parent().parent().prev().find('td:first'));
  30. },
  31. rules : {
  32. promotion_bargain_price: {
  33. required : true,
  34. digits : true,
  35. min : 0
  36. }
  37. },
  38. messages : {
  39. promotion_bargain_price: {
  40. required : '{$Think.lang.bargain_price_error}',
  41. digits : '{$Think.lang.bargain_price_error}',
  42. min : '{$Think.lang.bargain_price_error}'
  43. }
  44. }
  45. });
  46. });
  47. </script>