diff options
Diffstat (limited to 'modules/user/views')
-rw-r--r-- | modules/user/views/login_prompt.html.php | 44 | ||||
-rw-r--r-- | modules/user/views/reset_password.html.php | 14 |
2 files changed, 58 insertions, 0 deletions
diff --git a/modules/user/views/login_prompt.html.php b/modules/user/views/login_prompt.html.php new file mode 100644 index 00000000..2b9516ba --- /dev/null +++ b/modules/user/views/login_prompt.html.php @@ -0,0 +1,44 @@ +<?php defined("SYSPATH") or die("No direct script access.") ?> +<script type="text/javascript"> + $("#gLoginForm").ready(function() { + $("#gForgotPasswordLink").click(function() { + $.ajax({ + url: "<?= url::site("password/reset") ?>", + success: function(data) { + $("div#gLoginView").html(data); + $("#ui-dialog-title-gDialog").text("<?= t("Reset Password") ?>"); + ajaxify_login_reset_form(); + } + }); + }); + }); + + function ajaxify_login_reset_form() { + $("#gLoginView form").ajaxForm({ + dataType: "json", + success: function(data) { + if (data.form) { + $("#gLoginView form").replaceWith(data.form); + ajaxify_login_reset_form(); + } + if (data.result == "success") { + $("#gDialog").dialog("close"); + window.location.reload(); + } + + } + }); + }; +</script> +<div id="gLoginView"> + <ul> + <li> + <div id="gLoginViewForm"> + <?= $form ?> + </div> + </li> + <li> + <a href="#" id="gForgotPasswordLink"><?= t("Forgot your Password?") ?></a> + </li> + </ul> +</div> diff --git a/modules/user/views/reset_password.html.php b/modules/user/views/reset_password.html.php new file mode 100644 index 00000000..39845d61 --- /dev/null +++ b/modules/user/views/reset_password.html.php @@ -0,0 +1,14 @@ +<?php defined("SYSPATH") or die("No direct script access.") ?> +<html> +<head> + <title><?= $title ?> </title> +</head> +<body> + <h2><?= t("Password Reset Request") ?> </h2> + <p> + <?= sprintf(t("A request to reset your password (user: %s) at %s."), $name, url::base(false, "http")) ?> + <?= sprintf(t("To confirm this request please click on the link below")) ?><br /> + <a href="<?= $url ?>"><?= t("Reset Password") ?></a> + </p> +</body> +</html> |