diff --git a/ihatemoney/static/css/main.css b/ihatemoney/static/css/main.css index 04e0a66b..59df8e18 100644 --- a/ihatemoney/static/css/main.css +++ b/ihatemoney/static/css/main.css @@ -270,7 +270,6 @@ footer .footer-left { #new-bill { margin-top: 30px; - z-index:100; } #previous-page { diff --git a/ihatemoney/templates/layout.html b/ihatemoney/templates/layout.html index 639429e7..dc3d32f6 100644 --- a/ihatemoney/templates/layout.html +++ b/ihatemoney/templates/layout.html @@ -126,7 +126,7 @@
{% for message in get_flashed_messages() %} -
{{ message }}
+
{{ message }}
{% endfor %}
diff --git a/ihatemoney/templates/list_bills.html b/ihatemoney/templates/list_bills.html index 9f53c5ba..0f2a68a5 100644 --- a/ihatemoney/templates/list_bills.html +++ b/ihatemoney/templates/list_bills.html @@ -17,10 +17,6 @@ }); }); - $('.undo').click(function(){ - console.log("HI"); - }); - var highlight_owers = function(){ var ower_ids = $(this).attr("owers").split(','); var payer_id = $(this).attr("payer"); diff --git a/ihatemoney/web.py b/ihatemoney/web.py index b4efaa84..2b0fa70d 100644 --- a/ihatemoney/web.py +++ b/ihatemoney/web.py @@ -705,6 +705,7 @@ def undo_delete_bill(): db.session.add(form.fake_form(bill, g.project)) db.session.commit() + print(bill.to_json()) return redirect(url_for(".list_bills")) @@ -715,11 +716,10 @@ def delete_bill(bill_id): if not bill: return redirect(url_for(".list_bills")) + session["recently_deleted_bill"] = bill.to_json() db.session.delete(bill) db.session.commit() - session["test"] = bill.to_json() - url = url_for(".undo_delete_bill") alert = 'The bill has been deleted undo ' flash(Markup(alert))