X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetstack%2Ftemplates%2Fadmin%2Flogin.html;h=37f1055b4f213c59cbf2579e5673dbfff4921cc1;hb=fb4b29a51e5215f0313232e7093a70a1013651e1;hp=a1657073094dca4bde8306b1883190e7a59f3182;hpb=5face3a51e012b741a48302207fc1b025e0909ca;p=plstackapi.git diff --git a/planetstack/templates/admin/login.html b/planetstack/templates/admin/login.html index a165707..37f1055 100644 --- a/planetstack/templates/admin/login.html +++ b/planetstack/templates/admin/login.html @@ -25,7 +25,12 @@ {% endif %} {% if form.non_field_errors or form.this_is_the_login_form.errors %} -{% for error in form.non_field_errors|add:form.this_is_the_login_form.errors %} +{% for error in form.non_field_errors %} +

+ {{ error }} +

+{% endfor %} +{% for error in form.this_is_the_login_form.errors %}

{{ error }}

@@ -126,7 +131,16 @@ $("#request-signup").unbind().click(function(){ }, async: false, type: 'POST', - success: function () { + success: function (response) { + if (response && response.error) { + if (response.error == "already_approved") { + alert("Your request has already been proccessed and approved. We are sending you another email with a new temporary password"); + return; + } else if (response.error == "already_pending") { + alert("Your request is already pending and awaiting approval"); + return; + } + } $("#request-account-form").dialog("close"); alert("Your request has been submitted"); },