-
Notifications
You must be signed in to change notification settings - Fork 40
Open
backdrop/backdrop
#5175Labels
Milestone
Description
Description of the bug
form_process_actions() in core/includes/form.inc designates a form's first action (button) as the 'primary', unless one has already been specified manually. It does this by inspecting each action to see if it has either a 'button-primary' or 'button-danger' class. However, the current logic requires the button to have both classes instead of just one or the other.
Steps To Reproduce
To reproduce the behavior:
- Create a form with two actions (buttons).
- Specify that the second button is the 'primary' via
['#attributes']['class'][] = 'button-primary';or['#attributes']['class'][] = 'button-danger'; - View the form.
Actual behavior
The first button is incorrectly displayed as the primary (highlighted with a blue background).
Expected behavior
The second button should be displayed as the primary (highlighted with a blue or red background).