moved create account link on login page to a hook
[mediagoblin.git] / mediagoblin / templates / mediagoblin / auth / login.html
index 2adbe5470717a225f7da857a353317a840465606..93cd82d925ce21f9110f721a6c68ce73318d1ba7 100644 (file)
@@ -20,8 +20,8 @@
 {% import "/mediagoblin/utils/wtforms.html" as wtforms_util %}
 
 {% block mediagoblin_head %}
-  <script type="text/javascript"
-          src="{{ request.staticdirect('/js/autofilledin_password.js') }}"></script>
+  {{ super() }}
+  {% template_hook("fp_head") %}
 {% endblock %}
 
 {% block title -%}
@@ -29,7 +29,7 @@
 {%- endblock %}
 
 {% block mediagoblin_content %}
-  <form action="{{ request.urlgen('mediagoblin.auth.login') }}"
+  <form action="{{ post_url }}"
         method="POST" enctype="multipart/form-data">
     {{ csrf_token }}
     <div class="form_box">
           {% trans %}Logging in failed!{% endtrans %}
         </div>
       {% endif %}
-      {% if allow_registration %}
-        <p>
-          {% trans %}Don't have an account yet?{% endtrans %} <a href="{{ request.urlgen('mediagoblin.auth.register') }}">
-            {%- trans %}Create one here!{% endtrans %}</a>
-        </p>
-      {% endif %}
-      {{ wtforms_util.render_divs(login_form) }}
-      {% if pass_auth %}
-        <p>
-          <a href="{{ request.urlgen('mediagoblin.auth.forgot_password') }}" id="forgot_password">
-          {% trans %}Forgot your password?{% endtrans %}</a>
-        </p>
-      {% endif %}
+      {% template_hook("create_account") %}
+      {% template_hook("login_link") %} 
+      {{ wtforms_util.render_divs(login_form, True) }}
+      {% template_hook("fp_link") %}
       <div class="form_submit_buttons">
         <input type="submit" value="{% trans %}Log in{% endtrans %}" class="button_form"/>
       </div>
@@ -61,6 +52,4 @@
       {% endif %}
     </div>
   </form>
-<!-- Focus the field passed in with the focus arg-->
-<script>$(document).ready(function(){$({{ focus }}).focus();});</script>
 {% endblock %}