Updated registration screen added

This commit is contained in:
Lucas Patenaude
2024-04-24 01:11:21 -06:00
parent 7888155e2a
commit 009a81dbc1
9 changed files with 50 additions and 44 deletions

View File

@@ -0,0 +1,22 @@
#register-container {
display: none;
}
#register-page {
width: 600px;
height: fit-content;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
display: flex;
justify-content: center;
align-items: center;
z-index: 5;
background: linear-gradient(to bottom, white, rgb(245, 245, 245), rgb(227, 227, 227));
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.5);
border: 1px solid gray;
border-radius: 8px;
}

View File

@@ -5,6 +5,13 @@ $(document).ready(function() {
// Toggle the visibility of the login container
$('#login-container').toggle();
});
$('#register-page-login-button').click(function() {
event.preventDefault(); // Prevent the default action of following the link
$('#register-container').hide();
$('#login-container').toggle();
});
});

View File

@@ -0,0 +1,12 @@
$(document).ready(function () {
// Listen for click event on the register button
$('#register-button').click(function (event) {
event.preventDefault(); // Prevent the default action of following the link
$('#login-container').hide();
// Show the register container
$('#register-container').show();
});
});

View File

@@ -1,41 +0,0 @@
document.addEventListener("DOMContentLoaded", function() {
const league_select = document.getElementById('league_dropdown');
const team_select = document.getElementById('team_dropdown');
league_select.addEventListener('change', updateTeamSelect);
function updateTeamSelect() {
var selectedLeague = league_select.value;
var teamSelect = team_select;
// Clear existing options
teamSelect.innerHTML = "";
// Add options based on the selected value from the first select element
if (selectedLeague === "La Liga") {
// Add options for La Liga
addOption(teamSelect, "Option 1 for LL", "option1A");
addOption(teamSelect, "Option 2 for LL", "option2A");
} else if (selectedLeague === "Serie A") {
// Add options for Serie A
addOption(teamSelect, "Team 1 in Serie A", "option1B");
addOption(teamSelect, "Team 2 in Serie A", "option2B");
} else {
// Add options for Bundesliga
addOption(teamSelect, "Option 1 for Bun", "option1C");
addOption(teamSelect, "Option 2 for Bun", "option2C");
}
}
function addOption(selectElement, text, value) {
var option = document.createElement("option");
option.text = text;
option.value = value;
selectElement.add(option);
}
});