]> git.p6c8.net - jirafeau_project.git/commitdiff
New config option to preselect the checkbox for deleting the file after the first...
authorPatrick Canterino <patrick@patrick-canterino.de>
Sun, 11 Aug 2024 11:20:25 +0000 (13:20 +0200)
committerPatrick Canterino <patrick@patrick-canterino.de>
Sun, 11 Aug 2024 11:20:25 +0000 (13:20 +0200)
index.php
lib/config.original.php

index 78c1beb42a647e5688660b9cea7e415ebfd8f88a..662f1579d5dabbab766800528b3f15a8c8c994a2 100644 (file)
--- a/index.php
+++ b/index.php
@@ -204,7 +204,13 @@ elseif (true === jirafeau_challenge_upload_ip($cfg, get_ip_address($cfg))) {
         <?php
         if ($cfg['one_time_download']) {
             echo '<tr><td>' . t('ONE_TIME_DL') . ':</td>';
-            echo '<td><input type="checkbox" id="one_time_download" /></td></tr>';
+            echo '<td><input type="checkbox" id="one_time_download"';
+            
+            if ($cfg['one_time_download_preselected']) {
+                echo ' checked';
+            }
+
+            echo ' /></td></tr>';
         }
         if ($cfg['download_password_requirement'] === 'generated'){
             echo '<input type="hidden" name="key" id="input_key" value="' . $download_pass .'"/>';
index bfa76af9c6f4332164799d7b263619a1019e5a5f..d261f682b1083b9b0ca0f30fbcd36fbfc8029ce4 100644 (file)
@@ -152,6 +152,11 @@ $cfg['availability_default'] = 'month';
  */
 $cfg['one_time_download'] = true;
 
+/* When set to "true", the checkbox for deleting the file after the first download
+ * is preselected.
+ */
+$cfg['one_time_download_preselected'] = false;
+
 /* Set maximal upload size expressed in MB.
  * »0« means unlimited upload size.
  */

patrick-canterino.de