ownshop_add.html 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. {include file="public/header" /}
  2. <div class="page">
  3. <div class="explanation" id="explanation">
  4. <div class="title" id="checkZoom">
  5. <h4 title="{$Think.lang.ds_explanation_tip}">{$Think.lang.ds_explanation}</h4>
  6. <span id="explanationZoom" title="{$Think.lang.ds_explanation_close}" class="arrow"></span>
  7. </div>
  8. <ul>
  9. <li>{$Think.lang.ownshop_add_help1}</li>
  10. <li>{$Think.lang.ownshop_add_help2}</li>
  11. <li>{$Think.lang.ownshop_add_help3}</li>
  12. </ul>
  13. </div>
  14. <form id="store_form" method="post">
  15. <table class="ds-default-table">
  16. <tbody>
  17. <tr class="noborder">
  18. <td class="required w120"><label class="validation" for="store_name">{$Think.lang.ds_store_name}:</label></td>
  19. <td class="vatop rowform"><input type="text" value="" id="store_name" name="store_name" class="txt" /></td>
  20. <td class="vatop tips"></td>
  21. </tr>
  22. <tr class="noborder">
  23. <td class="required"><label class="validation" for="member_name">{$Think.lang.ds_member_name}:</label></td>
  24. <td class="vatop rowform"><input type="text" value="" id="member_name" name="member_name" class="txt" /></td>
  25. <td class="vatop tips">{$Think.lang.member_name_tips}</td>
  26. </tr>
  27. <tr class="noborder">
  28. <td class="required"><label class="validation" for="member_password">{$Think.lang.ds_member_password}:</label></td>
  29. <td class="vatop rowform"><input type="password" value="" id="member_password" name="member_password" class="txt" /></td>
  30. <td class="vatop tips"></td>
  31. </tr>
  32. </tbody>
  33. <tfoot>
  34. <tr class="tfoot">
  35. <td colspan="15"><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. $(function () {
  43. $('#store_form').validate({
  44. errorPlacement: function (error, element) {
  45. error.appendTo(element.parentsUntil('tr').parent().find('td:last'));
  46. },
  47. rules: {
  48. store_name: {
  49. required: true,
  50. remote : "{:url('Ownshop/ckeck_store_name')}"
  51. },
  52. member_name: {
  53. required: true,
  54. minlength: 3,
  55. maxlength: 15,
  56. remote: {
  57. url: "{:url('Ownshop/check_member_name')}",
  58. type: 'get',
  59. data: {
  60. member_name: function () {
  61. return $('#member_name').val();
  62. }
  63. }
  64. }
  65. },
  66. member_password: {
  67. required: true,
  68. minlength: 6
  69. }
  70. },
  71. messages: {
  72. store_name: {
  73. required: '{$Think.lang.store_name_required}',
  74. remote: '{$Think.lang.store_name_remote}'
  75. },
  76. member_name: {
  77. required: '{$Think.lang.member_name_required}',
  78. minlength: '{$Think.lang.member_name_minlength}',
  79. maxlength: '{$Think.lang.member_name_maxlength}',
  80. remote: '{$Think.lang.member_name_remote}'
  81. },
  82. member_password: {
  83. required: '{$Think.lang.member_password_required}',
  84. minlength: '{$Think.lang.member_password_minlength}'
  85. }
  86. }
  87. });
  88. });
  89. </script>