I'll take a look at it.. I'm wondering, however, why you wouldn't just use a CheckboxSetField or MultiSelectField to create that relationship. If products are already managed in ModelAdmin, why create multiple workflows for creating them? The DOM seems like overkill in this case.
297 Posts 52891 Views
Thanks for the tip about MultiSelectField.
I wanted to pick a solution that makes it easy to select a few dataobjects out of hundreds.
SimpleHTMLEditorfield: produces something like this:
- <br> should be <br /> if I am using some form of xhtml. I could not find a switch to change this behavior.
- for some reason br is encapsulated by div, this makes the code less clean
- Sometimes text does and sometimes text does not get encapsulated by div(s). I think it would be better to encapsulate it in p, and make this standard behavior (so you know what to expect in the output).
I consider this a bug, but people might disagree of course :-)
I have now switched to SimpleTinyMCEField because it did not have any of these issues.
Yeah, SimpleTinyMCE is the way to go. Those other two tools are fairly immature.
I have a nested FiledDataObject manager. Everything behaves ok, but the name under the file pulls the ID and not the caption that I want. This is my code:
While working with the DOM we found a bug with modifying permissions on a DOM instance.
The culprit is the removePermission method where it's impossible to remove the "add" permission. The root of the problem is that you're not checking the array key with strict typing, so that array key 0 equals false!
Here you'll find a patch that fixes the issue: