Problem/Motivation

When the current user only has the "save" action available (ie the "same state" -> "same state" transition) the button for that action and for the comment field do not appear. I need the button and the comment field even when I got only the same transition option.

Proposed resolution

The module is used for several use cases, so I think the actions should be configurable. So I added two checkboxes to configure whether the button and the comment field should appear when only one transition is available.

I found a similar issue but was closed before be applied #2596317: Button not available when only one action is possible

Comments

luizps created an issue. See original summary.

luizps’s picture

Status: Active » Needs review
StatusFileSize
new7.05 KB

I've created the checkbox on labels configuration page.

johnv’s picture

Title: Button and field not available when only one action is possible » Show/hide Action button and Comment field when only one action is possible
Category: Bug report » Feature request
Priority: Major » Normal
Status: Needs review » Needs work
Related issues: +#2639372: Set entity fields to hidden/view/edit/required based upon workflow state, +#318325: [META] Display/hide/require the Widget subfields based on State/Role

I understand your problem.
IMO this is a special case of #2639372: Set entity fields to hidden/view/edit/required based upon workflow state and #2850103: Display/hide/require the Comment subfield based on state.
I prefer to have a more general solution.

johnv’s picture

Issue summary: View changes
johnv’s picture

Status: Needs work » Closed (outdated)

@luizps, I took your code and added it (a heavily altered version) to the D11 2.1.9+dev code, and added a contribution to your work.
See #2948377-19: Do not hide widget when having only one option

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

johnv’s picture