Skip to content

Transfers form: avoid duplicates when clicking several times #614

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

Merged
merged 2 commits into from
Apr 17, 2021

Conversation

markets
Copy link
Collaborator

@markets markets commented Apr 16, 2021

Hi @sseerrggii 👋🏼 this is an attempt to solve #607. Approach: use Rails native data-disable-with in the submit button, so when a user clicks, the button becomes disabled (similar as we did here: #517).

EXTRA 🎁
Minor Admin improvements:

  • Add some missing attributes/filters in index pages.
  • Allow to properly create posts. Basically add an Organization selector in this form. In future iterations, we need better control for that (probably using nested selects via ajax + new validations), but at least now you will be able to create "valid" posts from the Admin.

@sseerrggii
Copy link
Contributor

Tested!!

Nice improvements @markets :)

On production, admin selects always are too large and difficult to find the element you are looking for. I usually use organization selector and usually I do tasks about last organization created, so order orgs by ID on this select boxes is a good first step for me, Could you check if all org selects are ordered by ID in your next EXTRA features? Thanks 💝

@sseerrggii sseerrggii merged commit bb22e48 into develop Apr 17, 2021
@sseerrggii sseerrggii deleted the transfers_minor_fixes branch April 17, 2021 13:48
@markets
Copy link
Collaborator Author

markets commented Apr 17, 2021

👍🏼 yes! this is one of the "classic" gotchas of ActiveAdmin. I'll look for a proper solution in the next round! Since we already have the select2 library, maybe we can convert all these selects to "js selects" with the search integrated: https://select2.org/getting-started/basic-usage

@sseerrggii
Copy link
Contributor

Yes, this will be nice :)

@markets markets mentioned this pull request Apr 17, 2021
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