m.changepassword.html.php 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * The change password view of user module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2015 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Yidong Wang <yidong@cnezsoft.com>
  8. * @package user
  9. * @version $Id: editprofile.html.php 2605 2012-02-21 07:22:58Z wwccss $
  10. * @link http://www.zentao.net
  11. */
  12. ?>
  13. <?php include "../../common/view/m.header.html.php";?>
  14. <?php js::import($jsRoot . 'md5.js');?>
  15. <div id='page' class='list-with-actions'>
  16. <div class='heading divider'>
  17. <div class='title'> <strong><?php echo $user->account . ' :: ' . $lang->my->changePassword;?></strong></div>
  18. </div>
  19. <form class='content box' data-form-refresh='#page' method='post' id='changePassordForm' target='hiddenwin' action='<?php echo $this->createLink('my', 'changePassword');?>' enctype='multipart/form-data'>
  20. <div class="control">
  21. <label for='originalPassword'><?php echo $lang->user->originalPassword;?></label>
  22. <?php echo html::password('originalPassword', '', "class='input'");?>
  23. </div>
  24. <div class="control">
  25. <label for='password1'><?php echo $lang->user->password;?></label>
  26. <?php echo html::password('password1', '', "class='input' autocomplete='off' onkeyup='checkPassword(this.value)' placeholder='" . (!empty($config->safe->mode) ? $lang->user->placeholder->passwordStrength[$config->safe->mode] : '') . "'");?>
  27. <p class='help-text text-important' id='passwordStrength'></p>
  28. </div>
  29. <div class="control">
  30. <label for='password2'><?php echo $lang->user->password2;?></label>
  31. <?php echo html::password('password2', '', "class='input'");?>
  32. </div>
  33. <div class='control'>
  34. <button type='submit' id='submitButton' class='btn primary'><?php echo $lang->save ?></button>
  35. <?php echo html::hidden('account',$user->account);?>
  36. </div>
  37. <?php if(!empty($this->app->user->modifyPasswordReason)):?>
  38. <?php $this->app->loadLang('admin');?>
  39. <div class='alert alert-info'>
  40. <?php echo $lang->admin->safe->common . ' : ';?>
  41. <?php echo $this->app->user->modifyPasswordReason == 'weak' ? $lang->admin->safe->changeWeak : $lang->admin->safe->modifyPasswordFirstLogin;?>
  42. </div>
  43. <?php endif;?>
  44. </form>
  45. <?php echo html::hidden('verifyRand', $rand);?>
  46. </div>
  47. <?php js::set('passwordStrengthList', $lang->user->passwordStrengthList)?>
  48. <script>
  49. function checkPassword(password)
  50. {
  51. $('#passwordStrength').html(password == '' ? '' : passwordStrengthList[computePasswordStrength(password)]);
  52. $('#passwordStrength').css('display', password == '' ? 'none' : 'display');
  53. }
  54. </script>
  55. <?php include "../../common/view/m.footer.html.php"; ?>