Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1404 allow deselecting chosen file during video upload #1412

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,33 @@
<div class="mb-4">
<label x-show="formData.premiere || formData.vodup && !loading">
<span class="text-sm text-5">Combined Video (mp4, if possible h264)</span>
<input type="file" accept="video/mp4" class="btn tl-choose-file w-full mt-2 mx-2"
x-on:change="updateFiles('COMB', Object.values($event.target.files))">
<label class="flex">
<input id="fileSelection1" type="file" accept="video/mp4" class="btn tl-choose-file mt-2 mx-2 w-full"
x-on:change="updateFiles('COMB', Object.values($event.target.files));">
<button type="button" title="Deselect File" class="fa fa-trash mt-2 mx-2" @click="updateFiles('COMB', []);document.getElementById('fileSelection1').value = '';"></button>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of adding an id and querying the document, can you use x-ref?

</label>
</label>
</div>

<div class="mb-4">
<label x-show="formData.premiere || formData.vodup && !loading">
<span class="text-sm text-5">Presentation Video (mp4, if possible h264)</span>
<input type="file" accept="video/mp4" class="btn tl-choose-file w-full mt-2 mx-2"
x-on:change="updateFiles('PRES', Object.values($event.target.files))">
<label class="flex">
<input id="fileSelection2" type="file" accept="video/mp4" class="btn tl-choose-file mt-2 mx-2 w-full"
x-on:change="updateFiles('PRES', Object.values($event.target.files));">
<button type="button" title="Deselect File" class="fa fa-trash mt-2 mx-2" @click="updateFiles('PRES', []);document.getElementById('fileSelection2').value = '';"></button>
</label>
</label>
</div>

<div>
<label x-show="formData.premiere || formData.vodup && !loading">
<span class="text-sm text-5">Camera Video (mp4, if possible h264)</span>
<input type="file" accept="video/mp4" class="btn tl-choose-file w-full mt-2 mx-2"
x-on:change="updateFiles('CAM', Object.values($event.target.files))">
<label class="flex">
<input id="fileSelection3" type="file" accept="video/mp4" class="btn tl-choose-file mt-2 mx-2 w-full"
x-on:change="updateFiles('CAM', Object.values($event.target.files));">
<button type="button" title="Deselect File" class="fa fa-trash mt-2 mx-2" @click="updateFiles('CAM', []);document.getElementById('fileSelection3').value = '';"></button>
</label>
</label>
</div>
{{end}}
Loading