Initial commit
This commit is contained in:
60
templates/base.html
Normal file
60
templates/base.html
Normal file
@@ -0,0 +1,60 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" dir="ltr">
|
||||
<head>
|
||||
<!-- meta tags -->
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="Author" content="Martin Bley" />
|
||||
<meta name="Description" content="Tippspiel" />
|
||||
<meta name="Copyright" content="Martin Bley, 2014-2015" />
|
||||
<meta name="Robots" content="robots" />
|
||||
<meta name="Generator" content="Django" />
|
||||
<meta name="Keywords" content="Tippspiel Bundesliga" />
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- Bootstrap -->
|
||||
<link href="{{ STATIC_URL }}css/bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Bootstrap-Theme -->
|
||||
<link href="{{ STATIC_URL }}css/bootstrap-theme.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Bootstrap-Theme -->
|
||||
<link href="{{ STATIC_URL }}css/tippy-bootstrap.css" rel="stylesheet">
|
||||
|
||||
<!-- Unterstützung für Media Queries und HTML5-Elemente im Internet Explorer über HTML5 shim und Respond.js -->
|
||||
<!-- ACHTUNG: Respond.js funktioniert nicht, wenn du die Seite über file:// aufrufst -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
{% block head %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- jQuery (wird für Bootstrap JavaScript-Plugins benötigt) -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
|
||||
<!-- Binde alle kompilierten Plugins zusammen ein (wie hier unten) oder such dir einzelne Dateien nach Bedarf aus -->
|
||||
<script src="{{ STATIC_URL }}js/bootstrap.min.js"></script>
|
||||
|
||||
{% block nav %}{% endblock %}
|
||||
|
||||
<div class="jumbotron">
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
{% block body %}{% endblock %}
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
<p>© Martin Bley, 2014-2015 | Dank an <a href="http://openligadb.de">OpenLigaDB</a> für
|
||||
die Bereitstellung der Spielergebnisse.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body></html>
|
||||
|
||||
72
templates/blogindex.html
Normal file
72
templates/blogindex.html
Normal file
@@ -0,0 +1,72 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n static %}
|
||||
{% load humanize %}
|
||||
{% block head %}
|
||||
<title> TipPy Blog</title>
|
||||
{% endblock %}
|
||||
|
||||
{% block nav %}
|
||||
{% include "nav.html" with ls=ls season=season %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div id="content-main">
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
<h2>TipPy Blog</h2>
|
||||
<p class="text-right">
|
||||
<a class="btn btn-default" href="/blog/newpost" role="button">Neue Nachricht</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% for post, avatar in posts %}
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
{{post.author.first_name}} schrieb {{post.created|naturaltime}},
|
||||
<a href="{{post.get_absolute_url}}">{{post.title}}</a>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{% if avatar %}
|
||||
<img class="img-circle img-responsive pull-left blog" alt="Profile Pic" src="/media/{{avatar}}" />
|
||||
{% else %}
|
||||
<img class="img-circle img-responsive pull-left blog" alt="Profile Pic" src="/media/profiles/dummy.png" />
|
||||
{% endif %}
|
||||
{{post.content|safe}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
{% if posts.has_previous %}
|
||||
<li data-toggle="tooltip" title="{% trans 'previous' %}" class="previous">
|
||||
<a href="/blog/{{ page|add:"-1" }}">
|
||||
{% else %}
|
||||
<li data-toggle="tooltip" title="{% trans 'previous' %}" class="previous inactive">
|
||||
<a href="/blog/{{ page }}">
|
||||
{% endif %}
|
||||
<span aria-hidden="true">←</span>
|
||||
</a>
|
||||
</li>
|
||||
Seite {{ posts.number }} von {{ posts.paginator.num_pages }}.
|
||||
{% if posts.has_next %}
|
||||
<li data-toggle="tooltip" title="{% trans 'next' %}" class="next">
|
||||
<a href="/blog/{{ page|add:"1" }}">
|
||||
{% else %}
|
||||
<li data-toggle="tooltip" title="{% trans 'next' %}" class="next inactive">
|
||||
<a href="/blog/{{ page }}">
|
||||
{% endif %}
|
||||
<span aria-hidden="true">→</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
32
templates/blogpost.html
Normal file
32
templates/blogpost.html
Normal file
@@ -0,0 +1,32 @@
|
||||
{% extends "base.html" %}
|
||||
{% block head %}
|
||||
<title> TipPy Blog</title>
|
||||
{% endblock %}
|
||||
|
||||
{% block nav %}
|
||||
{% include "nav.html" with ls=ls season=season %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div id="content-main">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<article>
|
||||
<header>
|
||||
<h3> {{post.title}} </h3>
|
||||
<p>
|
||||
geposted am
|
||||
<time datetime="{{post.created|date:""}}">
|
||||
{{post.created|date}} von {{post.author}}
|
||||
</time>
|
||||
</p>
|
||||
</header>
|
||||
<p class="description">
|
||||
{{post.description}}
|
||||
</p>
|
||||
{{post.content|safe}}
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
38
templates/charts.html
Normal file
38
templates/charts.html
Normal file
@@ -0,0 +1,38 @@
|
||||
{% extends "base.html" %}
|
||||
{% block head %}
|
||||
<title> TipPy Charts</title>
|
||||
{% endblock %}
|
||||
|
||||
{% block nav %}
|
||||
{% include "nav.html" with ls=ls season=season %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% for mandant, users in mandant_dict.items %}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h2>Bestenliste
|
||||
{% if pos == 'rueck' %}
|
||||
(Rückrunde)</h2>
|
||||
<p><a href="/charts/{{ ls }}/{{ season }}/hin">Hinrunde anzeigen</a></p>
|
||||
{% elif pos == 'hin' %}
|
||||
(Hinrunde)</h3>
|
||||
<p><a href="/charts/{{ ls }}/{{ season }}/rueck">Rückrunde anzeigen</a></p>
|
||||
{% endif %}
|
||||
<h4>Tippgemeinschaft: {{ mandant }}</h4>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Spieler</th>
|
||||
<th>Punkte</th>
|
||||
</tr>
|
||||
{% for user, score in users %}
|
||||
<tr>
|
||||
<td>{{ user }}</td>
|
||||
<td>{{ score }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
33
templates/login.html
Normal file
33
templates/login.html
Normal file
@@ -0,0 +1,33 @@
|
||||
{% extends "base.html" %}
|
||||
{% load url from future %}
|
||||
{% comment %}
|
||||
Main page to authenticate users.
|
||||
{% endcomment %}
|
||||
|
||||
{% block head %}
|
||||
<title>TipPy | Login</title>
|
||||
{% endblock %}
|
||||
|
||||
{% block nav %}
|
||||
{% include "nav_login.html" with ls=ls season=season %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% if form.errors %}
|
||||
<div class="row">
|
||||
<p>Benutzename und Passwort passen nicht zusammen. Bitte versuche es noch einmal.</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<form class="form-signin" role="form" method="post" action="{% url 'django.contrib.auth.views.login' %}">
|
||||
<h2 class="form-signin-heading">Bitte melde dich an</h2>
|
||||
{% csrf_token %}
|
||||
<input class="form-control" type="text" autofocus="" required="" name="{{form.username.html_name}}" placeholder="Anmeldename" />
|
||||
<input class="form-control" type="password" required="" placeholder="Passwort" name="{{form.password.html_name}}" />
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Anmelden</button>
|
||||
<input type="hidden" name="next" value="{{ next }}" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
109
templates/md.html
Normal file
109
templates/md.html
Normal file
@@ -0,0 +1,109 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n static %}
|
||||
{% load humanize %}
|
||||
{% block head %}
|
||||
<script type="text/javascript" src="{{ STATIC_URL }}javascript/tippy.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block nav %}
|
||||
{% include "nav.html" with ls=ls season=season %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div id="content-main">
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
<h2>Neueste Nachrichten</h2>
|
||||
<p class="text-right">
|
||||
<a class="btn btn-default" href="/blog/1" role="button">zum Blog</a>
|
||||
</p>
|
||||
{% for post, avatar in posts %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
{{post.author.first_name}} schrieb {{post.created|naturaltime}},
|
||||
<a href="{{post.get_absolute_url}}">{{post.title}}</a>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{% if avatar %}
|
||||
<img class="img-circle img-responsive pull-left blog" alt="Profile Pic" src="/media/{{avatar}}" />
|
||||
{% else %}
|
||||
<img class="img-circle img-responsive pull-left blog" alt="Profile Pic" src="/media/profiles/dummy.png" />
|
||||
{% endif %}
|
||||
{{post.content|safe}}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
<h2>Deine Tipps</h2>
|
||||
<nav>
|
||||
<ul class="pager">
|
||||
<li data-toggle="tooltip" title="{% trans 'previous' %}" class="previous"><a href="/matchday/{{ ls }}/{{ season }}/{{ cur_md|add:"-1"|stringformat:"02i" }}"><span aria-hidden="true">←</span></a></li>
|
||||
{{ cur_md }}. Spieltag
|
||||
<li data-toggle="tooltip" title="{% trans 'next' %}" class="next"><a href="/matchday/{{ ls }}/{{ season }}/{{ cur_md|add:"1"|stringformat:"02i" }}"><span aria-hidden="true">→</span></a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<form role="form" action="" method="post">{% csrf_token %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-condensed">
|
||||
<tr>
|
||||
<th>Anstoß</th>
|
||||
<th>Heim</th>
|
||||
<th>Gast</th>
|
||||
<th>Erg.></th>
|
||||
<th colspan="2">Tipp</th>
|
||||
</tr>
|
||||
{% for match in matches %}
|
||||
{% if match.started and not match.finished %}
|
||||
<tr class="danger">{% else %}<tr>{% endif %}
|
||||
<td>{{ match.matchDateTime }}</td>
|
||||
<td><img src="{{ STATIC_URL}}{{ match.iconTeam1 }}" />
|
||||
<span class="hidden-xs"> {{ match.nameTeam1 }}</span>
|
||||
<span class="visible-xs"> {{ match.abbrTeam1 }}</span>
|
||||
</td>
|
||||
<td><img src="{{ STATIC_URL}}{{ match.iconTeam2 }}" />
|
||||
<span class="hidden-xs"> {{ match.nameTeam2 }}</span>
|
||||
<span class="visible-xs"> {{ match.abbrTeam2 }}</span>
|
||||
</td>
|
||||
<td>{{ match.matchResult }}</td>
|
||||
<td>{{ match.tippFormTeam1 }}</td><td>{{ match.tippFormTeam2 }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-default btn-lg btn-block">
|
||||
<span class="glyphicon glyphicon-saved" aria-hidden="true"></span> Tipps abgeben
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
<h2>Mitspieler</h2>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-condensed">
|
||||
<tr>
|
||||
<th>Tipper</th>
|
||||
<th>Gesamt</th>
|
||||
{% for match in matches %}
|
||||
<th><img src="{{ STATIC_URL }}{{ match.iconTeam1 }}" /><br /><br />
|
||||
<img src="{{ STATIC_URL }}{{ match.iconTeam2 }}" /></th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% for mate in tipp_mates %}
|
||||
<tr>
|
||||
<td>{{ mate.mate }}</td>
|
||||
<td>{{ mate.sum_score }}</td>
|
||||
{% for tipp in mate.tipps %}
|
||||
<td>{{ tipp }}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
41
templates/nav.html
Normal file
41
templates/nav.html
Normal file
@@ -0,0 +1,41 @@
|
||||
{% load i18n static %}
|
||||
<!-- Fixierte Navbar -->
|
||||
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">Navigation ein-/ausblenden</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<span class="navbar-brand">TipPy 1.0</span>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="/">Tipps</a></li>
|
||||
<li><a href="/charts/{{ ls }}/{{ season }}{% if pos %}/{{ pos }}{% endif %}">Bestenliste</a></li>
|
||||
<li><a href="/blog/1">Blog</a></li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{% if has_refresh %}
|
||||
<li>
|
||||
<a data-toggle="tooltip" title="Ergebnisse aktualisieren" href="/update/{{ ls }}/{{ season }}/{{ cur_md }}">
|
||||
<span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="glyphicon glyphicon-user"></span> {{ user.first_name }} <span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="/accounts/profile/{{user.id}}">Profil ändern</a></li>
|
||||
<li><a href="/accounts/password_change/">Passwort ändern</a></li>
|
||||
<li><a href="/logout">Abmelden</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</div>
|
||||
13
templates/nav_login.html
Normal file
13
templates/nav_login.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="sr-only">Navigation ein-/ausblenden</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<span class="navbar-brand">TipPy 1.0</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
49
templates/newblogpost.html
Normal file
49
templates/newblogpost.html
Normal file
@@ -0,0 +1,49 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n static %}
|
||||
{% block head %}
|
||||
<title> TipPy Blog</title>
|
||||
{% endblock %}
|
||||
|
||||
{% block nav %}
|
||||
{% include "nav.html" with ls=ls season=season %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div id="content-main">
|
||||
{% if form.errors %}
|
||||
<div>
|
||||
<p class="errornote">
|
||||
{% if form.errors.items|length == 1 %}
|
||||
{% trans "Please correct the error below." %}
|
||||
{% else %}
|
||||
{% trans "Please correct the errors below." %}
|
||||
{% endif %}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<form class="form-horizontal" action="" method="post">{% csrf_token %}
|
||||
<div class="form-group">
|
||||
{{form.title.errors}}
|
||||
<label for="id_title" class="col-sm-4 control-label required">{% trans 'Title' %}</label>
|
||||
<div class="col-sm-5">
|
||||
<input id="id_title" maxlength="32" name="title" class="form-control" type="text" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{form.content.errors}}
|
||||
<label for="id_content" class="col-sm-4 control-label required">{% trans 'Content' %}</label>
|
||||
<div class="col-sm-5">
|
||||
<textarea class="form-control" maxlength="256" rows="2" id="id_content" name="content"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-default">{% trans 'Sent' %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
33
templates/registration/login.html
Normal file
33
templates/registration/login.html
Normal file
@@ -0,0 +1,33 @@
|
||||
{% extends "base.html" %}
|
||||
{% load url from future %}
|
||||
{% comment %}
|
||||
Main page to authenticate users.
|
||||
{% endcomment %}
|
||||
|
||||
{% block head %}
|
||||
<title>TipPy | Login</title>
|
||||
{% endblock %}
|
||||
|
||||
{% block nav %}
|
||||
{% include "nav_login.html" with ls=ls season=season %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% if form.errors %}
|
||||
<div class="row">
|
||||
<p>Benutzename und Passwort passen nicht zusammen. Bitte versuche es noch einmal.</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<form class="form-signin" role="form" method="post" action="{% url 'django.contrib.auth.views.login' %}">
|
||||
<h2 class="form-signin-heading">Bitte melde dich an</h2>
|
||||
{% csrf_token %}
|
||||
<input class="form-control" type="text" autofocus="" required="" name="{{form.username.html_name}}" placeholder="Anmeldename" />
|
||||
<input class="form-control" type="password" required="" placeholder="Passwort" name="{{form.password.html_name}}" />
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Anmelden</button>
|
||||
<input type="hidden" name="next" value="{{ next }}" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
22
templates/registration/password_change_done.html
Normal file
22
templates/registration/password_change_done.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n static %}
|
||||
|
||||
{% block title %}{% trans 'Password change successful' %}{% endblock %}
|
||||
|
||||
{% block nav %}
|
||||
{% include "nav.html" with ls=ls season=season %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
|
||||
<div id="content-main">
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<h3>{% trans 'Password change successful' %}</h3>
|
||||
<p>{% trans 'Your password was changed.' %}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
59
templates/registration/password_change_form.html
Normal file
59
templates/registration/password_change_form.html
Normal file
@@ -0,0 +1,59 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n static %}
|
||||
|
||||
{% block title %}{% trans 'Password change' %}{% endblock %}
|
||||
|
||||
{% block nav %}
|
||||
{% include "nav.html" with ls=ls season=season %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div id="content-main">
|
||||
<div>
|
||||
{% if form.errors %}
|
||||
<p class="errornote">
|
||||
{% if form.errors.items|length == 1 %}
|
||||
{% trans "Please correct the error below." %}
|
||||
{% else %}
|
||||
{% trans "Please correct the errors below." %}
|
||||
{% endif %}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<h2 class="form-signin-heading">{% trans 'Password change' %}</h2>
|
||||
<p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p>
|
||||
<form class="form-horizontal" action="" method="post">{% csrf_token %}
|
||||
<div class="form-group">
|
||||
{{ form.old_password.errors }}
|
||||
<label for="id_old_password" class="col-sm-4 control-label required">{% trans 'Old password' %}</label>
|
||||
<div class="col-sm-5">
|
||||
<input id="id_old_password" name="old_password" class="form-control" type="password" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ form.new_password1.errors }}
|
||||
<label for="id_new_password1" class="col-sm-4 control-label required">{% trans 'New password' %}</label>
|
||||
<div class="col-sm-5">
|
||||
<input id="id_new_password1" name="new_password1" class="form-control" type="password" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ form.new_password2.errors }}
|
||||
<label for="id_new_password2" class="col-sm-4 control-label required">{% trans 'Password (again)' %}</label>
|
||||
<div class="col-sm-5">
|
||||
<input id="id_new_password2" name="new_password2" class="form-control" type="password" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-default">{% trans 'Change my password' %}</button>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">document.getElementById("id_old_password").focus();</script>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
80
templates/registration/profile.html
Normal file
80
templates/registration/profile.html
Normal file
@@ -0,0 +1,80 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n static %}
|
||||
|
||||
{% block title %}{% trans 'Password change' %}{% endblock %}
|
||||
|
||||
{% block nav %}
|
||||
{% include "nav.html" with ls=ls season=season %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div id="content-main">
|
||||
<div>
|
||||
{% if form.errors %}
|
||||
<p class="errornote">
|
||||
{% if form.errors.items|length == 1 %}
|
||||
{% trans "Please correct the error below." %}
|
||||
</p><p>{{ form.errors }}
|
||||
{% else %}
|
||||
{% trans "Please correct the errors below." %}
|
||||
{% endif %}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<h2 class="form-signin-heading">{% trans 'Edit Profile' %}</h2>
|
||||
{% if img %}
|
||||
<p><img border="0" alt="Profile Pic" src="{{ img }}" /></p>
|
||||
{% endif %}
|
||||
<form class="form-horizontal" action="" method="post" enctype="multipart/form-data">{% csrf_token %}
|
||||
<div class="form-group">
|
||||
<label for="{{ profile_form.avatar.id_for_label }}" class="col-sm-4 control-label required">Avatar</label>
|
||||
<div class="col-sm-5">
|
||||
{% if img %}
|
||||
<img src="/media/{{ img }}" /><br />
|
||||
<input id="avatar-clear_id" name="avatar-clear" type="checkbox" />
|
||||
<label for="avatar-clear_id">Zurücksetzen</label><br />
|
||||
Ändern: <input id="id_avatar" name="avatar" type="file" />
|
||||
{% else %}
|
||||
<input id="id_avatar" name="avatar" type="file" />
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="{{ user_form.first_name.id_for_label }}" class="col-sm-4 control-label required">Vorname</label>
|
||||
<div class="col-sm-5">
|
||||
{{ user_form.first_name }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="{{ user_form.last_name.id_for_label }}" class="col-sm-4 control-label required">Nachname</label>
|
||||
<div class="col-sm-5">
|
||||
{{ user_form.last_name }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="{{ user_form.email.id_for_label }}" class="col-sm-4 control-label required">E-Mail</label>
|
||||
<div class="col-sm-5">
|
||||
{{ user_form.email }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-default">{% trans 'Update' %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% if debug %}
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<h2 class="form-signin-heading">{% trans 'Debug' %}</h2>
|
||||
{% for line in debug %}
|
||||
<p>{{ line }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
22
templates/registration/profile_change_done.html
Normal file
22
templates/registration/profile_change_done.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{% extends "base.html" %}
|
||||
{% load i18n static %}
|
||||
|
||||
{% block title %}{% trans 'Profile change successful' %}{% endblock %}
|
||||
|
||||
{% block nav %}
|
||||
{% include "nav.html" with ls=ls season=season %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
|
||||
<div id="content-main">
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<h3>{% trans 'Profile change successful' %}</h3>
|
||||
<p>{% trans 'Your profile was changed.' %}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user