mgdiscount_setting.html 1.7 KB

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