add password request on upload page

This commit is contained in:
blek 2023-10-27 00:50:02 +10:00
parent 6617efc9fe
commit 5fc980a0b6
Signed by: blek
GPG Key ID: 14546221E3595D0C
2 changed files with 22 additions and 0 deletions

View File

@ -20,4 +20,8 @@
.alert.danger .alert-title {
background: #602020;
}
.alert.blue .alert-title {
background: #203050;
}

View File

@ -114,6 +114,24 @@
</p>
</div>
{%- else -%}
{%- if let Some(pass) = conf.files.upload_pass -%}
<div class="alert blue">
<h1 class="alert-title">
Upload password
</h1>
<div class="alert-text">
<p>This instance requires a password to upload a file.</p>
<p>
<label>
Password:
<input type="password" name="instance-pass">
</label>
</p>
</div>
</div>
{%- endif -%}
<p>
<input type="file" name="file" id="bfile-formupload-file" style="display: none" />
<label for="bfile-formupload-file">