summaryrefslogtreecommitdiffstats
path: root/includes/admin/views/giglog_admin_page.php
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2021-05-09 13:20:22 +0200
committerHarald Eilertsen <haraldei@anduin.net>2021-05-09 13:20:22 +0200
commite85053ab1841bd29d99142c07de5d70dcf3bad61 (patch)
tree262318b9c7f27abfd65b15f21705c3503d72b353 /includes/admin/views/giglog_admin_page.php
parent62a0a7e761c6be0c8824596f24e79ff28d3916e3 (diff)
parentc3a19d2a6b392d9f3ab58c61ed83bdf25d919c9e (diff)
downloadgigologadmin-e85053ab1841bd29d99142c07de5d70dcf3bad61.tar.gz
gigologadmin-e85053ab1841bd29d99142c07de5d70dcf3bad61.tar.bz2
gigologadmin-e85053ab1841bd29d99142c07de5d70dcf3bad61.zip
Merge remote-tracking branch 'andrea/andreaschanges' into dev
Diffstat (limited to 'includes/admin/views/giglog_admin_page.php')
-rw-r--r--includes/admin/views/giglog_admin_page.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/includes/admin/views/giglog_admin_page.php b/includes/admin/views/giglog_admin_page.php
index 624566f..b78b4db 100644
--- a/includes/admin/views/giglog_admin_page.php
+++ b/includes/admin/views/giglog_admin_page.php
@@ -78,6 +78,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
static function get_filters(): string
{
$cities = array_merge(["ALL"], GiglogAdmin_Venue::all_cities());
+ $cty = filter_input( INPUT_POST, 'selectcity', FILTER_SANITIZE_SPECIAL_CHARS );
$selected_city =
filter_input(INPUT_POST, "selectcity", FILTER_SANITIZE_SPECIAL_CHARS)
|| $cities[0];
@@ -85,25 +86,25 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
$select = '<form method="POST" action="">FILTER DATA: <select name="selectcity">';
foreach ( $cities AS $city ) {
- $select .= '<option value="' . $city . '"' . selected($city, $selected_city) . '>';
+ $select .= '<option value="' . $city . '"' . selected($city,$cty ) . '>';
$select .= $city . '</option>';
}
$select .= '</select>';
- if ( $selected_city != "ALL" ) {
+
+ if ( $cty && $cty!= "ALL" ) {
//second drop down for venue
+ $venues = GiglogAdmin_Venue::venues_in_city($cty);
- $venues = GiglogAdmin_Venue::venues_in_city($selected_city);
$venue_list = array_merge(
[0, "ALL"],
array_map(
function($v) { return [$v->id(), $v->name()]; },
$venues));
- $selected_venue =
- filter_input(INPUT_POST, "selectvenue", FILTER_SANITIZE_SPECIAL_CHARS)
- || $venues[0];
+ $selected_venue = filter_input(INPUT_POST, "selectvenue", FILTER_SANITIZE_SPECIAL_CHARS)
+ || $venue_list[0];
$select .= '<select name="selectvenue">';
@@ -111,8 +112,8 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) {
$select .= '<option value="' . $venue[0] . '"' . selected($venue, $selected_venue) . '>';
$select .= $venue[1] . '</option>';
}
-
$select .= '</select>';
+
}
//option to select own concerts only
$select .= '<input class="ownconc" type="checkbox" value="1"';