changeset 2433:3fc501bfd78d

adds login view
author sharky93 <rishabhr123@gmail.com>
date Wed, 28 Aug 2013 01:33:14 +0530
parents 0da75e403c80
children a2faaed87cf6
files MoinMoin/themes/basic/templates/login.html
diffstat 1 files changed, 48 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/themes/basic/templates/login.html	Wed Aug 28 01:33:14 2013 +0530
@@ -0,0 +1,48 @@
+{% extends theme("layout.html") %}
+{% import "forms.html" as forms %}
+
+{% block content %}
+<div class="col-lg-4">
+	{{ 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')) }}
+
+		  {% if 'username' in login_inputs %}
+		    <div class="form-group">
+		    	{{ gen.label(form['username']) }}
+		    	{{ gen.input(form['username'], type="text", class="form-control") }}
+		    </div>
+		  {% endif %}
+		  {% if 'password' in login_inputs %}
+		    <div class="form-group">
+		    	{{ gen.label(form['password']) }}
+		    	{{ gen.input(form['password'], type="password", class="form-control") }}
+		    </div>
+		  {% endif %}
+
+		{{ forms.render(form['submit']) }}
+
+		<div class="form-group">
+		    {{ forms.render_submit(form, class='btn btn-primary') }}
+		</div>
+		{{ gen.form.close() }}
+	{% endif %}
+
+	{% if 'openid' in login_inputs %}
+	<h2>{{ _('OpenID login') }}</h2>
+
+		{{ gen.form.open(form, method="post", action=url_for('frontend.login')) }}
+
+		  {{ forms.render(form['openid']) }}
+
+		{{ forms.render(form['submit']) }}
+		<div class="form-group">
+		    {{ forms.render_submit(form, class='btn btn-primary') }}
+		</div>
+		{{ gen.form.close() }}
+		{% endif %}
+
+</div>
+{% endblock %}