mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/16888] Add the list of allowed files in the attachment tab
Using the accept attribute PHPBB3-16888
This commit is contained in:
parent
4f3f91dfc3
commit
c0296d10db
2 changed files with 2 additions and 3 deletions
|
@ -831,7 +831,7 @@ function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_a
|
||||||
'FILESIZE' => $config['max_filesize'],
|
'FILESIZE' => $config['max_filesize'],
|
||||||
'FILE_COMMENT' => (isset($filename_data['filecomment'])) ? $filename_data['filecomment'] : '',
|
'FILE_COMMENT' => (isset($filename_data['filecomment'])) ? $filename_data['filecomment'] : '',
|
||||||
'MAX_ATTACHMENT_FILESIZE' => $config['max_filesize'] > 0 ? $user->lang('MAX_ATTACHMENT_FILESIZE', get_formatted_filesize($config['max_filesize'])) : '',
|
'MAX_ATTACHMENT_FILESIZE' => $config['max_filesize'] > 0 ? $user->lang('MAX_ATTACHMENT_FILESIZE', get_formatted_filesize($config['max_filesize'])) : '',
|
||||||
'ALLOWED_ATTACHMENTS' => !empty($allowed_attachments) ? implode(', ', $allowed_attachments) : '',
|
'ALLOWED_ATTACHMENTS' => !empty($allowed_attachments) ? implode(',', $allowed_attachments) : '',
|
||||||
));
|
));
|
||||||
|
|
||||||
if (count($attachment_data))
|
if (count($attachment_data))
|
||||||
|
|
|
@ -3,13 +3,12 @@
|
||||||
|
|
||||||
<p>{L_ADD_ATTACHMENT_EXPLAIN} <span class="hidden" id="drag-n-drop-message">{L_PLUPLOAD_DRAG_TEXTAREA}</span></p>
|
<p>{L_ADD_ATTACHMENT_EXPLAIN} <span class="hidden" id="drag-n-drop-message">{L_PLUPLOAD_DRAG_TEXTAREA}</span></p>
|
||||||
{% if MAX_ATTACHMENT_FILESIZE is not empty %}<p>{{ MAX_ATTACHMENT_FILESIZE }}</p>{% endif %}
|
{% if MAX_ATTACHMENT_FILESIZE is not empty %}<p>{{ MAX_ATTACHMENT_FILESIZE }}</p>{% endif %}
|
||||||
{% if ALLOWED_ATTACHMENTS is not empty %}<p>{{ lang('ALLOWED_ATTACHMENTS') ~ lang('COLON') }} <em>{{ ALLOWED_ATTACHMENTS }}</em></p>{% endif %}
|
|
||||||
|
|
||||||
<fieldset class="fields2" id="attach-panel-basic">
|
<fieldset class="fields2" id="attach-panel-basic">
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="fileupload">{L_FILENAME}{L_COLON}</label></dt>
|
<dt><label for="fileupload">{L_FILENAME}{L_COLON}</label></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<input type="file" name="fileupload" id="fileupload" class="inputbox autowidth" />
|
<input type="file" accept="{{ ALLOWED_ATTACHMENTS }}" name="fileupload" id="fileupload" class="inputbox autowidth" />
|
||||||
<input type="submit" name="add_file" value="{L_ADD_FILE}" class="button2" onclick="upload = true;" />
|
<input type="submit" name="add_file" value="{L_ADD_FILE}" class="button2" onclick="upload = true;" />
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
Loading…
Add table
Reference in a new issue