mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 21:38:54 +00:00
[ticket/17100] Remove select html for attachments category select
PHPBB3-17100
This commit is contained in:
parent
fb1899de62
commit
3e75aabc64
2 changed files with 18 additions and 7 deletions
|
@ -175,8 +175,14 @@
|
||||||
<dd><input type="text" id="group_name" size="20" maxlength="100" name="group_name" value="{GROUP_NAME}" /></dd>
|
<dd><input type="text" id="group_name" size="20" maxlength="100" name="group_name" value="{GROUP_NAME}" /></dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="category">{L_SPECIAL_CATEGORY}{L_COLON}</label><br /><span>{L_SPECIAL_CATEGORY_EXPLAIN}</span></dt>
|
<dt><label for="{{ S_CATEGORY_SELECT.id }}">{L_SPECIAL_CATEGORY}{L_COLON}</label><br /><span>{L_SPECIAL_CATEGORY_EXPLAIN}</span></dt>
|
||||||
<dd>{S_CATEGORY_SELECT}</dd>
|
<dd>
|
||||||
|
<select name="{{ S_CATEGORY_SELECT.name }}" id="{{ S_CATEGORY_SELECT.id }}">
|
||||||
|
{% for option in S_CATEGORY_SELECT.options %}
|
||||||
|
<option value="{{ option.value }}"{% if option.selected %} selected="selected"{% endif %}>{{ option.label }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="allowed">{L_ALLOWED}{L_COLON}</label></dt>
|
<dt><label for="allowed">{L_ALLOWED}{L_COLON}</label></dt>
|
||||||
|
|
|
@ -1445,16 +1445,21 @@ class acp_attachments
|
||||||
$cat_type = attachment_category::NONE;
|
$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)
|
foreach ($types as $type => $mode)
|
||||||
{
|
{
|
||||||
$selected = ($type == $cat_type) ? ' selected="selected"' : '';
|
$group_select['options'][] = [
|
||||||
$group_select .= '<option value="' . $type . '"' . $selected . '>' . $mode . '</option>';
|
'value' => $type,
|
||||||
|
'selected' => $type == $cat_type,
|
||||||
|
'label' => $mode,
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
$group_select .= '</select>';
|
|
||||||
|
|
||||||
return $group_select;
|
return $group_select;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue