diff --git a/ProjectSourceCode/src/resources/css/login_and_registration.css b/ProjectSourceCode/src/resources/css/login_and_registration.css index 362b5af..e9ef2bc 100644 --- a/ProjectSourceCode/src/resources/css/login_and_registration.css +++ b/ProjectSourceCode/src/resources/css/login_and_registration.css @@ -38,9 +38,9 @@ body { } /* Apply modern styling to inputs and select elements */ -.form-control, +#form-control, select { - width: 100%; /* Make inputs and select elements same width */ + width: 70%; /* Make inputs and select elements same width */ padding: 0.375rem 0.75rem; /* Example padding */ font-size: 1rem; /* Example font size */ line-height: 1.5; /* Example line height */ @@ -51,6 +51,8 @@ select { margin-bottom: 10px; /* Example margin */ } + + /* Adjust styling for form labels */ .form-label { font-weight: bold; /* Example font weight */ @@ -61,4 +63,3 @@ select { margin-top: 10px; /* Example margin */ } - diff --git a/ProjectSourceCode/src/resources/js/selectFunctions.js b/ProjectSourceCode/src/resources/js/selectFunctions.js new file mode 100644 index 0000000..2b9304c --- /dev/null +++ b/ProjectSourceCode/src/resources/js/selectFunctions.js @@ -0,0 +1,40 @@ + +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); + } + }); + \ No newline at end of file diff --git a/ProjectSourceCode/src/views/pages/register.hbs b/ProjectSourceCode/src/views/pages/register.hbs index aa9dca7..bcf0f6a 100644 --- a/ProjectSourceCode/src/views/pages/register.hbs +++ b/ProjectSourceCode/src/views/pages/register.hbs @@ -2,49 +2,79 @@

Register

-
-
-
- - -
-

Already have an account? Login

+ + diff --git a/ProjectSourceCode/src/views/partials/nav.hbs b/ProjectSourceCode/src/views/partials/nav.hbs index 9408ab0..2ee1d45 100644 --- a/ProjectSourceCode/src/views/partials/nav.hbs +++ b/ProjectSourceCode/src/views/partials/nav.hbs @@ -20,7 +20,7 @@