Description of the bug
Layout module allows you to style a button as a link, using the "layout-link-button" class. However buttons styled as links lose the ability to have a disabled state.
Steps To Reproduce
To reproduce the behavior:
- Find a link button in core (all the "links" on
admin/structure/layouts/manage/dashboard/configure are actually buttons, for example. The code for the 'Add condition' button is on line 764 of layout.admin.inc if needed to demo.
- Disable browser JS so you can see its a button
- After line 764 of
layout.admin.inc, add the #disabled => TRUE attribute to the button element. Clicking the button after this attribute is added will result in no action. The button has been disabled.
- Re-enable JS, the button turns back into a link, but now, though it should be disabled (the element even still has `disabled="disabled" if viewed in dev tools) it will submit just as thought its not disabled.
Expected behavior
Links don't have a "disabled" state according to HTML, but since these are actually buttons, we should expect that they shouldnt work if disabled. We should be able to add code that removes the href or prevents the link from working in some way.
Description of the bug
Layout module allows you to style a button as a link, using the "layout-link-button" class. However buttons styled as links lose the ability to have a disabled state.
Steps To Reproduce
To reproduce the behavior:
admin/structure/layouts/manage/dashboard/configureare actually buttons, for example. The code for the 'Add condition' button is on line 764 oflayout.admin.incif needed to demo.layout.admin.inc, add the#disabled => TRUEattribute to the button element. Clicking the button after this attribute is added will result in no action. The button has been disabled.Expected behavior
Links don't have a "disabled" state according to HTML, but since these are actually buttons, we should expect that they shouldnt work if disabled. We should be able to add code that removes the
hrefor prevents the link from working in some way.