diff --git a/src/main/resources/WorkWith/towns-data.html b/src/main/resources/WorkWith/towns-data.html index 8f27a175e3d6fca64995cf79c2e2423d27ec1982..5ed858c66b92f30ed51b028350e2e710a9d925c7 100644 --- a/src/main/resources/WorkWith/towns-data.html +++ b/src/main/resources/WorkWith/towns-data.html @@ -3,8 +3,39 @@ <head> <meta charset="UTF-8"> <title>Towns</title> + <link rel="stylesheet" href="static/css/templatingstyle.css"> </head> <body> +<div id="container1"> + <h2>Enter your Local authority</h2> + <form action="local-auth-data.php" method="post" id="data"> + <p> + <label for="townName">Enter your town</label> + <input type="text" name="town_Name" id="townName"> + </p> + <p> + <label for="address1">Please enter first line of your address</label> + <input type="text" name="address_1" id="address1"> + </p> + <p> + <label for="address2">Please enter second line of your address (optional)</label> + <input type="text" name="address_2" id="address2"> + </p> + <p> + <label for="city">Please enter the City/Town</label> + <input type="text" name="city" id="city"> + </p> + <p> + <label for="county">Please enter you county (optional)</label> + <input type="text" name="county" id="county"> + </p> + <p> + <label for="postcode">Please enter your postcode</label> + <input type="text" name="post_code" id="postcode"> + </p> + <input type="submit" value="Submit Data"> + </form> +</div> </body> </html> \ No newline at end of file diff --git a/src/main/resources/WorkWith/towns.html b/src/main/resources/WorkWith/towns.html index 5fa1c03ec9597d8b94ff53ef42786cee0b691cfe..71fd80f69801f818d5c2b7bf7f2f1332f504fc04 100644 --- a/src/main/resources/WorkWith/towns.html +++ b/src/main/resources/WorkWith/towns.html @@ -11,6 +11,7 @@ <p>Giving local businesses a voice in the community</p> <h1>Empowering Community Spirit</h1> <h1>Creating the towns Identity</h1> +<button id="submit">Towns log in here</button><a href="towns-data.html"></a> </body> <footer th:insert="~{/towns/Templating.html::footer}"></footer> </html> \ No newline at end of file diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql index e40208ba343bab8aeb675e792a3566fd0e573028..342be16c4cf4e592070ebc07f225dede965f06c2 100644 --- a/src/main/resources/data.sql +++ b/src/main/resources/data.sql @@ -54,4 +54,9 @@ insert into badgeprogress (userID, badgeID, progress) value ('2', '2', '70'); delete from stickerprogress; insert into stickerprogress (userID, stickerID, hasSticker) value ('1', '1', true); insert into stickerprogress (userID, stickerID, hasSticker) value ('1', '3', true); -insert into stickerprogress (userID, stickerID, hasSticker) value ('2', '2', true); \ No newline at end of file +insert into stickerprogress (userID, stickerID, hasSticker) value ('2', '2', true); + +delete from townswithtrails +insert into townswithtrails (townName, address1, address2, city, county, postcode) value ('Caerphilly Town', 'Castle Street', '', 'Caerphilly', '', 'CF83 1NU'); +insert into townswithtrails (townName, address1, address2, city, county, postcode) value ('Penarth Town', '1 Windsor Arcade', '', 'Penarth', '', 'CF64 1JA'); +insert into townswithtrails (townName, address1, address2, city, county, postcode) value ('Risca Town', '47 Tredegar Street', 'Pontymister, Risca West', 'Newport', 'Caerphilly County Borough', 'NP11 6BW'); \ No newline at end of file diff --git a/src/main/resources/schema.sql b/src/main/resources/schema.sql index 92b8d4e0377d6ceeb58aef53b35e946670b6bc62..7c2c19d19b5b13c0df9d32b73fe553fe07284150 100644 --- a/src/main/resources/schema.sql +++ b/src/main/resources/schema.sql @@ -57,4 +57,16 @@ create table if not exists stickerProgress userID bigint, stickerID bigint, hasSticker boolean /*Has sticker or not*/ +) engine=InnoDB; + +drop table if exists townsWithTrails; +create table if not exists townsWithTrails +( + townsWithTrailsID bigint auto_increment primary key, + townName varchar(128), + address1 varchar(128), + address2 varchar(128), + city varchar(128), + county varchar(128), + postcode varchar(15) ) engine=InnoDB; \ No newline at end of file