Fix disabled vanity field
This commit is contained in:
@@ -6,10 +6,10 @@
|
||||
<form id="upload" class="card" method="post" action="{{.Base}}api/upload"
|
||||
enctype="multipart/form-data" data-max-size="{{.MaxSizeBytes}}">
|
||||
|
||||
<div class="drop" id="drop">
|
||||
<input type="file" name="file" id="file" required>
|
||||
<p class="hint" id="drop-hint">Choose a file, or drop one here.</p>
|
||||
</div>
|
||||
<!-- Field order is load-bearing: the server streams this body rather than
|
||||
spooling it, so every option and the token have to arrive before the
|
||||
file part does. The drop zone is lifted back to the top of the card with
|
||||
CSS order, which changes what is seen without changing what is sent. -->
|
||||
|
||||
<div class="row">
|
||||
<label class="field">
|
||||
@@ -19,7 +19,7 @@
|
||||
<label class="field">
|
||||
<span>Custom name <em>({{if .AllowVanity}}optional{{else}}needs a token{{end}})</em></span>
|
||||
<input type="text" name="vanity" id="vanity" placeholder="auto" autocomplete="off"
|
||||
pattern="[A-Za-z0-9][A-Za-z0-9._-]{1,63}"{{if not .AllowVanity}} disabled{{end}}>
|
||||
pattern="[A-Za-z0-9][A-Za-z0-9._-]{1,63}">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@@ -35,6 +35,11 @@
|
||||
</label>
|
||||
</details>
|
||||
|
||||
<div class="drop" id="drop">
|
||||
<input type="file" name="file" id="file" required>
|
||||
<p class="hint" id="drop-hint">Choose a file, or drop one here.</p>
|
||||
</div>
|
||||
|
||||
<div class="progress" id="progress" hidden>
|
||||
<div class="bar"><div class="fill" id="bar-fill"></div></div>
|
||||
<p class="hint" id="progress-text"></p>
|
||||
|
||||
Reference in New Issue
Block a user