Add the upload_file_limit to fax_send (#7466)

* [fax_send.php] add the upload_file_limit

* Use the settings class get method

* Change the setting name to upload_file_limit

* Increase the default to 5
This commit is contained in:
K-Flagman
2025-08-22 21:25:15 -07:00
committed by GitHub
parent 9931cf80b4
commit 1926ef95fe
2 changed files with 13 additions and 3 deletions
+4 -2
View File
@@ -1095,9 +1095,11 @@ if (!defined('STDIN')) {
echo " ".$text['label-fax_files']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
for ($f = 1; $f <= 3; $f++) {
$upload_file_limit = (int)$settings->get('fax','upload_file_limit',5);
for ($f = 1; $f <= $upload_file_limit; $f++) {
echo " <span id='fax_file_".$f."' ".(($f > 1) ? "style='display: none;'" : null).">";
echo " <input name='fax_files[]' id='fax_files_".$f."' type='file' class='formfld fileinput' style='margin-right: 3px; ".(($f > 1) ? "margin-top: 3px;" : null)."' onchange=\"".(($f < 3) ? "document.getElementById('fax_file_".($f+1)."').style.display='';" : null)." list_selected_files(".$f.");\" multiple='multiple'>";
echo " <input name='fax_files[]' id='fax_files_".$f."' type='file' class='formfld fileinput' style='margin-right: 3px; ".(($f > 1) ? "margin-top: 3px;" : null)."' onchange=\"".(($f < $upload_file_range_limit) ? "document.getElementById('fax_file_".($f+1)."').style.display='';" : null)." list_selected_files(".$f.");\" multiple='multiple'>";
echo button::create(['type'=>'button','label'=>$text['button-clear'],'icon'=>$settings->get('theme','button_icon_reset'),'onclick'=>"reset_file_input('fax_files_".$f."'); document.getElementById('file_list_".$f."').innerHTML='';"]);
echo "<br />";
echo " <span id='file_list_".$f."'></span>";