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

Fix issue #13: Ability to delete a term from reading screen #85

Merged
merged 1 commit into from
Dec 29, 2023

Conversation

dgc08
Copy link
Contributor

@dgc08 dgc08 commented Dec 28, 2023

Added delete term button in term form, visible in both /read and /term/edit:
Button in /read reloads the page
Button in /term/edit redirects to /term/index

Removed old delete button in /term/edit

Check if you're fine with the layout, I've placed the button below the "save" button, in the next table row.
This is the first JS code I have ever written lol, but it works.

Added Delete button in term form, visible in both /read and /term/edit:
 Button in /read reloads the page
 Button in /term/edit redirects to /term/index

Removed old delete button in /term/edit
@jzohrab
Copy link
Collaborator

jzohrab commented Dec 29, 2023

Works great, thanks! I've not used fetch that way -- I'd have used an ajax post -- but this way works fine. I did change the layout to put the delete on the same row, I think that's fine as a first pass:

image

Rerunning the tests locally, they failed in GitHub. The ci tests are sometimes flaky, need to fix. I'll merge locally when all is good. Thanks again!

@jzohrab
Copy link
Collaborator

jzohrab commented Dec 29, 2023

Ah, changing the delete back to a POST though, it's really a POST action, which might change the "fetch" back to an ajax post. All good.

@jzohrab jzohrab merged commit 4f0687c into LuteOrg:develop Dec 29, 2023
6 of 10 checks passed
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