diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql index e40208ba343bab8aeb675e792a3566fd0e573028..dfbfde36243cb7568aab8c3af543f79ae5a54f0d 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 localAuthority; +insert into localAuthority (localAthorityID, localAuthorityName, address1, address2, city, county, postcode, website) value ('1', 'Caerphilly County Borough Council', 'Tredomen Park', 'Ystrad Mynach, Hengoed', '', 'CF82 7PG', 'https://www.caerphilly.gov.uk/main.aspx?lang=en-GB'); +insert into localAuthority (localAthorityID, localAuthorityName, address1, address2, city, county, postcode, website) value ('2', 'Risca Town Council', 'Unit B, 75 Tredegar Street', '', 'Risca', '', 'NP11 6BW', 'https://www.riscatowncouncil.org.uk/'); +insert into localAuthority (localAthorityID, localAuthorityName, address1, address2, city, county, postcode, website) value ('3', 'Penarth Town Council West House', 'Stanwell Road', '', 'Penarth', '', 'CF64 2YG', 'https://www.penarthtowncouncil.gov.uk/your-council/'); \ No newline at end of file diff --git a/src/main/resources/local-auth-data.html b/src/main/resources/local-auth-data.html index 96d85135648befa9df431c5ddb13c931ae0da3b1..d7c5e170439a74c4dfb1efa297fbd07477fc0b1f 100644 --- a/src/main/resources/local-auth-data.html +++ b/src/main/resources/local-auth-data.html @@ -7,9 +7,38 @@ </head> <body> <div id="container1"> - <form id="data"> - - </form> + <h2>Enter your Local authority</h2> + <form action="local-auth-data.php" method="post" id="data"> + <p> + <label for="localAthorityName">Enter your local authority</label> + <input type="text" name="authority_name" id="localAthorityName"> + </p> + <p> + <label for="address1">Please enter first line of address</label> + <input type="text" name="address_1" id="address1"> + </p> + <p> + <label for="address2">Please enter second line of 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> + <p> + <label for="website">Please enter your website address</label> + <input type="url" name="web_site" id="website"> + </p> + <input type="submit" value="Submit Data"> + </form> </div> </body> <footer th:insert="~{/towns/Templating.html::footer}"></footer> diff --git a/src/main/resources/local-authorities.html b/src/main/resources/local-authorities.html index ee5200855ba208548d958c8ecbf020545ea2864a..3526761a2c43a0a80b385f01b9d923d578321d1f 100644 --- a/src/main/resources/local-authorities.html +++ b/src/main/resources/local-authorities.html @@ -9,12 +9,6 @@ <body> <h1>Local Authorities</h1> <div id="councils"> - <p>Caerphilly County Borough Council,<br>Tredomen Park,<br> Ystrad Mynach,<br> Hengoed,<br> CF82 7PG</p> - <a href="https://www.caerphilly.gov.uk/main.aspx?lang=en-GB">Caerphilly County Borough Council Website</a> - <p>Risca Town Council,<br>Risca Palace Library,<br>Unit B,<br>75 Tredegar Street,<br>Risca,<br>NP11 6BW</p> - <a href="https://www.riscatowncouncil.org.uk/">Risca Town Council Website</a> - <p>Penarth Town Council West House,<br>Stanwell Road,<br>Penarth,<br> CF64 2YG</p> - <a href="https://www.penarthtowncouncil.gov.uk/your-council/">Penarth Town Council Website</a> </div> <p>Local Autorities please enter here</p><button><a href="local-auth-data.html" id="authority">Login</a></button> <footer th:insert="~{/towns/Templating.html::footer}"></footer> diff --git a/src/main/resources/schema.sql b/src/main/resources/schema.sql index 92b8d4e0377d6ceeb58aef53b35e946670b6bc62..43f6da94fe471a5e173b409570cd7d61f9e41792 100644 --- a/src/main/resources/schema.sql +++ b/src/main/resources/schema.sql @@ -57,4 +57,17 @@ create table if not exists stickerProgress userID bigint, stickerID bigint, hasSticker boolean /*Has sticker or not*/ +) engine=InnoDB; + +drop table if exists localAuthority; +create table if not exists localAuthority +( + localAuthorityID bigint auto_increment primary key, + localAuthorityName varchar(250), + address1 varchar(250), + address2 varchar(250), + city varchar(100), + county varchar(75), + postcode varchar(15), + website varchar(250) ) engine=InnoDB; \ No newline at end of file