bind.html.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?php
  2. /**
  3. * The bind view file of sso module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(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 sso
  9. * @version $Id$
  10. * @link https://www.zentao.net
  11. */
  12. ?>
  13. <?php include '../../common/view/header.lite.html.php';?>
  14. <?php include '../../common/view/chosen.html.php';?>
  15. <?php if(!empty($config->safe->mode)) $lang->user->placeholder->password1 = $lang->user->placeholder->passwordStrength[$config->safe->mode]?>
  16. <?php js::set('holders', $lang->user->placeholder);?>
  17. <div id='mainContent' class='main-content'>
  18. <div class='center-block mw-700px'>
  19. <div class='main-header'><h2><?php echo $lang->sso->bind?></h2></div>
  20. <form method='post' target='hiddenwin' id='bindForm'>
  21. <table class='table table-form'>
  22. <tr>
  23. <th class='w-100px'><?php echo $lang->sso->bindType?></th>
  24. <td><?php echo html::radio('bindType', $lang->sso->bindTypeList, 'bind')?></td>
  25. <td></td>
  26. </tr>
  27. <tr class='params bind'>
  28. <th><?php echo $lang->sso->bindUser?></th>
  29. <td><?php echo html::select('bindUser', $users, $data->account, "class='form-control chosen'")?></td>
  30. </tr>
  31. <tr class='params bind'>
  32. <th><?php echo $lang->user->password?></th>
  33. <td><?php echo html::password('bindPassword', '', "class='form-control'")?></td>
  34. </tr>
  35. <tr class='params add hide'>
  36. <th><?php echo $lang->user->account?></th>
  37. <td><?php echo html::input('account', $data->account, "class='form-control'")?></td>
  38. </tr>
  39. <tr class='params add hide'>
  40. <th><?php echo $lang->user->password?></th>
  41. <td>
  42. <span class='input-group'>
  43. <?php echo html::password('password1', '', "class='form-control' onmouseup='checkPassword(this.value)' onkeyup='checkPassword(this.value)'");?>
  44. <span class='input-group-addon' id='passwordStrength'></span>
  45. </span>
  46. </td>
  47. </tr>
  48. <tr class='params add hide'>
  49. <th><?php echo $lang->user->password2?></th>
  50. <td><?php echo html::password('password2', '', "class='form-control'")?></td>
  51. </tr>
  52. <tr class='params add hide'>
  53. <th><?php echo $lang->user->realname?></th>
  54. <td><?php echo html::input('realname', $data->realname, "class='form-control'")?></td>
  55. </tr>
  56. <tr class='params add hide'>
  57. <th><?php echo $lang->user->gender?></th>
  58. <td><?php echo html::radio('gender', $lang->user->genderList, $data->gender)?></td>
  59. </tr>
  60. <tr class='params add hide'>
  61. <th><?php echo $lang->user->email?></th>
  62. <td><?php echo html::input('email', $data->email, "class='form-control'")?></td>
  63. </tr>
  64. <tr class='params add hide'>
  65. <th></th>
  66. <td colspan='2'><span style='color:red'><?php echo $lang->sso->bindNotice?></span></td>
  67. </tr>
  68. <tr>
  69. <th></th>
  70. <td><?php echo html::submitButton()?></td>
  71. </tr>
  72. </table>
  73. </form>
  74. </div>
  75. </div>
  76. <script>
  77. $(function()
  78. {
  79. $('#bindForm input[id^="bindType"]').change(function()
  80. {
  81. $('#bindForm table tr.params').addClass('hide');
  82. $('#bindForm table tr.' + $(this).val()).removeClass('hide');
  83. })
  84. })
  85. function checkPassword(password)
  86. {
  87. $('#passwordStrength').html(password == '' ? '' : passwordStrengthList[computePasswordStrength(password)]);
  88. $('#passwordStrength').css('display', password == '' ? 'none' : 'table-cell');
  89. }
  90. </script>
  91. <?php js::set('passwordStrengthList', $lang->user->passwordStrengthList)?>
  92. <?php include '../../common/view/footer.lite.html.php';?>