price_add.html 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. {include file="public/header" /}
  2. <div class="page">
  3. <form id="add_form" method="post" action="{:url('Groupbuy/price_save')}">
  4. <input name="gprange_id" type="hidden" value="{$price_info.gprange_id}" />
  5. <table class="ds-default-table">
  6. <tbody>
  7. <tr class="noborder">
  8. <td colspan="2" class="required"><label for="gprange_name" class="validation">{$Think.lang.gprange_name}:</label></td>
  9. </tr>
  10. <tr class="noborder">
  11. <td class="vatop rowform"><input type="text" value="{$price_info.gprange_name}" name="gprange_name" id="gprange_name" class="txt"></td>
  12. <td class="vatop tips">{$Think.lang.price_range_tip}</td>
  13. </tr>
  14. <tr>
  15. <td colspan="2" class="required"><label for="gprange_start" class="validation">{$Think.lang.gprange_start}:</label></td>
  16. </tr>
  17. <tr class="noborder">
  18. <td class="vatop rowform">
  19. <input type="text" value="{$price_info.gprange_start}" name="gprange_start" id="gprange_start" class="txt">
  20. </td>
  21. <td class="vatop tips">{$Think.lang.price_range_price_tip}</td>
  22. </tr>
  23. <tr>
  24. <td colspan="2" class="required"><label for="gprange_end" class="validation">{$Think.lang.gprange_end}:</label></td>
  25. </tr>
  26. <tr class="noborder">
  27. <td class="vatop rowform">
  28. <input type="text" value="{$price_info.gprange_end}" name="gprange_end" id="gprange_end" class="txt">
  29. </td>
  30. <td class="vatop tips">{$Think.lang.price_range_price_tip}</td>
  31. </tr>
  32. </tbody>
  33. <tfoot>
  34. <tr>
  35. <td colspan="2"><input class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
  36. </tr>
  37. </tfoot>
  38. </table>
  39. </form>
  40. </div>
  41. <script type="text/javascript">
  42. $(document).ready(function(){
  43. $('#add_form').validate({
  44. errorPlacement: function(error, element){
  45. error.appendTo(element.parent().parent().prev().find('td:first'));
  46. },
  47. rules : {
  48. gprange_name : {
  49. required : true
  50. },
  51. gprange_start : {
  52. required : true,
  53. digits : true
  54. },
  55. gprange_end : {
  56. required : true,
  57. digits : true
  58. }
  59. },
  60. messages : {
  61. gprange_name : {
  62. required : '{$Think.lang.range_name_error}'
  63. },
  64. gprange_start : {
  65. required : '{$Think.lang.range_start_error}',
  66. digits : '{$Think.lang.range_start_error}'
  67. },
  68. gprange_end : {
  69. required : '{$Think.lang.range_end_error}',
  70. digits : '{$Think.lang.range_end_error}'
  71. }
  72. }
  73. });
  74. });
  75. </script>