Add disabled attribute to add/remove item buttons in collection that don't allow these operations
szymach opened this issue · 8 comments
Currently even if you specify allow_add = false
and/or allow_delete = false
the buttons are still created, but inactive. They should not be rendered at all.
why?
What's the point of having inactive buttons that serve no purpose? They make an impression that they're suppose to do something, but they don't, which is a bit confusing.
you can always overwrite base template and remove them. Anyway in version 3.0 base layout will be redesigned to remove some legacy stuff like using requirejs for example - that would be a good place to post such requests.
Well you can always overwrite things each time you use the panel, but wouldn't it be better to make it work properly in the base version? Currently you are making overhead operations that in the end serve no purpose and can be confusing. This is a simple change that will improve user experience and reduce unnecessary front-end operations. Also, it is not related to legacy in any way - no matter if we use require.js
or not, the collection script will remain more or less the same.
I see the point but its too late for such changes, you can't predict how this change will affect system at all and for sure there was a reason for making those buttons inactive in the past.
work properly in the base version
I see nothing not proper in current behavior its only different from what you expect.
Alright, to specify - when a collection does not allow adding or deleting items the corresponding buttons should have an attribute disabled
and be greyed out. This will make it clear that you cannot use them.
well now it make sense. The origin issue what that disable
attribute was missing on buttons that were inactive.
anyway its not critical, #221 is more important and should be fixed first