Problem/Motivation

Just a small UX feature: if there is only one alert type, don't make the user choose, just do it for them.

Steps to reproduce

  1. Install module default
  2. Create a new sitewide alert
  3. Forced to choose default

Proposed resolution

Set field type to hidden and value to the only option

Remaining tasks

MR

User interface changes

Style is hidden when only one option

API changes

N/A

Data model changes

N/A

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

scott_euser created an issue. See original summary.

scott_euser’s picture

Status: Active » Needs review
StatusFileSize
new5.93 MB

Demo of this:

  1. Default: only one style
  2. Create alert, no style shown, but style still correctly chosen on list of alerts
  3. Add a second style
  4. Create alert, choice given

scott_euser’s picture

PHPCS issue is unrelated existing in 3.0.x-dev as well.

smustgrave’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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