Skip to content
Snippets Groups Projects
Commit dfe8a1a9 authored by Liam Driscoll's avatar Liam Driscoll
Browse files

Updating style for management page.

parent a968a5ad
No related branches found
No related tags found
1 merge request!48Updating style for management page.
...@@ -125,9 +125,9 @@ header #pageHeader ...@@ -125,9 +125,9 @@ header #pageHeader
main #pageMain main #pageMain
form #recordForm form #recordForm
label label .smallLabel
input .formTextInput input textarea .smallInput
button #addButton button
*/ */
...@@ -136,13 +136,38 @@ main #pageMain ...@@ -136,13 +136,38 @@ main #pageMain
flex: 1; flex: 1;
} }
#recordForm { #recordForm label, #recordForm input, #recordForm textarea {
margin-left: 5px; margin-left: 1.25px;
margin-top: 5px;
} }
#recordForm .formTextInput { #recordForm label {
margin-top: 5px; display: inline-block;
min-width: 27.5%;
text-align: right;
font-weight: bold;
vertical-align: top;
}
#recordForm input {
width: 50%;
min-width: 550px;
}
#recordForm textarea {
width: 50%; width: 50%;
min-width: 550px;
font-size: 14.25px;
}
#recordForm .smallLabel {
width: 10%;
min-width: 125px;
}
#recordForm .smallInput {
width: 19.2%;
min-width: 200px;
} }
/* [#4] Page footer styling. Uses [#2]. /* [#4] Page footer styling. Uses [#2].
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function onSubmitLoad() { function onSubmitLoad() {
document.getElementById('searchButton').addEventListener('click',searchRecord); document.getElementById('searchButton').addEventListener('click',searchRecord);
document.getElementById('addButton').addEventListener('click',addRecord); document.getElementById('addButton').addEventListener('click',addRecord);
document.getElementById('editButton').addEventListener('click',editRecord); document.getElementById('updateButton').addEventListener('click',updateRecord);
document.getElementById('deleteButton').addEventListener('click',deleteRecord); document.getElementById('deleteButton').addEventListener('click',deleteRecord);
} }
...@@ -109,7 +109,7 @@ function addRecord(e) { ...@@ -109,7 +109,7 @@ function addRecord(e) {
} }
// Edits a record in the database. // Edits a record in the database.
function editRecord(e) { function updateRecord(e) {
// Removes the standard form processing. // Removes the standard form processing.
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
...@@ -130,7 +130,7 @@ function editRecord(e) { ...@@ -130,7 +130,7 @@ function editRecord(e) {
var params = 'recordName='+recordName+'&recordAddress='+recordAddress+'&recordMainPhotos='+recordMainPhotos+'&recordAdditionalPhotos='+recordAdditionalPhotos+'&recordDescription='+recordDescription+'&recordWebsite='+recordWebsite+'&recordEmail='+recordEmail+'&recordPhoneNumber='+recordPhoneNumber+'&recordOpeningHours='+recordOpeningHours+'&recordCheckinInstructions='+recordCheckinInstructions; var params = 'recordName='+recordName+'&recordAddress='+recordAddress+'&recordMainPhotos='+recordMainPhotos+'&recordAdditionalPhotos='+recordAdditionalPhotos+'&recordDescription='+recordDescription+'&recordWebsite='+recordWebsite+'&recordEmail='+recordEmail+'&recordPhoneNumber='+recordPhoneNumber+'&recordOpeningHours='+recordOpeningHours+'&recordCheckinInstructions='+recordCheckinInstructions;
var xhttp = new XMLHttpRequest(); var xhttp = new XMLHttpRequest();
xhttp.open("POST", '/EditRecord', true); xhttp.open("POST", '/UpdateRecord', true);
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhttp.onreadystatechange = function() { xhttp.onreadystatechange = function() {
if (xhttp.readyState === 4 && xhttp.status === 200) { if (xhttp.readyState === 4 && xhttp.status === 200) {
......
...@@ -2,47 +2,75 @@ ...@@ -2,47 +2,75 @@
{%block headblock%} {%block headblock%}
<title> Manage Coworking Spaces </title> <title> Manage Coworking Spaces </title>
<link rel="stylesheet" href="/static/CSS/Manage_Coworking_Spaces.css">
{%endblock%} {%endblock%}
{%block headerblock%} {%block headerblock%}
<a id="headerText" <a id="headerText" class="headerText"
href="Manage_Coworking_Spaces"> href="Manage_Coworking_Spaces">
Manage Coworking Spaces</a> Manage Coworking Spaces</a>
{%endblock%} {%endblock%}
{%block mainblock%} {%block mainblock%}
<form id="recordForm" title="Record Form"> <form id="recordForm" title="Record Form">
<label>Name: <input id="recordName" class="formTextInput" <label for="recordName">Name:</label>
name="record_name" type="text"></label> <input id="recordName" class="formTextInput"
<button id="searchButton" type="submit">Search</button><br> name="record_name" type="text"><br>
<label>Address: <input id="recordAddress" class="formTextInput" <label for="recordAddress">Address:</label>
name="record_address" type="text"></label><br> <textarea id="recordAddress" class="formTextInput"
<label>Main Photograph: <input id="recordMainPhotos" class="formTextInput" name="record_address" type="text"></textarea><br>
name="record_MP" type="url"></label><br> <label for="recordMainPhotos">Main Photograph:</label>
<label>Additional Photographs: <input id="recordAdditionalPhotos" class="formTextInput" <input id="recordMainPhotos" class="formTextInput"
name="record_AP" type="url"></label><br> name="record_MP" type="text"><br>
<label>Description: <input id="recordDescription" class="formTextInput" <label for="recordAdditionalPhotos">Additional Photographs:</label>
name="record_description" type="text"></label><br> <input id="recordAdditionalPhotos" class="formTextInput"
<label>Website: <input id="recordWebsite" class="formTextInput" name="record_AP" type="text"><br>
name="record_website" type="url"></label><br> <label for="recordDescription">Description:</label>
<label>Email: <input id="recordEmail" class="formTextInput" <textarea id="recordDescription" class="formTextInput"
name="record_email" type="email"></label><br> name="record_description" type="text"></textarea><br>
<label>Phone Number: <input id="recordPhoneNumber" class="formTextInput" <label for="recordWebsite">Website:</label>
name="record_PN" type="text"></label><br> <input id="recordWebsite" class="smallInput"
<label>Opening Hours: <input id="recordOpeningHours" class="formTextInput" name="record_website" type="text">
name="record_OH" type="text"></label><br> <label for="recordEmail" class="smallLabel">Email:</label>
<label>Checkin Instructions: <input id="recordCheckinInstructions" class="formTextInput" <input id="recordEmail" class="smallInput"
name="record_CI" type="text"></label> name="record_email" type="text"><br>
<label for="recordPhoneNumber">Phone Number:</label>
<input id="recordPhoneNumber" class="smallInput"
name="record_PN" type="text">
<label for="recordOpeningHours" class="smallLabel">Opening Hours:</label>
<input id="recordOpeningHours" class="smallInput"
name="record_OH" type="text"><br>
<label for="recordCheckinInstructions">Checkin Instructions:</label>
<textarea id="recordCheckinInstructions" class="formTextInput"
name="record_CI" type="text"></textarea>
<br><br> <br><br>
<button id="searchButton" type="submit">Search</button>
<button id="addButton" type="submit">Add</button> <button id="addButton" type="submit">Add</button>
<button id="editButton" type="submit">Edit</button> <button id="updateButton" type="submit">Update</button>
<button id="deleteButton" type="submit">Delete</button> <button id="deleteButton" type="submit">Delete</button>
<button id="clearButton" type="reset">Clear</button>
</form> </form>
<br> <br>
<span id="DEBUGserverMessage"> </span> <span id="DEBUGserverMessage"> </span>
<br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br>
{%endblock%}
{%block footerblock%}
<nav id="footerNav" class="navBar">
<ul class="Center">
<li><a href="Manage_Coworking_Spaces.html">Left</a></li>
</ul>
<ul class="Center">
<li><a href="Manage_Coworking_Spaces.html">Center</a></li>
</ul>
<ul class="Center">
<li><a href="Manage_Coworking_Spaces.html">Right</a></li>
</ul>
</nav>
{%endblock%} {%endblock%}
{%block jsblock%} {%block jsblock%}
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<meta charSet="UTF-8"> <meta charSet="UTF-8">
{%block headblock%} {%block headblock%}
{%endblock%} {%endblock%}
<link rel="stylesheet" href="/static/CSS/Manage_Coworking_Spaces.css">
</head> </head>
<body onLoad="pageLoad()"> <body onLoad="pageLoad()">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment