mantisbt-plugins / Announce

Announcements plugin for MantisBT, lets privileged accounts create and post announcements that can be shown to users on a global or per-project basis, and allow users to dismiss individual messages.
MIT License
20 stars 14 forks source link

Consistently set default value preselection in Locations lists #38

Closed dregad closed 6 years ago

dregad commented 6 years ago

Currently, the plugin only handles a single Location type (header).

When creating a new announcement, the code preselects the only available value in the Location list whereas in the Edit Announcements page, when clicking on the + button to add a new context, the selection list defaults to (select one) even though there is only a single value to choose from.

This inconsistent behavior should be fixed. When the system only defines a single location type, it should always be preselected.