There's already code in ModerationStateForm to do this, but it appears buggy. If the form's initial state is that "make default" is checked but "published" is not, the form will preload with make-default checked but then uncheck it in Javascript immediately. This appears to be a core bug.

As soon as the core bug is identified and fixed we should uncomment the code in question.

Comments

Crell created an issue. See original summary.

becw’s picture

Crell’s picture

Status: Active » Postponed
Related issues: +#994360: #states cannot check/uncheck checkboxes elements

Marking postponed on that core bug.

jibran’s picture