modifypw.html 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. {include file="public/header" /}
  2. <div class="page">
  3. <form id="admin_form" method="post" action='' name="adminForm">
  4. <table class="ds-default-table">
  5. <tbody>
  6. <tr class="noborder">
  7. <td colspan="2" class="required"><label class="validation" for="old_pw">{$Think.lang.index_modifypw_oldpw}<!-- 原密码 -->:</label></td>
  8. </tr>
  9. <tr class="noborder">
  10. <td class="vatop rowform"><input id="old_pw" name="old_pw" class="infoTableInput" type="password"></td>
  11. <td class="vatop tips"></td>
  12. </tr>
  13. <tr>
  14. <td colspan="2" class="required"><label class="validation" for="new_pw">{$Think.lang.index_modifypw_newpw}<!-- 新密码 -->:</label></td>
  15. </tr>
  16. <tr class="noborder">
  17. <td class="vatop rowform"><input id="new_pw" name="new_pw" class="infoTableInput" type="password"></td>
  18. <td class="vatop tips"></td>
  19. </tr>
  20. <tr>
  21. <td colspan="2" class="required"><label class="validation" for="new_pw2">{$Think.lang.index_modifypw_newpw2}<!-- 确认密码-->:</label></td>
  22. </tr>
  23. <tr class="noborder">
  24. <td class="vatop rowform"><input id="new_pw2" name="new_pw2" class="infoTableInput" type="password"></td>
  25. <td class="vatop tips"></td>
  26. </tr>
  27. </tbody>
  28. <tfoot>
  29. <tr class="tfoot">
  30. <td colspan="2" ><input class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
  31. </tr>
  32. </tfoot>
  33. </table>
  34. </form>
  35. </div>
  36. <script>
  37. $(document).ready(function () {
  38. $("#admin_form").validate({
  39. errorPlacement: function (error, element) {
  40. error.appendTo(element.parent().parent().prev().find('td:first'));
  41. },
  42. rules: {
  43. old_pw: {
  44. required: true
  45. },
  46. new_pw: {
  47. required: true,
  48. minlength: 6,
  49. maxlength: 20
  50. },
  51. new_pw2: {
  52. required: true,
  53. minlength: 6,
  54. maxlength: 20,
  55. equalTo: '#new_pw'
  56. }
  57. },
  58. messages: {
  59. old_pw: {
  60. required: '{$Think.lang.admin_add_password_null}'
  61. },
  62. new_pw: {
  63. required: '{$Think.lang.admin_add_password_null}',
  64. minlength: '{$Think.lang.admin_add_password_max}',
  65. maxlength: '{$Think.lang.admin_add_password_max}'
  66. },
  67. new_pw2: {
  68. required: '{$Think.lang.admin_add_password_null}',
  69. minlength: '{$Think.lang.admin_add_password_max}',
  70. maxlength: '{$Think.lang.admin_add_password_max}',
  71. equalTo: '{$Think.lang.admin_edit_repeat_error}'
  72. }
  73. }
  74. });
  75. });
  76. </script>