Broadcast Message Customization and Preview
Created by: atomaka
The new broadcast message feature implements a color scheme that fits in with the GitLab themes. However, often times it is necessary for alerts to stand out. This PR implements the ability for administrators to customize the colors of their broadcast messages to allow them to determine the importance that a message be noticed. Since customization was added, the ability to preview this message was also implemented.
This was implemented via model and view changes to the new broadcast message feature. Specifically, two new fields were added to the database table for broadcast messages that represent the background and font colors of the message. These fields default to values currently set by GitLab. The administrative view for the broadcast messages was updated to include a link that expands two form fields when clicked and a preview of what the message will look like. JavaScript was added to do some of this. Finally, the broadcast message partial was updated to use the new database fields for the colors. This implementation method would likely change if I completed the functionality (probably in the way uncustomized messages are handled).
The default view of the current broadcast page adds a preview box that updates in real time based on the contents of the form. It also adds a link, "Customize Colors."
When the link is clicked, the form expands to allow the addition of colors.