diff --git a/devel/TODO b/devel/TODO index 87919b6..e47269c 100644 --- a/devel/TODO +++ b/devel/TODO @@ -7,6 +7,7 @@ Noch zu tun: [ ] API [ ] Kassenwart-ueberweisung "ok" interface [ ] Einstellungen (email bei ueberweisung,...?) +[ ] Ldap anbindung fuer login Nice-to-haf: diff --git a/k4ever/transaction/templates/transaction/overview.html b/k4ever/transaction/templates/transaction/overview.html index 359e31c..408f405 100644 --- a/k4ever/transaction/templates/transaction/overview.html +++ b/k4ever/transaction/templates/transaction/overview.html @@ -2,7 +2,11 @@ {% block "content" %} {% if transacted %} - YOU DID IT!. You transacted money! + {% if error %} + ARGHZ. U broakzt t3h formul4r! + {% else %} + YOU DID IT!. You transacted money! + {% endif %} {% endif %}
{% csrf_token %} diff --git a/k4ever/transaction/views.py b/k4ever/transaction/views.py index 8b04ddd..b79f9c5 100644 --- a/k4ever/transaction/views.py +++ b/k4ever/transaction/views.py @@ -10,7 +10,9 @@ import datetime def overview(request): history = Transaction.objects.filter(user=request.user).order_by("-dateTime") transacted = False + error = False if request.method == 'POST': + transacted = True transaction = Transaction(user=request.user, dateTime=datetime.datetime.now()) form = TransactionForm(request.POST, instance=transaction) if form.is_valid(): @@ -18,10 +20,11 @@ def overview(request): form = TransactionForm() transacted = True else: - pass + error = True + form = TransactionForm() else: form = TransactionForm() - return render_to_response("transaction/overview.html", {'history': history, 'form': form, 'transacted': transacted}, RequestContext(request)) + return render_to_response("transaction/overview.html", {'history': history, 'form': form, 'transacted': transacted, 'error': error}, RequestContext(request)) @login_required def transact(request):