passwordforgotten.tpl.php 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <?php
  2. /* Copyright (C) 2009-2010 Regis Houssin <regis.houssin@capnetworks.com>
  3. * Copyright (C) 2011-2013 Laurent Destailleur <eldy@users.sourceforge.net>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. header('Cache-Control: Public, must-revalidate');
  19. header("Content-type: text/html; charset=".$conf->file->character_set_client);
  20. if (GETPOST('dol_hide_topmenu')) $conf->dol_use_jmobile=1;
  21. if (GETPOST('dol_hide_leftmenu')) $conf->dol_hide_leftmenu=1;
  22. if (GETPOST('dol_optimize_smallscreen')) $conf->dol_optimize_smallscreen=1;
  23. if (GETPOST('dol_no_mouse_hover')) $conf->dol_no_mouse_hover=1;
  24. if (GETPOST('dol_use_jmobile')) $conf->dol_use_jmobile=1;
  25. // If we force to use jmobile, then we reenable javascript
  26. if (! empty($conf->dol_use_jmobile)) $conf->use_javascript_ajax=1;
  27. print top_htmlhead('',$langs->trans('Login').' '.$title);
  28. ?>
  29. <!-- BEGIN PHP TEMPLATE PASSWORDFORGOTTEN.TPL.PHP -->
  30. <body class="bodylogin">
  31. <?php if (empty($conf->dol_use_jmobile)) { ?>
  32. <script type="text/javascript">
  33. $(document).ready(function () {
  34. // Set focus on correct field
  35. <?php if ($focus_element) { ?>$('#<?php echo $focus_element; ?>').focus(); <?php } ?> // Warning to use this only on visible element
  36. });
  37. </script>
  38. <?php } ?>
  39. <div class="login_vertical_align center">
  40. <form id="login" name="login" method="post" action="<?php echo $php_self; ?>">
  41. <input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>">
  42. <input type="hidden" name="action" value="buildnewpassword">
  43. <table class="login_table_title center" summary="<?php echo dol_escape_htmltag($title); ?>">
  44. <tr class="vmenu"><td class="center"><?php echo $title; ?></td></tr>
  45. </table>
  46. <br>
  47. <div class="login_table">
  48. <div id="login_line1">
  49. <div id="login_left">
  50. <table class="left" summary="Login pass">
  51. <!-- Login -->
  52. <tr>
  53. <td valign="bottom" class="loginfield nowrap"><strong><label for="username"><?php echo $langs->trans('Login'); ?></label></strong></td>
  54. <td valign="bottom" class="nowrap">
  55. <span class="span-icon-user">
  56. <input type="text" <?php echo $disabled; ?> id="username" name="username" class="flat input-icon-user" size="15" maxlength="40" value="<?php echo dol_escape_htmltag($login); ?>" tabindex="1" />
  57. </span>
  58. </td>
  59. </tr>
  60. <?php
  61. if (! empty($hookmanager->resArray['options'])) {
  62. foreach ($hookmanager->resArray['options'] as $format => $option)
  63. {
  64. if ($format == 'table') {
  65. echo '<!-- Option by hook -->';
  66. echo $option;
  67. }
  68. }
  69. }
  70. ?>
  71. <?php if ($captcha) { ?>
  72. <!-- Captcha -->
  73. <tr><td valign="middle" class="loginfield nowrap"><strong><label for="securitycode"><?php echo $langs->trans('SecurityCode'); ?></label></strong></td>
  74. <td valign="top" class="nowrap none" align="left">
  75. <table class="login_table_securitycode" style="width: 100px;"><tr>
  76. <td>
  77. <span class="span-icon-security">
  78. <input id="securitycode" class="flat input-icon-security" type="text" size="6" maxlength="5" name="code" tabindex="4" />
  79. </span>
  80. </td>
  81. <td><img src="<?php echo DOL_URL_ROOT ?>/core/antispamimage.php" border="0" width="80" height="32" id="img_securitycode" /></td>
  82. <td><a href="<?php echo $php_self; ?>"><?php echo $captcha_refresh; ?></a></td>
  83. </tr></table>
  84. </td></tr>
  85. <?php } ?>
  86. </table>
  87. </div> <!-- end div left -->
  88. <div id="login_right">
  89. <img alt="Logo" title="" src="<?php echo $urllogo; ?>" id="img_logo" />
  90. </div>
  91. </div>
  92. <div id="login_line2" style="clear: both">
  93. <!-- Button Send password -->
  94. <br><input id="password" type="submit" <?php echo $disabled; ?> class="button" name="password" value="<?php echo $langs->trans('SendNewPassword'); ?>" tabindex="4" />
  95. <br>
  96. <div class="center" style="margin-top: 4px;">
  97. <?php
  98. $moreparam='';
  99. if (! empty($conf->dol_hide_topmenu)) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_hide_topmenu='.$conf->dol_hide_topmenu;
  100. if (! empty($conf->dol_hide_leftmenu)) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_hide_leftmenu='.$conf->dol_hide_leftmenu;
  101. if (! empty($conf->dol_no_mouse_hover)) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_no_mouse_hover='.$conf->dol_no_mouse_hover;
  102. if (! empty($conf->dol_use_jmobile)) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_use_jmobile='.$conf->dol_use_jmobile;
  103. print '<a class="alogin" href="'.$dol_url_root.'/index.php'.$moreparam.'">('.$langs->trans('BackToLoginPage').')</a>';
  104. ?>
  105. </div>
  106. </div>
  107. </div>
  108. </form>
  109. <div class="center login_main_home" style="max-width: 680px; margin-left: 10px; margin-right: 10px;">
  110. <?php if ($mode == 'dolibarr' || ! $disabled) { ?>
  111. <font style="font-size: 12px;">
  112. <?php echo $langs->trans('SendNewPasswordDesc'); ?>
  113. </font>
  114. <?php }else{ ?>
  115. <div class="warning center">
  116. <?php echo $langs->trans('AuthenticationDoesNotAllowSendNewPassword', $mode); ?>
  117. </div>
  118. <?php } ?>
  119. </div>
  120. <br>
  121. <?php if ($message) { ?>
  122. <div class="center login_main_message" style="max-width: 680px; margin-left: 10px; margin-right: 10px;">
  123. <?php echo dol_htmloutput_mesg($message,'','',1); ?>
  124. </div>
  125. <?php } ?>
  126. </div>
  127. </body>
  128. </html>
  129. <!-- END PHP TEMPLATE -->