[#12729] Restriction info on file inputs can’t be styled individually
History
Comments
Date: 2024-06-19 05:47
Posted By: Stephan (10010110)
For the records: The relevant code is in classes/FileUploadField.class.php,
starting at line 49.
I hacked it for my personal needs to look like this:
$details = '';
if ($this->GetOption('show_details','0') == '1')
{
$ms = $this->GetOption('max_size');
if ($ms != '')
{
$details .= ' '.$mod->Lang('maximum_size').': '.$ms.'kb';
}
$exts = $this->GetOption('permitted_extensions');
if ($exts != '')
{
$details .= ' '.$mod->Lang('permitted_extensions') . ': '.$exts;
}
if(!empty($details)) {
$details = '<span class="file_details">'.$details.'</span>';
}
}
return $txt.$details;