Problem/Motivation

See #3262540: [META] Use Policy GUI even with back-compatibility.

Proposed resolution

  1. On the edit page for a config entity related to sending emails (such as ContactForm) we can add a listing of Mailer Policy elements of that entity type: the exact match and the policy for any entity.
  2. On the settings page for a module related to sending emails (such as AccountSettingsForm) we can add a listing of Mailer Policy elements for that module: each subtype and the policy for any subtype.

The listing is a filtered set of the MailerPolicyListBuilder shown at /admin/config/system/mailer/policy, showing summary of each Mailer with links to edit/delete. If a policy does not exist then instead there is a button to create it.

This issue creates the framework, but doesn't yet add it to any modules.

Remaining tasks

None

User interface changes

As above

API changes

Implementation is provided on a new service MailerHelper with functions renderEntityPolicy() and renderTypePolicy().

Data model changes

None

Comments

AdamPS created an issue. See original summary.

adamps’s picture

Issue summary: View changes
adamps’s picture

Title: Theme hook to render a button/link to edit/create policy » Utility function to render a button to edit/create policy
Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new2.76 KB
adamps’s picture

Title: Utility function to render a button to edit/create policy » Automatically add a button to edit/create policy on config entity form
Issue summary: View changes
StatusFileSize
new10.29 KB
adamps’s picture

adamps’s picture

Title: Automatically add a button to edit/create policy on config entity form » Add view/edit of related policy to existing config/settings forms
Issue summary: View changes
StatusFileSize
new17.73 KB
adamps’s picture

Status: Needs review » Fixed

  • AdamPS committed 0557670 on 1.x
    Issue #3263870 by AdamPS: Add view/edit of related policy to existing...

Status: Fixed » Closed (fixed)

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