moved create account link on login page to a hook
[mediagoblin.git] / mediagoblin / templates / mediagoblin / auth / login.html
index c2e27c1593a47dd24812cdcafa8935a49cc416cb..93cd82d925ce21f9110f721a6c68ce73318d1ba7 100644 (file)
@@ -1,6 +1,6 @@
 {#
 # GNU MediaGoblin -- federated, autonomous media hosting
-# Copyright (C) 2011 Free Software Foundation, Inc
+# Copyright (C) 2011, 2012 MediaGoblin contributors.  See AUTHORS.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU Affero General Public License as published by
 
 {% import "/mediagoblin/utils/wtforms.html" as wtforms_util %}
 
-{% block mediagoblin_content %}
+{% block mediagoblin_head %}
+  {{ super() }}
+  {% template_hook("fp_head") %}
+{% endblock %}
 
-  <form action="{{ request.urlgen('mediagoblin.auth.login') }}"
+{% block title -%}
+  {% trans %}Log in{% endtrans %} &mdash; {{ super() }}
+{%- endblock %}
+
+{% block mediagoblin_content %}
+  <form action="{{ post_url }}"
         method="POST" enctype="multipart/form-data">
-    <div class="login_box form_box">
-      <h1>Log in</h1>
+    {{ csrf_token }}
+    <div class="form_box">
+      <h1>{% trans %}Log in{% endtrans %}</h1>
       {% if login_failed %}
-        <div class="form_field_error">Login failed!</div>
+        <div class="form_field_error">
+          {% trans %}Logging in failed!{% endtrans %}
+        </div>
       {% endif %}
-      {{ wtforms_util.render_divs(login_form) }}
+      {% 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="submit" class="button"/>
+        <input type="submit" value="{% trans %}Log in{% endtrans %}" class="button_form"/>
       </div>
       {% if next %}
-        <input type="hidden" name="next" value="{{ next }}" class="button"
+        <input type="hidden" name="next" value="{{ next }}" class="button_form"
                style="display: none;"/>
       {% endif %}
-      <p>Don't have an account yet? <a href="{{ request.urlgen('mediagoblin.auth.register') }}">Create one here!</a></p>
     </div>
   </form>
 {% endblock %}