mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-06-06 19:49:12 -04:00
This disambiguates forms from blocks (for example in the comment module we were calling both the form and block gComments).
31 lines
694 B
JavaScript
31 lines
694 B
JavaScript
function show_login(url) {
|
|
$("#gLoginLink").hide();
|
|
$("#gLoginClose").show();
|
|
$.get(url, function(data) {
|
|
$("#gLoginFormContainer").html(data);
|
|
ajaxify_login_form();
|
|
});
|
|
}
|
|
|
|
function ajaxify_login_form() {
|
|
$("#gLoginMenu form ul").addClass("gInline");
|
|
$("form#gLoginForm").ajaxForm({
|
|
target: "#gLoginFormContainer",
|
|
success: function(responseText, statusText) {
|
|
if (!responseText) {
|
|
window.location.reload();
|
|
} else {
|
|
ajaxify_login_form();
|
|
}
|
|
},
|
|
});
|
|
}
|
|
|
|
function close_login() {
|
|
$("#gLoginForm").remove();
|
|
$("#gLoginClose").hide();
|
|
$("#gLoginLink").show();
|
|
$("input#gUsername").val("");
|
|
$("input#gPassword").val("");
|
|
}
|