Adds create user view, minor fixes

This commit is contained in:
nikolark committed 2014-02-02 16:52:15 +01:00
1 parent 7f84c936ab
commit b7b0238871
13 files changed
+2354 -2251

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
{% extends "base.html" %}
{% load widget_tweaks %}
{% block title %}Lag ny bruker {% endblock %}
{% block header %}
{% include "nav.html" with active="create_user" %}
{% endblock %}
{% block content %}
<section class="row">
<div class="col-md-4">
{% for message in messages %}
<div {% if message.tags %} class="alert alert-{{ message.tags }}"{% endif %}>{{ message }}<a class="close" data-dismiss="alert">×</a></div>
{% endfor %}
</div>
</section>
<section class="row">
<div class="col-md-5">
<h1>Legg til ny bruker</h1>
{% if form.errors %}
<p>{{ form.errors }}.</p>
{% endif %}
<form method="post" role="form">
{% csrf_token %}
<div class="form-group">
<label for="id_first_name">{{ form.first_name.label }}</label>{{ form.first_name|add_class:"form-control"}}
<label for="id_last_name">{{ form.last_name.label }}</label>{{ form.last_name|add_class:"form-control"}}
<label for="id_email">{{ form.email.label }}</label>{{ form.email|add_class:"form-control"}}
<label for="id_facebook_username">{{ form.facebook_username.label }}</label>{{ form.facebook_username|add_class:"form-control"|attr:"placeholder: F.eks simbras"}}
</div>
<input type="submit" value="Legg til" class="btn btn-primary btn-lg" />
<a href="{% url register %}" class="btn btn-default" />Tilbake</a>
</form>
</div>
</section>
{% endblock %}