blob: a75301347108e023e9a8e5b5d2228e98b5380f8f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
<?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").html(<?= t("Reset Password")->for_js() ?>);
$(".submit").addClass("g-button ui-state-default ui-corner-all");
$(".submit").gallery_hover_init();
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>
|