reset.html.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <?php
  2. /**
  3. * The reset view file of user module of ZenTaoPMS.
  4. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  5. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  6. * @author Mengyi Liu <liumengyi@easycorp.ltd>
  7. * @package user
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. $content = $needCreateFile ? div
  12. (
  13. setClass('create-file cell flex justify-center mt-24'),
  14. panel
  15. (
  16. setClass('create-file-panel w-full size-lg'),
  17. set::title($lang->user->resetPwdByAdmin),
  18. set::titleClass('text-lg'),
  19. !empty($config->resetPWDByMail) ? to::headingActions
  20. (
  21. a
  22. (
  23. set::href(inlink('forgetPassword')),
  24. $lang->user->resetPwdByMail
  25. )
  26. ) : null,
  27. cell
  28. (
  29. setClass('alert-info p-4 mb-6'),
  30. html(sprintf($lang->user->noticeResetFile, $resetFileName))
  31. ),
  32. cell
  33. (
  34. setClass('flex justify-center mb-4'),
  35. btn
  36. (
  37. setClass('px-8 mx-4'),
  38. set::type('primary'),
  39. set::url(inlink('reset')),
  40. $lang->refresh
  41. ),
  42. btn
  43. (
  44. setClass('px-8 mx-4 not-open-url'),
  45. set::url(inlink('login')),
  46. $lang->goback
  47. )
  48. )
  49. )
  50. ) : div
  51. (
  52. setClass('reset-password cell flex justify-center mt-24'),
  53. formPanel
  54. (
  55. setClass('reset-form w-full'),
  56. set::title($lang->user->resetPwdByAdmin),
  57. set::actions(array()),
  58. on::change('#password1,#password2', 'changePassword'),
  59. on::click('button[type=submit]', 'encryptPassword'),
  60. !empty($config->resetPWDByMail) ? to::headingActions
  61. (
  62. a
  63. (
  64. set::href(inlink('forgetPassword')),
  65. $lang->user->resetPwdByMail
  66. )
  67. ) : null,
  68. formRow
  69. (
  70. formGroup
  71. (
  72. set::label($lang->user->account),
  73. set::name('account'),
  74. set::required(true)
  75. )
  76. ),
  77. formRow
  78. (
  79. formGroup
  80. (
  81. set::label($lang->user->password),
  82. password(set::checkStrength(true)),
  83. set::required(true)
  84. )
  85. ),
  86. formRow
  87. (
  88. formGroup
  89. (
  90. set::label($lang->user->abbr->password2),
  91. set::control('password'),
  92. set::name('password2'),
  93. set::required(true)
  94. )
  95. ),
  96. formRow
  97. (
  98. setClass('hidden'),
  99. input(set::name('passwordLength'), set::value(0)),
  100. input(set::name('passwordStrength'), set::value(0))
  101. ),
  102. formRow
  103. (
  104. setClass('justify-center'),
  105. array
  106. (
  107. btn(set(array('text' => $lang->user->submit, 'btnType' => 'submit', 'type' => 'primary', 'class' => 'px-8 mx-4'))),
  108. btn(set(array('text' => $lang->goback, 'url' => inlink('login'), 'class' => 'px-8 mx-4 not-open-url')))
  109. )
  110. )
  111. ),
  112. formHidden('verifyRand', $rand)
  113. );
  114. set::zui(true);
  115. div
  116. (
  117. set::id('main'),
  118. div
  119. (
  120. set::id('mainContent'),
  121. $content
  122. )
  123. );
  124. render('pagebase');