Problem/Motivation

This behavior was added in 1.3 release https://www.drupal.org/project/require_on_publish/releases/8.x-1.3 on this issue https://www.drupal.org/project/require_on_publish/issues/3064815

Our content editors are not happy with these kinds of warnings, the module should offer a configurable option for that.

Steps to reproduce

When editing or adding a content with a "Required On Publish" field

Proposed resolution

It implements a new "Warning on Empty" checkbox so we can configure these kinds of messages as you want.

Proposed solution

Comments

Zarpele created an issue. See original summary.

zarpele’s picture

Status: Active » Needs review
StatusFileSize
new2.61 KB
zarpele’s picture

Hey Guys, I spent some time implementing the Remaining tasks, this last patch implements a new "Warning on Empty" checkbox so we can configure these kinds of messages as you want.

zarpele’s picture

Issue summary: View changes
StatusFileSize
new44.06 KB
graber’s picture

Status: Needs review » Reviewed & tested by the community

Hi, checked the code and tested this and all looks good :)

mpriscella’s picture

I like the idea! While thinking about the problem though, it seemed to me that there would probably be very few scenarios where a site administrator would want to hide warnings for one field on an edit form versus another field. The more likely scenario is that a site administrator would want to either hide or show all warnings across the board. I created this patch based off your work that creates a global configuration form for the form where one can toggle the display status of the warning message. Let me know what you think and whether my logic here is flawed.

demonde’s picture

$message = $label . ' can not be empty on publication.';

Looks to me as if the message is not translatable by the UI translation interface yet.

zarpele’s picture

> demonde
Yes, i only sent the improvements on the configuration and behavior. The message line was there before my code. Could you create a new issue to face it there?

graber’s picture

Just to be clear on this, I gave an RTBC to the patch from #3.

I don't think limiting its possibilities as in #6 is a good idea as we can run to other edge cases where site admins will need some messages to display but not all. Better to give full power IMO.

mpriscella’s picture

Fair enough, I'll move the code in #6 to a new issue to compliment (not replace) the functionality in #3.

  • mpriscella committed 5acb2ab on 8.x-1.x
    Issue #3184305 by Zarpele, mpriscella, Graber: Make warnings messages...
mpriscella’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.