Customizing a LiveForm's action buttons is hard
Bug #438688 reported by
Jonathan Jacobs
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Methanal |
Fix Released
|
Medium
|
Jonathan Jacobs |
Bug Description
The only way to customize a LiveForm's action buttons is to subclass it and provide your own template (which is likely to be a copy of LiveForm's with a few minor changes.) This approach is rather ugly and error prone (the template for LiveForm should be able to change without fear of breaking everything) for such a common operation.
One solution is to introduce an Action Python object that dictates what action buttons appear and what they do.
Bug #436924 probably can't be implemented cleanly before this functionality is introduced.
Related branches
lp:~jjacobs/methanal/liveform-actions
Merged
into
lp:methanal
- Tristan Seligmann: Approve
-
Diff: 553 lines7 files modifiedmethanal/js/Methanal/Tests/TestView.js (+61/-5)
methanal/js/Methanal/View.js (+139/-39)
methanal/static/styles/methanal.css (+21/-3)
methanal/themes/methanal-base/methanal-action-button.html (+4/-0)
methanal/themes/methanal-base/methanal-action-container.html (+4/-0)
methanal/themes/methanal-base/methanal-liveform.html (+1/-2)
methanal/view.py (+110/-11)
lp:~jjacobs/methanal/liveform-actions-again
Merged
into
lp:methanal
- Tristan Seligmann: Approve
-
Diff: 247 lines6 files modifiedmethanal/js/Methanal/View.js (+30/-3)
methanal/test/test_view.py (+39/-17)
methanal/themes/methanal-base/methanal-action-button.html (+1/-1)
methanal/themes/methanal-base/methanal-action-container.html (+1/-1)
methanal/themes/methanal-base/methanal-liveform.html (+1/-1)
methanal/view.py (+3/-3)
Changed in methanal: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in methanal: | |
status: | Confirmed → In Progress |
Changed in methanal: | |
assignee: | nobody → Jonathan Jacobs (jjacobs) |
Changed in methanal: | |
status: | In Progress → Fix Committed |
Changed in methanal: | |
status: | Incomplete → In Progress |
Changed in methanal: | |
status: | In Progress → Fix Committed |
Changed in methanal: | |
milestone: | none → 0.2.0 |
Changed in methanal: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I'm re-opening this, because there is an issue with the code in the branch, indicating that additional testing is required.