modify_pwd.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. {extend name="default/base/base_member" /}
  2. {block name="member_main"}
  3. <div class="dsm-default-form">
  4. <form method="post" id="password_form" name="password_form" action="{:url('Membersecurity/modify_pwd')}">
  5. <dl>
  6. <dt><i class="required">*</i>{$Think.lang.set_new_password}:</dt>
  7. <dd>
  8. <input type="password" maxlength="40" class="password" name="password" id="password"/>
  9. <label for="password" generated="true" class="error"></label>
  10. <p class="hint">{$Think.lang.payment_password_instructions3}</p></dd>
  11. </dl>
  12. <dl>
  13. <dt><i class="required">*</i>{$Think.lang.confirm_new_password}:</dt>
  14. <dd>
  15. <input type="password" maxlength="40" class="password" name="confirm_password" id="confirm_password" />
  16. <label for="confirm_password" generated="true" class="error"></label>
  17. </dd>
  18. </dl>
  19. <dl class="bottom">
  20. <dt>&nbsp;</dt>
  21. <dd>
  22. <input type="submit" class="submit" value="{$Think.lang.ds_ok}" />
  23. </dd>
  24. </dl>
  25. </form>
  26. </div>
  27. <script type="text/javascript">
  28. $(function(){
  29. $('#password_form').validate({
  30. submitHandler:function(form){
  31. ds_ajaxpost('password_form','url',"{:url('membersecurity/index')}")
  32. },
  33. rules : {
  34. password : {
  35. required : true,
  36. minlength : 6,
  37. maxlength : 20
  38. },
  39. confirm_password : {
  40. required : true,
  41. equalTo : '#password'
  42. }
  43. },
  44. messages : {
  45. password : {
  46. required : '<i class="iconfont">&#xe64c;</i>{$Think.lang.please_enter_password_correctly}',
  47. minlength : '<i class="iconfont">&#xe64c;</i>{$Think.lang.please_enter_password_correctly}',
  48. maxlength : '<i class="iconfont">&#xe64c;</i>{$Think.lang.please_enter_password_correctly}'
  49. },
  50. confirm_password : {
  51. required : '<i class="iconfont">&#xe64c;</i>{$Think.lang.please_enter_password_correctly}',
  52. equalTo : '<i class="iconfont">&#xe64c;</i>{$Think.lang.two_password_inconsistencies}'
  53. }
  54. }
  55. });
  56. });
  57. </script>
  58. {/block}