require(JIRAFEAU_ROOT . 'lib/lang.php');
if ($cfg['download_password_requirement'] === "generated"){
- $download_pass = jirafeau_gen_download_pass();
+ $download_pass = jirafeau_gen_download_pass($cfg['download_password_gen_len'], $cfg['download_password_gen_chars']);
}
check_errors($cfg);
</div>
<div id="upload">
-<fieldset>
+<form id="upload-form" onsubmit="
+ event.preventDefault();
+ document.getElementById('upload').style.display = 'none';
+ document.getElementById('uploading').style.display = '';
+ upload (<?php echo jirafeau_get_max_upload_chunk_size_bytes($cfg['max_upload_chunk_size_bytes']); ?>);
+ "><fieldset>
<legend>
<?php echo t('SEL_FILE'); ?>
</legend>
<p id="max_file_size" class="config"></p>
<p>
- <input type="submit" id="send" value="<?php echo t('SEND'); ?>"
- onclick="
- document.getElementById('upload').style.display = 'none';
- document.getElementById('uploading').style.display = '';
- upload (<?php echo jirafeau_get_max_upload_chunk_size_bytes($cfg['max_upload_chunk_size_bytes']); ?>);
- "/>
+ <input type="submit" id="send" value="<?php echo t('SEND'); ?>"/>
</p>
</table>
- </div> </fieldset>
+ </div> </fieldset></form>
<?php
if (jirafeau_user_session_logged()) {