Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / templates / im / auth / local_login_prompt.html @ 607a487b

History | View | Annotate | Download (1.2 kB)

1
<form action="{% url astakos.im.target.local.login %}" method="post" 
2
  class="login-form login innerlabels">{% csrf_token %}
3
  <h2 class="form-toggler"><a href="#">LOGIN USING YOUR LOCAL ACCOUNT</a></h2>
4
  <div class="login-form" style="display:none">
5
    {% with login_form as form %}
6
        {% include "im/form_render.html" %}
7
    {% endwith %}
8
    <input type="hidden" name="next" value="{{ next }}">
9
    
10
    {% if key %}
11
        <input type="hidden" name="key" value="{{key}}">
12
    {% else %}
13
        {% if request.GET.key %}
14
            <input type="hidden" name="key" value="{{request.GET.key}}">
15
        {% endif %}
16
    {% endif %}
17
    
18
    <div class="form-row submit clearfix">
19
        <input type="submit" class="submit altcol" value="SUBMIT" />
20
        <a class="extra-link" href="{% url django.contrib.auth.views.password_reset %}">Forgot your password?</a>
21
      </div>
22
    </div>
23
  </form>
24
  <script>
25
    $(document).ready(function(){
26
      $("h2.form-toggler a").click(function(e) {
27
        e.preventDefault();
28
        $("div.login-form").slideToggle();
29
      });
30
      if ($('form.login-form .form-row.with-errors, form.login-form .form-error').length > 0) {
31
        $('div.login-form').css({display:'block'});
32
          };
33
    })
34
  </script>