mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 10:11:38 +09:00
Display alert when file selected in filebox is too large #1451
This commit is contained in:
parent
6e2cbbbdfa
commit
a3271c6a40
2 changed files with 4 additions and 1 deletions
|
|
@ -306,6 +306,9 @@ class moduleAdminView extends module
|
|||
Context::set('page_navigation', $output->page_navigation);
|
||||
Context::set('page', $page);
|
||||
|
||||
$max_filesize = min(FileHandler::returnBytes(ini_get('upload_max_filesize')), FileHandler::returnBytes(ini_get('post_max_size')));
|
||||
Context::set('max_filesize', $max_filesize);
|
||||
|
||||
$oSecurity = new Security();
|
||||
$oSecurity->encodeHTML('filebox_list..comment', 'filebox_list..attributes.');
|
||||
$this->setTemplateFile('adminFileBox');
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
<div class="x_control-group">
|
||||
<label for="file" class="x_control-label">{$lang->file}</label>
|
||||
<div class="x_controls">
|
||||
<input type="file" name="addfile" id="file" />
|
||||
<input type="file" name="addfile" id="file" data-max-filesize="{$max_filesize}" data-max-filesize-error="{lang('file.allowed_filesize_exceeded')|escape}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue