Commit 84f2c5fc authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Change strings on forgot password form when resetting password

parent 4af02f69
...@@ -32,7 +32,6 @@ define('SECTION_PAGE', 'forgotpass'); ...@@ -32,7 +32,6 @@ define('SECTION_PAGE', 'forgotpass');
require('init.php'); require('init.php');
require_once('pieforms/pieform.php'); require_once('pieforms/pieform.php');
define('TITLE', get_string('forgotpassword'));
if (!session_id()) { if (!session_id()) {
session_start(); session_start();
...@@ -44,6 +43,8 @@ if (!empty($_SESSION['pwchangerequested'])) { ...@@ -44,6 +43,8 @@ if (!empty($_SESSION['pwchangerequested'])) {
} }
if (isset($_GET['key'])) { if (isset($_GET['key'])) {
define('TITLE', get_string('changepassword'));
if (!$pwrequest = get_record('usr_password_request', 'key', $_GET['key'])) { if (!$pwrequest = get_record('usr_password_request', 'key', $_GET['key'])) {
die_info(get_string('nosuchpasswordrequest')); die_info(get_string('nosuchpasswordrequest'));
} }
...@@ -83,6 +84,8 @@ if (isset($_GET['key'])) { ...@@ -83,6 +84,8 @@ if (isset($_GET['key'])) {
$smarty->assign('forgotpasschange_form', pieform($form)); $smarty->assign('forgotpasschange_form', pieform($form));
$smarty->display('forgotpass.tpl'); $smarty->display('forgotpass.tpl');
exit; exit;
} else {
define('TITLE', get_string('forgotpassword'));
} }
$form = array( $form = array(
......
...@@ -2,15 +2,17 @@ ...@@ -2,15 +2,17 @@
{include file="columnfullstart.tpl"} {include file="columnfullstart.tpl"}
{if $forgotpass_form}
<h2>{str tag='forgotpassword'}</h2> <h2>{str tag='forgotpassword'}</h2>
{if $forgotpass_form}
<p>{str tag="forgotpasswordtext"}</p> <p>{str tag="forgotpasswordtext"}</p>
{$forgotpass_form} {$forgotpass_form}
{/if} {/if}
{if $forgotpasschange_form} {if $forgotpasschange_form}
<h2>{str tag='changepassword'}</h2>
<p>{str tag="forgotpasswordenternew"}</p> <p>{str tag="forgotpasswordenternew"}</p>
{$forgotpasschange_form} {$forgotpasschange_form}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment