block uploads/names/passwords on UI level according to config

This commit is contained in:
blek 2023-10-21 13:43:37 +10:00
parent f53dc248c9
commit e72a556394
Signed by: blek
GPG Key ID: 14546221E3595D0C
2 changed files with 107 additions and 67 deletions

View File

@ -282,3 +282,27 @@ input[type=email] {
padding: 2px 4px; padding: 2px 4px;
outline: none; outline: none;
} }
.alert {
margin: 20px 0;
border: 1px solid var(--header-sec-color);
border-radius: 12px;
}
.alert .alert-title {
margin: 0;
padding: var(--margin-y) var(--margin-x);
border-radius: 12px 12px 0 0;
border-bottom: 1px solid var(--header-sec-color);
background: var(--view-color);
}
.alert .alert-text {
padding: var(--margin-y) var(--margin-x);
border-radius: 0 0 12px 12px;
margin: 0;
}
.alert.danger .alert-title {
background: #602020;
}

View File

@ -28,6 +28,7 @@
<label for="bfile-formupload-delete-dl">After 30 minutes OR a download</label> <label for="bfile-formupload-delete-dl">After 30 minutes OR a download</label>
</li> </li>
</ul> </ul>
{%- if conf.files.allow_custom_names -%}
<p> <p>
<label> <label>
<input type="checkbox" name="named"> <input type="checkbox" name="named">
@ -42,6 +43,9 @@
<input style="max-width:100px" id='bfile-formupload-file-name' type="text" name="filename" placeholder="file.txt"></input> <input style="max-width:100px" id='bfile-formupload-file-name' type="text" name="filename" placeholder="file.txt"></input>
</span> </span>
</p> </p>
{%- endif -%}
{%- if conf.files.allow_pass_protection -%}
<table> <table>
<tbody> <tbody>
<tr> <tr>
@ -67,6 +71,7 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
{%- endif -%}
<p> <p>
<label> <label>
<input type="checkbox" name="tos_consent"> <input type="checkbox" name="tos_consent">
@ -79,6 +84,16 @@
</span> </span>
</label> </label>
</p> </p>
{%- if ! conf.files.allow_uploads -%}
<div class="alert danger" style="margin-bottom:4px">
<h1 class="alert-title">
Error
</h1>
<p class="alert-text">
Uploads are temporarily disabled by the administrator.
</p>
</div>
{%- else -%}
<p> <p>
<input type="file" name="file" id="bfile-formupload-file" style="display: none" /> <input type="file" name="file" id="bfile-formupload-file" style="display: none" />
<label for="bfile-formupload-file"> <label for="bfile-formupload-file">
@ -111,6 +126,7 @@
Upload! Upload!
</button> </button>
</p> </p>
{%- endif -%}
</form> </form>
</div> </div>
</div> </div>