view MoinMoin/templates/login.html @ 214:0f501a426b50

HTML5 <input> Tag attribute "required" added additional to the required class definition. This indicates that the input field's value is required in order to submit the form. On HTML5 capable browsers the form is not send until the value is set.
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Wed, 04 May 2011 22:22:46 +0200
parents 5568cf133caf
children d661d49a46dc
line wrap: on
line source
{% extends theme("layout.html") %}
{% import "forms.html" as forms %}

{% block item %}
<div class="moin-form">
{{ forms.render_errors(form) }}

{% if 'username' in login_inputs or 'password' in login_inputs %}
<h2>{{ _('Moin login') }}</h2>
{{ gen.form.open(form, method="post", action=url_for('frontend.login')) }}
<dl>
  {{ gen.input(form['submit'], type='hidden') }}

  {% if 'username' in login_inputs %}
  {{ forms.render_field(gen, form['username'], 'text', 'required') }}
  {% endif %}
  {% if 'password' in login_inputs %}
  {{ forms.render_field(gen, form['password'], 'password', 'required') }}
  {% endif %}

  <input type="submit" value="{{ _('Log in') }}" />
</dl>
{{ gen.form.close() }}
{% endif %}

{% if 'openid' in login_inputs %}
<br>
<h2>{{ _('OpenID login') }}</h2>

{{ gen.form.open(form, method="post", action=url_for('frontend.login')) }}
<dl>
  {{ gen.input(form['submit'], type='hidden') }}

  {{ forms.render_field(gen, form['openid'], 'text') }}
  <input type="submit" value="{{ _('Log in') }}" />
</dl>
{{ gen.form.close() }}
{% endif %}

</div>
{% endblock %}