-
-
Notifications
You must be signed in to change notification settings - Fork 174
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
Add option for remember fieldsets.collapse state (visible/hidden). #160
Comments
Hello, I can help with a PR for this issue, is that ok or is it already assigned? |
@luciano-im this issue is not assigned, any contribution is appreciated! |
Hi Fabio, to identify each fieldset with a name to handle its state, one option is to add a data attribute to each fieldset with the name suggested in issue #173: {app_name}-{model_name}-{fieldset_name}. To achieve this, I need to include a copy of templates/admin/includes/fieldset.html to override it. Is this a good idea? I'm thinking if this could be a problem if Django changes this file in future releases? If it's possible to override fieldset.html file, then in static/admin/js/collapse.js I could get and set the state of each rendered fieldset. What do you think? |
Hi @luciano-im, Actually there are already some admin templates that gets overridden and frankly I'm a bit worried about potential problems in future releases, but once #301 will be done, this will be no more a big problem. |
I understand clearly. Let me see if I can find a javascript solution so that the default template doesn't need to be overridden. |
@luciano-im any update? |
Hi @fabiocaccamo, I'm sorry but I've been busy and I couldn't finish the pull request. Next week I will be working on this again. |
@luciano-im no problem, thank you for the update! |
@luciano-im I close this as it is stale, I will be glad to re-open it if needed. |
The text was updated successfully, but these errors were encountered: