From 65fcd3a6be1eff4653a92bb8fdc001bc3e071b00 Mon Sep 17 00:00:00 2001 From: Davide Bongiovanni Date: Sun, 8 Oct 2017 17:40:53 +0200 Subject: [PATCH] Added confirmed check --- static/script.js | 8 ++++++++ static/style.css | 16 ++++++++-------- templates/index.html | 8 ++++++-- test.py | 5 ++++- 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/static/script.js b/static/script.js index b844220..3dc64ce 100644 --- a/static/script.js +++ b/static/script.js @@ -8,4 +8,12 @@ function addme() { function removeme() { +} + +function confirm() { + +} + +function bail() { + } \ No newline at end of file diff --git a/static/style.css b/static/style.css index 2827680..bc4b06a 100644 --- a/static/style.css +++ b/static/style.css @@ -111,9 +111,9 @@ h2 { .rect-button { width: 100pt; height: 25pt; - background: #EE7500; + background-color: #EE7500; position: relative; - color: #F1EDEA; + color: white; left: 220pt; margin-top: 3pt; cursor: pointer; @@ -127,7 +127,7 @@ h2 { left: 0; width: 100%; text-align: center; - color: #EAEAEA; + color: white; } .add-button { @@ -137,9 +137,9 @@ h2 { top: 50%; left: 40pt; margin-top: -25pt; - color: #F1EDEA; + color: white; border-radius: 25pt; - background: #EE7500; + background-color: #EE7500; cursor: pointer; } @@ -191,9 +191,9 @@ h2 { .logout-button { width: 90pt; height: 25pt; - background: #EE7500; + background-color: #EE7500; position: absolute; - color: #F1EDEA; + color: white; left: 75pt; top: 70%; margin-top: -13pt; @@ -208,5 +208,5 @@ h2 { left: 0; width: 100%; text-align: center; - color: #EAEAEA; + color: white; } \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index d8574b7..e9cb0b1 100644 --- a/templates/index.html +++ b/templates/index.html @@ -35,8 +35,12 @@ {{ cook.name }} {% if cook.name == current_user.name %} -
CONFIRM
-
BAIL
+ {% if cook.confirmed == "no" %} +
CONFIRM
+
BAIL
+ {% else %} +
CONFIRMED
+ {% endif %} {% endif %}

Eaters

diff --git a/test.py b/test.py index 4727b81..0afdca9 100644 --- a/test.py +++ b/test.py @@ -48,7 +48,10 @@ wille['name'] = 'Wille' wille['score'] = -15 leaderboard.append(wille) -cook = davide +c_davide = {} +c_davide['name'] = 'Davide' +c_davide['confirmed'] = 'yes' +cook = c_davide eaters = ["Pawel", "Mark", "Sven"] # flask-login