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

Conversation

karjo24
Copy link
Contributor

@karjo24 karjo24 commented Nov 21, 2024

Motivation and Context

See #1404.

Description

This PR adds buttons that remove every currently selected file from the respective file selection.

Steps for Testing

Prerequisites:

  • 1 Admin
  • 1 Course
  1. Log in
  2. Navigate to course admin page
  3. Click on Video Upload, continue, select any date, continue again.
  4. See new "trashcan" buttons and test functionality by selecting and deselecting files.

Screenshots

Screenshot from 2024-11-21 16-59-02

@karjo24 karjo24 linked an issue Nov 21, 2024 that may be closed by this pull request
@karjo24 karjo24 self-assigned this Nov 21, 2024
Copy link

Your Testserver will be ready at https://1412.test.live.mm.rbg.tum.de in a few minutes.

Logins
Kurs1 Kurs2 Kurs3 Kurs4
public public loggedin enrolled
prof1 prof1 prof2 prof1
prof2
student1
student2
student3
student1
student2
student2
student3
student1
student2

<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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow deselecting chosen file during video upload
2 participants