edit_reason.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. {include file="public/header" /}
  2. <div class="page">
  3. <div class="fixed-empty"></div>
  4. <form id="post_form" method="post" name="form1" action="">
  5. <table class="ds-default-table">
  6. <tbody>
  7. <tr class="noborder">
  8. <td colspan="2" class="required"><label class="validation" for="reason_info">{$Think.lang.refund_buyer_message}:</label></td>
  9. </tr>
  10. <tr class="noborder">
  11. <td class="vatop rowform"><input id="reason_info" name="reason_info" value="{$reason.reason_info}" class="txt" type="text"></td>
  12. <td class="vatop tips"></td>
  13. </tr>
  14. <tr>
  15. <td colspan="2" class="required"><label class="validation" for="reason_sort">{$Think.lang.ds_sort}:</label>
  16. </td>
  17. </tr>
  18. <tr class="noborder">
  19. <td class="vatop rowform"><input type="text" value="{$reason.reason_sort}" name="reason_sort" id="reason_sort" class="txt"></td>
  20. <td class="vatop tips">{$Think.lang.reason_sort_tips}</td>
  21. </tr>
  22. </tbody>
  23. <tfoot>
  24. <tr class="tfoot">
  25. <td colspan="15" ><input class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
  26. </tr>
  27. </tfoot>
  28. </table>
  29. </form>
  30. </div>
  31. <script>
  32. $(function () {
  33. $("#post_form").validate({
  34. errorPlacement: function (error, element) {
  35. error.appendTo(element.parent().parent().prev().find('td:first'));
  36. },
  37. rules: {
  38. reason_info: {
  39. required: true
  40. },
  41. reason_sort: {
  42. required: true,
  43. digits: true,
  44. range: [0, 255]
  45. }
  46. },
  47. messages: {
  48. reason_info: {
  49. required: "{$Think.lang.reason_info_required}"
  50. },
  51. reason_sort: {
  52. required: "{$Think.lang.reason_sort_digits}",
  53. digits: "{$Think.lang.reason_sort_digits}",
  54. range: '{$Think.lang.reason_sort_tips}'
  55. }
  56. }
  57. });
  58. });
  59. </script>