Removed search files
This commit is contained in:
parent
7f9f00b9c4
commit
29b02b63d6
@ -1,41 +0,0 @@
|
||||
<ooctype html>
|
||||
<head>
|
||||
<title>List of player team appearances from 2018/19 season - Python Flask MySQL app</title>
|
||||
<link rel="stylesheet" media="screen" href ="/static/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/static/css/bootstrap-theme.min.css">
|
||||
<meta name="viewport" content = "width=device-width, initial-scale=1.0">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script src="/static/js/bootstrap.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
{% with messages = get_flashed_messages() %}
|
||||
{% if messages %}
|
||||
<ul class=flashes>
|
||||
{% for message in messages %}
|
||||
<li>{{ message }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</p>
|
||||
<a class="btn btn-primary" href="/dashboard" role="button">Home</a>
|
||||
<table class="table table-striped table-bordered table-hover table-condensed">
|
||||
<thead>
|
||||
{%- for column in columns %}
|
||||
<th>{{ column['Field'] }}</th>
|
||||
{%- endfor %}
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{%- for row in rows %}
|
||||
<tr>
|
||||
{%- for column in columns %}
|
||||
<td>{{ row[column['Field']] }}</td>
|
||||
{%- endfor %}
|
||||
</tr>
|
||||
{%- endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<a class="btn btn-primary" href="/dashboard" role="button">Home</a>
|
||||
</body>
|
||||
@ -1,70 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Club Player Playing Record Search *TESTING*</title>
|
||||
<link rel="stylesheet" media="screen" href ="/static/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/static/css/bootstrap-theme.min.css">
|
||||
<meta name="viewport" content = "width=device-width, initial-scale=1.0">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script src="/static/js/bootstrap.min.js"></script>
|
||||
</head>
|
||||
<h2>Search Parameters - select a club to search their playing record</h2>
|
||||
<body onload="myFunction()">
|
||||
<dl>
|
||||
<p>
|
||||
{{ form.csrf_token }}
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<form class="col-sm-6" method="post" action="/clubPlayingRecordSearch">
|
||||
<div class = "row">
|
||||
<div class = "col-sm-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="basic-addon1">Season data to search:</span>
|
||||
{{ form.season(class_="form-control") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class = "row">
|
||||
<div class = "col-sm-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="basic-addon1">Club:</span>
|
||||
{{ form.clubName(class_="form-control") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
{{ form.submitButton(class_="btn btn-success") }}
|
||||
<a class="btn btn-danger" href="/dashboard" role="button">Cancel</a>
|
||||
</p>
|
||||
</form>
|
||||
<div class="col-sm-0">
|
||||
<img src="{{ selectedClubLogo }}" height="120" id="selectedClubLogo"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
</dl>
|
||||
|
||||
<script>
|
||||
var club_select = document.getElementById("clubName");
|
||||
var club_logo = document.getElementById("selectedClubLogo");
|
||||
|
||||
club_select.onchange = function() {myFunction()};
|
||||
|
||||
function myFunction() {
|
||||
|
||||
club = club_select.value;
|
||||
|
||||
fetch('/hkfc-d/getLogo/' + club).then(function(response) {
|
||||
response.json().then(function(data) {
|
||||
var HTML = '';
|
||||
for (var logo of data) {
|
||||
HTML += logo.logoURL;
|
||||
}
|
||||
club_logo.src = HTML;
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,70 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Player Check *TESTING*</title>
|
||||
<link rel="stylesheet" media="screen" href ="/static/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/static/css/bootstrap-theme.min.css">
|
||||
<meta name="viewport" content = "width=device-width, initial-scale=1.0">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script src="/static/js/bootstrap.min.js"></script>
|
||||
</head>
|
||||
<h2>Search Parameters - select a club to search for players who have played for 2 or more teams</h2>
|
||||
<body onload="myFunction()">
|
||||
<dl>
|
||||
<p>
|
||||
{{ form.csrf_token }}
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<form class="col-sm-6" method="post" action="/playerCheckResults">
|
||||
<div class = "row">
|
||||
<div class = "col-sm-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="basic-addon1">Season data to search:</span>
|
||||
{{ form.season(class_="form-control") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class = "row">
|
||||
<div class = "col-sm-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="basic-addon1">Club:</span>
|
||||
{{ form.clubName(class_="form-control") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
{{ form.submitButton(class_="btn btn-success") }}
|
||||
<a class="btn btn-danger" href="/dashboard" role="button">Cancel</a>
|
||||
</p>
|
||||
</form>
|
||||
<div class="col-sm-0">
|
||||
<img src="{{ selectedClubLogo }}" height="120" id="selectedClubLogo"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
</dl>
|
||||
|
||||
<script>
|
||||
var club_select = document.getElementById("clubName");
|
||||
var club_logo = document.getElementById("selectedClubLogo");
|
||||
|
||||
club_select.onchange = function() {myFunction()};
|
||||
|
||||
function myFunction() {
|
||||
|
||||
club = club_select.value;
|
||||
|
||||
fetch('/hkfc-d/getLogo/' + club).then(function(response) {
|
||||
response.json().then(function(data) {
|
||||
var HTML = '';
|
||||
for (var logo of data) {
|
||||
HTML += logo.logoURL;
|
||||
}
|
||||
club_logo.src = HTML;
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,41 +0,0 @@
|
||||
<ooctype html>
|
||||
<head>
|
||||
<title>List of player team appearances from 2018/19 season - Python Flask MySQL app</title>
|
||||
<link rel="stylesheet" media="screen" href ="/static/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/static/css/bootstrap-theme.min.css">
|
||||
<meta name="viewport" content = "width=device-width, initial-scale=1.0">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script src="/static/js/bootstrap.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
{% with messages = get_flashed_messages() %}
|
||||
{% if messages %}
|
||||
<ul class=flashes>
|
||||
{% for message in messages %}
|
||||
<li>{{ message }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</p>
|
||||
<a class="btn btn-primary" href="/dashboard" role="button">Home</a>
|
||||
<table class="table table-striped table-bordered table-hover table-condensed">
|
||||
<thead>
|
||||
{%- for column in columns %}
|
||||
<th>{{ column['Field'] }}</th>
|
||||
{%- endfor %}
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{%- for row in rows %}
|
||||
<tr>
|
||||
{%- for column in columns %}
|
||||
<td>{{ row[column['Field']] }}</td>
|
||||
{%- endfor %}
|
||||
</tr>
|
||||
{%- endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<a class="btn btn-primary" href="/dashboard" role="button">Home</a>
|
||||
</body>
|
||||
@ -1,90 +0,0 @@
|
||||
<doctype html>
|
||||
<head>
|
||||
<title>List of players from 2018/19 season - Python Flask MySQL app</title>
|
||||
<link rel="stylesheet" media="screen" href ="/static/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/static/css/bootstrap-theme.min.css">
|
||||
<meta name="viewport" content = "width=device-width, initial-scale=1.0">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script src="/static/js/bootstrap.min.js"></script>
|
||||
</head>
|
||||
|
||||
<style>
|
||||
tbody td {
|
||||
border: 1px solid #ccc;
|
||||
padding: 0px 0px;
|
||||
}
|
||||
|
||||
th.rotate {
|
||||
/* Something you can count on */
|
||||
height: 120px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
th.rotate > div {
|
||||
transform:
|
||||
/* Magic Numbers */
|
||||
translate(23px, 0px)
|
||||
/* 45 is really 360 - 45 */
|
||||
rotate(315deg);
|
||||
width: 30px;
|
||||
}
|
||||
th.rotate > div > span {
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding: 0px 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
<p>
|
||||
{% with messages = get_flashed_messages() %}
|
||||
{% if messages %}
|
||||
<ul class=flashes>
|
||||
{% for message in messages %}
|
||||
<li>{{ message }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</p>
|
||||
<table class="table table-striped table-hover table-condensed">
|
||||
<thead>
|
||||
{%- for column in columns %}
|
||||
{% if column['Field'] == "playerNumber" %}
|
||||
<th><div><span>Player Number</span></div></th>
|
||||
{% elif column['Field'] == "playerName" %}
|
||||
<th><div><span>Player Name</span></div></th>
|
||||
{% elif column['Field'] == "appearances" %}
|
||||
<th><div><span>Appearances</span></div></th>
|
||||
{% elif column['Field'] == "goals" %}
|
||||
<th><div><span>Goals</span></div></th>
|
||||
{% elif column['Field'].startswith('22381goal') %}
|
||||
<th class="rotate"><div><span>NBC A goals</span></div></th>
|
||||
{% else %}
|
||||
{%- for match in matchesList %}
|
||||
{% if column['Field'].startswith(match) %}
|
||||
{% if column['Field'].endswith('played') %}
|
||||
<th class="rotate"><div><span>{{ matches[match] }} Played</span></div></th>
|
||||
{% elif column['Field'].endswith('goals') %}
|
||||
<th class="rotate"><div><span>{{ matches[match] }} Goals</span></div></th>
|
||||
{% elif column['Field'].endswith('capt') %}
|
||||
<th class="rotate"><div><span>{{ matches[match] }} Captain</span></div></th>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{%- for row in rows %}
|
||||
<tr>
|
||||
{%- for column in columns %}
|
||||
<td>{{ row[column['Field']] }}</td>
|
||||
{%- endfor %}
|
||||
</tr>
|
||||
{%- endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<a class="btn btn-primary" href="/dashboard" role="button">Home</a>
|
||||
</body>
|
||||
|
||||
@ -1,87 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Player Playing Record Results Search *TESTING*</title>
|
||||
<link rel="stylesheet" media="screen" href ="/static/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/static/css/bootstrap-theme.min.css">
|
||||
<meta name="viewport" content = "width=device-width, initial-scale=1.0">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script src="/static/js/bootstrap.min.js"></script>
|
||||
</head>
|
||||
<h2>Search Parameters - select both a club and team</h2>
|
||||
<body onload="myFunction()">
|
||||
<dl>
|
||||
<p>
|
||||
{{ form.csrf_token }}
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<form class="col-sm-6" method="post" action="/playerRecordSearch">
|
||||
<div class = "row">
|
||||
<div class = "col-sm-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="basic-addon1">Season data to search:</span>
|
||||
{{ form.season(class_="form-control") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class = "row">
|
||||
<div class = "col-sm-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="basic-addon1">Club:</span>
|
||||
{{ form.clubName(class_="form-control") }}
|
||||
</div>
|
||||
</div>
|
||||
<div class = "col-sm-4">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="basic-addon2">Team:</span>
|
||||
{{ form.teamName(class_="form-control") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
{{ form.submitButton(class_="btn btn-success") }}
|
||||
<a class="btn btn-danger" href="/dashboard" role="button">Cancel</a>
|
||||
</p>
|
||||
</form>
|
||||
<div class="col-sm-0">
|
||||
<img src="{{ selectedClubLogo }}" height="120" id="selectedClubLogo"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
</dl>
|
||||
|
||||
<script>
|
||||
var club_select = document.getElementById("clubName");
|
||||
var club_logo = document.getElementById("selectedClubLogo");
|
||||
var team_select = document.getElementById("teamName");
|
||||
|
||||
club_select.onchange = function() {myFunction()};
|
||||
|
||||
function myFunction() {
|
||||
|
||||
club = club_select.value;
|
||||
|
||||
fetch('/hkfc-d/motmAdmin/' + club).then(function(response) {
|
||||
response.json().then(function(data) {
|
||||
var optionHTML = '';
|
||||
for (var team of data) {
|
||||
optionHTML += '<option value="' + team.team + '">' + team.team + '</option>';
|
||||
}
|
||||
team_select.innerHTML = optionHTML;
|
||||
})
|
||||
|
||||
});
|
||||
fetch('/hkfc-d/getLogo/' + club).then(function(response) {
|
||||
response.json().then(function(data) {
|
||||
var HTML = '';
|
||||
for (var logo of data) {
|
||||
HTML += logo.logoURL;
|
||||
}
|
||||
club_logo.src = HTML;
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,129 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Team Season Results Search *TESTING*</title>
|
||||
<link rel="stylesheet" media="screen" href ="/static/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/static/css/bootstrap-theme.min.css">
|
||||
<meta name="viewport" content = "width=device-width, initial-scale=1.0">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script src="/static/js/bootstrap.min.js"></script>
|
||||
</head>
|
||||
<h2>Search Parameters - select both a club and team</h2>
|
||||
<body onload="myFunction()">
|
||||
<dl>
|
||||
<p>
|
||||
{{ form.csrf_token }}
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<form class="col-sm-6" method="post" action="/searchTeam">
|
||||
<div class = "row">
|
||||
<div class = "col-sm-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="basic-addon1">Season data to search:</span>
|
||||
{{ form.season(class_="form-control") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class = "row">
|
||||
<div class = "col-sm-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="basic-addon2">Club:</span>
|
||||
{{ form.clubName(class_="form-control") }}
|
||||
</div>
|
||||
</div>
|
||||
<div class = "col-sm-4">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="basic-addon3">Team:</span>
|
||||
{{ form.teamName(class_="form-control") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class = "row">
|
||||
<div class = "col-sm-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="basic-addon4">Start Date:</span>
|
||||
{{ form.startDate(class_="form-control") }}
|
||||
</div>
|
||||
</div>
|
||||
<div class = "col-sm-4">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="basic-addon5">End Date:</span>
|
||||
{{ form.endDate(class_="form-control") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
{{ form.submitButton(class_="btn btn-success") }}
|
||||
<a class="btn btn-danger" href="/dashboard" role="button">Cancel</a>
|
||||
</p>
|
||||
</form>
|
||||
<div class="col-sm-0">
|
||||
<img src="{{ selectedClubLogo }}" height="120" id="selectedClubLogo"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
</dl>
|
||||
|
||||
<script>
|
||||
var season_select = document.getElementById("season");
|
||||
var season_start = document.getElementById("startDate");
|
||||
var club_select = document.getElementById("clubName");
|
||||
var club_logo = document.getElementById("selectedClubLogo");
|
||||
var team_select = document.getElementById("teamName");
|
||||
|
||||
season_select.onchange = function() {seasonFunction()};
|
||||
club_select.onchange = function() {myFunction()};
|
||||
|
||||
function myFunction() {
|
||||
|
||||
club = club_select.value;
|
||||
|
||||
fetch('/hkfc-d/motmAdmin/' + club).then(function(response) {
|
||||
response.json().then(function(data) {
|
||||
var optionHTML = '';
|
||||
for (var team of data) {
|
||||
optionHTML += '<option value="' + team.team + '">' + team.team + '</option>';
|
||||
}
|
||||
team_select.innerHTML = optionHTML;
|
||||
})
|
||||
|
||||
});
|
||||
fetch('/hkfc-d/getLogo/' + club).then(function(response) {
|
||||
response.json().then(function(data) {
|
||||
var HTML = '';
|
||||
for (var logo of data) {
|
||||
HTML += logo.logoURL;
|
||||
}
|
||||
club_logo.src = HTML;
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function seasonFunction() {
|
||||
season = season_select.value;
|
||||
var startDate = '';
|
||||
if (season == '2018') {
|
||||
startDate = '2018-09-01'
|
||||
} else if (season == '2017') {
|
||||
startDate = '2017-01-09'
|
||||
} else if (season == '2016') {
|
||||
startDate = '2016-09-01'
|
||||
} else if (season == '2015') {
|
||||
startDate = '2015-09-01'
|
||||
} else if (season == '2014') {
|
||||
startDate = '2014-09-01'
|
||||
} else if (season == '2013') {
|
||||
startDate = '2013-09-01'
|
||||
} else if (season == '2012') {
|
||||
startDate = '2012-09-01'
|
||||
} else if (season == '2011') {
|
||||
startDate = '2011-09-01'
|
||||
} else if (season == '2010') {
|
||||
startDate = '2010-09-01'
|
||||
}
|
||||
season_start.value = startDate;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,26 +0,0 @@
|
||||
<doctype html>
|
||||
<head>
|
||||
<title>List of matches from 2018/19 season - Python Flask MySQL CRUD</title>
|
||||
<link rel="stylesheet" media="screen" href ="/static/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/static/css/bootstrap-theme.min.css">
|
||||
<meta name="viewport" content = "width=device-width, initial-scale=1.0">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script src="/static/js/bootstrap.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
{% with messages = get_flashed_messages() %}
|
||||
{% if messages %}
|
||||
<ul class=flashes>
|
||||
{% for message in messages %}
|
||||
<li>{{ message }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</p>
|
||||
<table class="table table-striped table-hover table-condensed">
|
||||
{{ table }}
|
||||
</table>
|
||||
<a class="btn btn-primary" href="/dashboard" role="button">Home</a>
|
||||
</body>
|
||||
@ -1,26 +0,0 @@
|
||||
<doctype html>
|
||||
<head>
|
||||
<title>Team Results from 2018/19 season - Python Flask MySQL app</title>
|
||||
<link rel="stylesheet" media="screen" href ="/static/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/static/css/bootstrap-theme.min.css">
|
||||
<meta name="viewport" content = "width=device-width, initial-scale=1.0">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script src="/static/js/bootstrap.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
{% with messages = get_flashed_messages() %}
|
||||
{% if messages %}
|
||||
<ul class=flashes>
|
||||
{% for message in messages %}
|
||||
<li>{{ message }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</p>
|
||||
<table class="table table-bordered table-striped table-hover table-condensed">
|
||||
{{ table }}
|
||||
</table>
|
||||
<a class="btn btn-primary" href="/dashboard" role="button">Home</a>
|
||||
</body>
|
||||
@ -1,85 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Team Results Record Search *TESTING*</title>
|
||||
<link rel="stylesheet" media="screen" href ="/static/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/static/css/bootstrap-theme.min.css">
|
||||
<meta name="viewport" content = "width=device-width, initial-scale=1.0">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script src="/static/js/bootstrap.min.js"></script>
|
||||
</head>
|
||||
<h2>Search Parameters - select both a club and team</h2>
|
||||
<body onload="myFunction()">
|
||||
<dl>
|
||||
<p>
|
||||
{{ form.csrf_token }}
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<form class="col-sm-6" method="post" action="/teamRecordSearch">
|
||||
<div class = "row">
|
||||
<div class = "col-sm-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="basic-addon1">Season data to search:</span>
|
||||
{{ form.season(class_="form-control") }}
|
||||
</div>
|
||||
</div>
|
||||
<div class = "col-sm-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="basic-addon1">Club:</span>
|
||||
{{ form.clubName(class_="form-control") }}
|
||||
</div>
|
||||
</div>
|
||||
<div class = "col-sm-4">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="basic-addon2">Team:</span>
|
||||
{{ form.teamName(class_="form-control") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
{{ form.submitButton(class_="btn btn-success") }}
|
||||
<a class="btn btn-danger" href="/dashboard" role="button">Cancel</a>
|
||||
</p>
|
||||
</form>
|
||||
<div class="col-sm-0">
|
||||
<img src="{{ selectedClubLogo }}" height="120" id="selectedClubLogo"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
</dl>
|
||||
|
||||
<script>
|
||||
var club_select = document.getElementById("clubName");
|
||||
var club_logo = document.getElementById("selectedClubLogo");
|
||||
var team_select = document.getElementById("teamName");
|
||||
|
||||
club_select.onchange = function() {myFunction()};
|
||||
|
||||
function myFunction() {
|
||||
|
||||
club = club_select.value;
|
||||
|
||||
fetch('/hkfc-d/motmAdmin/' + club).then(function(response) {
|
||||
response.json().then(function(data) {
|
||||
var optionHTML = '';
|
||||
for (var team of data) {
|
||||
optionHTML += '<option value="' + team.team + '">' + team.team + '</option>';
|
||||
}
|
||||
team_select.innerHTML = optionHTML;
|
||||
})
|
||||
|
||||
});
|
||||
fetch('/hkfc-d/getLogo/' + club).then(function(response) {
|
||||
response.json().then(function(data) {
|
||||
var HTML = '';
|
||||
for (var logo of data) {
|
||||
HTML += logo.logoURL;
|
||||
}
|
||||
club_logo.src = HTML;
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,52 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>TESTING: Search Parameters - Python Flask Hockey Results Search App</title>
|
||||
<link rel="stylesheet" media="screen" href ="static/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="static/css/bootstrap-theme.min.css">
|
||||
<meta name="viewport" content = "width=device-width, initial-scale=1.0">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script src="static/js/bootstrap.min.js"></script>
|
||||
</head>
|
||||
<h2>Search Parameters</h2>
|
||||
<body>
|
||||
Please select your search parameters - search for both club and team
|
||||
<form method="post" action="/search-results">
|
||||
<dl>
|
||||
<p>
|
||||
<label for="inputClub">Club:</label>
|
||||
<select class="form-control" name="inputClub" required>
|
||||
{% for item in data %}
|
||||
<option value={{ item.hockeyClub }}>{{ item.hockeyClub }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<label for="inputTeam">Team:</label>
|
||||
<select class="form-control" name="inputTeam" required>
|
||||
<option value="A">A</option>
|
||||
<option value="B">B</option>
|
||||
<option value="C">C</option>
|
||||
<option value="D">D</option>
|
||||
<option value="E">E</option>
|
||||
<option value="F">F</option>
|
||||
<option value="G">G</option>
|
||||
<option value="H">H</option>
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<label for="startDate">Start Date:</label>
|
||||
<p/>
|
||||
<input type="date" name="startDate" data-date-format="DD-MM-YYYY"/>
|
||||
<p/>
|
||||
<label for="endDate">End Date:</label>
|
||||
<p/>
|
||||
<input type="date" name="endDate" data-date-format="DD-MM-YYYY"/>
|
||||
</p>
|
||||
</dl>
|
||||
<p>
|
||||
<button type="submit" class="btn btn-success">Submit</button>
|
||||
<a class="btn btn-danger" href="/dashboard" role="button">Cancel</a>
|
||||
</p>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue
Block a user