Problem/Motivation

Now that the validation system knows "causes" we have the ability to display better helpful messages in circumstances where HostEntity::isAvailableForRegistration() is preventing showing of a registration link or button.

RegistrationLinkFormatter is one obvious example, RegistrationFormFormatter another.

Proposed resolution

Remaining tasks

User interface changes

When "Registration link" or "Registration form" is chosen as the field formatter for the Registration field on the host entity view display, there is a new "Show reason when hidden" option in the formatter settings. If the host entity is a node, the path to manage the default display is /admin/structure/types/manage/<content_type_machine_name>/display.

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jonathanshaw created an issue. See original summary.

john.oltman’s picture

Assigned: Unassigned » john.oltman
john.oltman’s picture

@jonathanshaw, what UX did you have in mind for this. The issue I am running into is replacing a link or form with some text that says "Not open yet" doesn't work - not enough context. The full message "Registration for this event is not open yet" sort of works, but barely.

john.oltman’s picture

Title: Show causes with registration link » Show causes with registration link and form
jonathanshaw’s picture

I haven't thought about it enough to be sure. The problem you're describing makes sense.

How about something like:

For links:
Registration not available:
Cause1. Cause2.

For form:
Registration for this event is not available:
Cause1. Cause2.

It's all better than giving no explanation.

john.oltman’s picture

Makes sense, will proceed as outlined. I'm making it optional to have the causes via a field formatter setting, so existing sites are not impacted.

  • john.oltman committed 4a2b0055 on 3.3.x
    #3499231: Show causes with registration link and form
    
john.oltman’s picture

Assigned: john.oltman » Unassigned
Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

john.oltman’s picture

Issue summary: View changes
john.oltman’s picture

Issue summary: View changes