summaryrefslogtreecommitdiffstats
path: root/application/views
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-01-24 22:48:45 +0100
committerFlorian Pritz <bluewind@xinu.at>2013-01-24 22:48:45 +0100
commitf75899e2fb9cded8cc41e9fe26c7f505a7355d9b (patch)
treea5263d2f02748f0454c209ceb750bb228705266d /application/views
parent7c7eaa5feb44ff93d30a97e8a323680419df3672 (diff)
Add password reset function/pages/links
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/views')
-rw-r--r--application/views/file/upload_form.php1
-rw-r--r--application/views/header.php1
-rw-r--r--application/views/user/reset_password_form.php20
-rw-r--r--application/views/user/reset_password_link_sent.php3
-rw-r--r--application/views/user/reset_password_success.php3
-rw-r--r--application/views/user/reset_password_username_form.php12
6 files changed, 40 insertions, 0 deletions
diff --git a/application/views/file/upload_form.php b/application/views/file/upload_form.php
index aaf36931a..f0c1ab933 100644
--- a/application/views/file/upload_form.php
+++ b/application/views/file/upload_form.php
@@ -41,6 +41,7 @@
<input type="text" name="username" placeholder="Username" />
<input type="password" name="password" placeholder="Password" />
<input type="submit" class="btn btn-primary" value="Login" name="process" style="margin-bottom: 9px" />
+ <p style="display: inline"><?php echo anchor("user/reset_password", "Forgot your password?"); ?></p>
</form>
<?php } ?>
<div class="row">
diff --git a/application/views/header.php b/application/views/header.php
index 2e978bda2..c969f06e1 100644
--- a/application/views/header.php
+++ b/application/views/header.php
@@ -31,6 +31,7 @@ if (is_cli_client() && !isset($force_full_html)) {
<li class="dropdown">
<a class="dropdown-toggle" href="#" data-toggle="dropdown">Login <b class="caret"></b></a>
<div class="dropdown-menu" style="padding: 15px;">
+ <p><?php echo anchor("user/reset_password", "Forgot your password?"); ?></p>
<?php echo form_open("user/login"); ?>
<input type="text" name="username" placeholder="Username" class="input-medium">
<input type="password" name="password" placeholder="Password" class="input-medium">
diff --git a/application/views/user/reset_password_form.php b/application/views/user/reset_password_form.php
new file mode 100644
index 000000000..68a3e387e
--- /dev/null
+++ b/application/views/user/reset_password_form.php
@@ -0,0 +1,20 @@
+<?php if (!empty($error)) {
+ echo "<p>";
+ echo implode("<br />\n", $error);
+ echo "</p>";
+} ?>
+<?php echo form_open('user/reset_password/'.$key); ?>
+ <table>
+ <tr>
+ <td>Password</td>
+ <td> <input type="password" name="password" /></td>
+ </tr><tr>
+ <td>Confirm password</td>
+ <td> <input type="password" name="password_confirm" /></td>
+ </tr><tr>
+ <td></td>
+ <td><input type="submit" value="Change Password" name="process" /></td>
+ </tr>
+ </table>
+</form>
+
diff --git a/application/views/user/reset_password_link_sent.php b/application/views/user/reset_password_link_sent.php
new file mode 100644
index 000000000..7734d9c81
--- /dev/null
+++ b/application/views/user/reset_password_link_sent.php
@@ -0,0 +1,3 @@
+<p>
+ A mail containing your password reset link has been sent to "<?php echo htmlentities($email); ?>".
+</p>
diff --git a/application/views/user/reset_password_success.php b/application/views/user/reset_password_success.php
new file mode 100644
index 000000000..bc7448833
--- /dev/null
+++ b/application/views/user/reset_password_success.php
@@ -0,0 +1,3 @@
+<div class="center">
+ <p>Your password has been changed successfully.</p>
+</div>
diff --git a/application/views/user/reset_password_username_form.php b/application/views/user/reset_password_username_form.php
new file mode 100644
index 000000000..dde6d5aa0
--- /dev/null
+++ b/application/views/user/reset_password_username_form.php
@@ -0,0 +1,12 @@
+<?php echo form_open('user/reset_password'); ?>
+ <table>
+ <tr>
+ <td>Username</td>
+ <td> <input type="text" name="username" /></td>
+ </tr><tr>
+ <td></td>
+ <td><input type="submit" value="Send mail" name="process" /></td>
+ </tr>
+ </table>
+</form>
+