1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

[ticket/17100] Remove select html for attachments category select

PHPBB3-17100
This commit is contained in:
Marc Alexander
2022-04-17 22:28:32 +02:00
parent fb1899de62
commit 3e75aabc64
2 changed files with 18 additions and 7 deletions

View File

@@ -1445,16 +1445,21 @@ class acp_attachments
$cat_type = attachment_category::NONE;
}
$group_select = '<select name="' . $select_name . '"' . (($key) ? ' id="' . $key . '"' : '') . '>';
$group_select = [
'name' => $select_name,
'id' => $key,
'options' => [],
];
foreach ($types as $type => $mode)
{
$selected = ($type == $cat_type) ? ' selected="selected"' : '';
$group_select .= '<option value="' . $type . '"' . $selected . '>' . $mode . '</option>';
$group_select['options'][] = [
'value' => $type,
'selected' => $type == $cat_type,
'label' => $mode,
];
}
$group_select .= '</select>';
return $group_select;
}