diff options
Diffstat (limited to 'src/usr/local/www/guiconfig.inc')
-rw-r--r-- | src/usr/local/www/guiconfig.inc | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/usr/local/www/guiconfig.inc b/src/usr/local/www/guiconfig.inc index d79d6a4..b33d977 100644 --- a/src/usr/local/www/guiconfig.inc +++ b/src/usr/local/www/guiconfig.inc @@ -344,6 +344,33 @@ function print_apply_box($msg) { print_info_box($msg, "warning", "apply", gettext("Apply Changes")); } +/* + * Print Bootstrap callout + * + * @param string $msg message to display + * @param string $class contextual class, defaults to info (default | danger | warning | info) + * @param string $heading optional callout heading + */ +function print_callout($msg, $class = 'info', $heading = '') { + + if ('' == $msg) { + return; + } + $class = strtolower($class); + $callout = ''; + + if ($class != 'default' && $class != 'danger' && $class != 'warning' && $class = 'info') { + $class = 'info'; + } + $callout .= '<div class="bs-callout bs-callout-' . $class . '">'; + + if ('' != $heading) { + $callout .= '<h4>' . $heading . '</h4>'; + } + $callout .= $msg . '</div>'; + echo $callout; +} + function get_std_save_message($ok) { $filter_related = false; $filter_pages = array("nat", "filter"); |