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

Remove old url redirection and add form reset #1012

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thremilien
Copy link
Contributor

@thremilien thremilien commented Aug 21, 2024

Resolves 404 error when clicking on reset button
#1010
#980

@@ -247,10 +247,10 @@

<!-- Validate -->
<div class="btn-group pull-right mb-2">
<button type="button" class="btn btn-danger btn-block m-1 p-2 pl-4 pr-4" onclick="window.location.href='{{get_homepath()}}/admin/{{course.get_id()}}/new_submissions'">
<button id="reset_button" type="button" class="btn btn-danger btn-block m-1 p-2 pl-4 pr-4" onclick="document.getElementById('select_form').reset();document.getElementById('filter_button').click();">
Copy link
Contributor

Choose a reason for hiding this comment

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

This quite a stretch and not optimal. The actual solutions simply redirects to a page (with a url we need to change).
Your solution resets the form, submits the default filter to the server, the server handles it and responds to the frontend which redirects you to the page.

Just change the URL of the actual code : onclick="window.location.href='{{get_homepath()}}/admin/{{course.get_id()}}/submissions'"

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.

2 participants