block uploads/names/passwords on UI level according to config
This commit is contained in:
parent
f53dc248c9
commit
e72a556394
|
@ -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;
|
||||||
|
}
|
||||||
|
|
|
@ -28,45 +28,50 @@
|
||||||
<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>
|
||||||
<p>
|
{%- if conf.files.allow_custom_names -%}
|
||||||
<label>
|
<p>
|
||||||
<input type="checkbox" name="named">
|
<label>
|
||||||
</label>
|
<input type="checkbox" name="named">
|
||||||
<label for="bfile-formupload-file-name">
|
</label>
|
||||||
I also want my file named:
|
<label for="bfile-formupload-file-name">
|
||||||
</label>
|
I also want my file named:
|
||||||
<span class="form-input-partial">
|
</label>
|
||||||
<span class="form-input-label">
|
<span class="form-input-partial">
|
||||||
{{ env.instanceurl }}/
|
<span class="form-input-label">
|
||||||
|
{{ env.instanceurl }}/
|
||||||
|
</span>
|
||||||
|
<input style="max-width:100px" id='bfile-formupload-file-name' type="text" name="filename" placeholder="file.txt"></input>
|
||||||
</span>
|
</span>
|
||||||
<input style="max-width:100px" id='bfile-formupload-file-name' type="text" name="filename" placeholder="file.txt"></input>
|
</p>
|
||||||
</span>
|
{%- endif -%}
|
||||||
</p>
|
|
||||||
<table>
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<label>
|
|
||||||
<input type="checkbox" name="passworded">
|
|
||||||
I want to add a password to the file:
|
|
||||||
|
|
||||||
<span style="font-size:80%;display:block">
|
{%- if conf.files.allow_pass_protection -%}
|
||||||
Warning: the file WILL NOT be encrypted,<br/>
|
<table>
|
||||||
therefore this is not 100% secure.<br/>
|
<tbody>
|
||||||
<a href="/passworded-files">
|
<tr>
|
||||||
Learn more
|
<td>
|
||||||
</a>
|
<label>
|
||||||
</span>
|
<input type="checkbox" name="passworded">
|
||||||
</label>
|
I want to add a password to the file:
|
||||||
</td>
|
|
||||||
<td style="padding-left:4px">
|
<span style="font-size:80%;display:block">
|
||||||
<label>
|
Warning: the file WILL NOT be encrypted,<br/>
|
||||||
<input type="password" name="password" style="max-width:90px">
|
therefore this is not 100% secure.<br/>
|
||||||
</label>
|
<a href="/passworded-files">
|
||||||
</td>
|
Learn more
|
||||||
</tr>
|
</a>
|
||||||
</tbody>
|
</span>
|
||||||
</table>
|
</label>
|
||||||
|
</td>
|
||||||
|
<td style="padding-left:4px">
|
||||||
|
<label>
|
||||||
|
<input type="password" name="password" style="max-width:90px">
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{%- endif -%}
|
||||||
<p>
|
<p>
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" name="tos_consent">
|
<input type="checkbox" name="tos_consent">
|
||||||
|
@ -79,38 +84,49 @@
|
||||||
</span>
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
{%- if ! conf.files.allow_uploads -%}
|
||||||
<input type="file" name="file" id="bfile-formupload-file" style="display: none" />
|
<div class="alert danger" style="margin-bottom:4px">
|
||||||
<label for="bfile-formupload-file">
|
<h1 class="alert-title">
|
||||||
<span class='btn btn-fill mobile-file-upload-btn'>
|
Error
|
||||||
Select a file
|
</h1>
|
||||||
</span>
|
<p class="alert-text">
|
||||||
<button type="button" class="file-drag-n-drop">
|
Uploads are temporarily disabled by the administrator.
|
||||||
<span class="file-drag-n-drop-inside">
|
</p>
|
||||||
<span class="file-drag-n-drop-inside-text">
|
</div>
|
||||||
<object data="/tab-new-symbolic.svg" width="32" height="32" tabindex="-1"></object><br/>
|
{%- else -%}
|
||||||
<span style="line-height:16pt">
|
<p>
|
||||||
<span id='drag-n-drop-jsonly' style='display:none'>
|
<input type="file" name="file" id="bfile-formupload-file" style="display: none" />
|
||||||
Drag & drop your files here!
|
<label for="bfile-formupload-file">
|
||||||
</span>
|
<span class='btn btn-fill mobile-file-upload-btn'>
|
||||||
<noscript>
|
Select a file
|
||||||
Click to upload your files!<br/>
|
</span>
|
||||||
<span style="font-size: 70%">
|
<button type="button" class="file-drag-n-drop">
|
||||||
You will be able to drag and drop if you enable JS
|
<span class="file-drag-n-drop-inside">
|
||||||
|
<span class="file-drag-n-drop-inside-text">
|
||||||
|
<object data="/tab-new-symbolic.svg" width="32" height="32" tabindex="-1"></object><br/>
|
||||||
|
<span style="line-height:16pt">
|
||||||
|
<span id='drag-n-drop-jsonly' style='display:none'>
|
||||||
|
Drag & drop your files here!
|
||||||
</span>
|
</span>
|
||||||
</noscript>
|
<noscript>
|
||||||
|
Click to upload your files!<br/>
|
||||||
|
<span style="font-size: 70%">
|
||||||
|
You will be able to drag and drop if you enable JS
|
||||||
|
</span>
|
||||||
|
</noscript>
|
||||||
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</button>
|
||||||
|
<script src="/dragndrop-form.js"></script>
|
||||||
|
</label>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<button class='btn btn-fill'>
|
||||||
|
Upload!
|
||||||
</button>
|
</button>
|
||||||
<script src="/dragndrop-form.js"></script>
|
</p>
|
||||||
</label>
|
{%- endif -%}
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<button class='btn btn-fill'>
|
|
||||||
Upload!
|
|
||||||
</button>
|
|
||||||
</p>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue