Bootstrap alert-warning vs gs.addInfoMessage style

Justin Abbott
Giga Guru

Does anyone know a way of using Bootstrap's alert-warning style in place of the default gs.addInfoMessage() or gs.addErrorMessage() styling? I'm trying to do this in a display business rule.

I've tried playing around with hacky CSS stuff, but that had undesired consequences.

Instead of this...

info.JPG

I want this...

warn.JPG

8 REPLIES 8

Chuck Tomasi
Tera Patron

Hi,



I'm not aware of a way to do what you are looking for. Can you tell me what the use case is? Typically, consistency is a good thing (red for bad, blue for info). Introducing additional colors can be confusing to your end users.


We're trying to establish different levels of alerts.



Green = Success


Blue = Neutral/Informational


Yellow = Warning


Red = Bad



We want red for bad to display when an action has resulted in an error, but we want the yellow to warn before an action occurs.


akashsrm100
Kilo Guru

This code may help you


  <div class="alert alert-warning">


      <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>


      <strong>Warning!</strong>This alert box could indicate a warning that might need attention.


  </div>


In Bootstrap the warning have same color you need.



For more info Bootstrap Alerts



Thanks


Akash Sharma


PS Hit like if Helps/correct


Thanks, Akash. That's the exact code I tried implementing, but I'm having trouble with it conflicting with ServicNow oob code.