From c3114e0b2e59f3d5e75368d1e29f0c9bbad1eb87 Mon Sep 17 00:00:00 2001 From: Jerome Jutteau Date: Mon, 11 Nov 2019 23:47:39 +0100 Subject: [PATCH] [TASK] Size checking adjustments - identation - print GB when >= 1024 - show limitation in MB when > 0 - hide text under file selection when there is no limit Signed-off-by: Jerome Jutteau --- index.php | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/index.php b/index.php index 8e512b6..b03af76 100644 --- a/index.php +++ b/index.php @@ -167,9 +167,13 @@ else {

')"/> + onchange="control_selected_file_size(, '= 1024) { + echo t('2_BIG') . ', ' . t('FILE_LIM') . " " . number_format($cfg['maximal_upload_size']/1024, 2) . " GB."; + } else if ($cfg['maximal_upload_size'] > 0) { + echo t('2_BIG') . ', ' . t('FILE_LIM') . " " . $cfg['maximal_upload_size'] . " MB."; + } + ?>')"/>

@@ -232,13 +236,14 @@ else { 0 && $cfg['maximal_upload_size'] < 1024) { + if ($cfg['maximal_upload_size'] >= 1024) { + echo '

' . t('FILE_LIM'); + echo " " . number_format($cfg['maximal_upload_size'] / 1024, 2) . " GB.

"; + } else if ($cfg['maximal_upload_size'] > 0) { echo '

' . t('FILE_LIM'); echo " " . $cfg['maximal_upload_size'] . " MB.

"; - } - else { - echo '

' . t('FILE_LIM'); - echo " " . $cfg['maximal_upload_size']/1024 . " GB.

"; + } else { + echo '

'; } ?> -- 2.34.1