function fp_get_js_alert_link
Search API
| 7.x misc.inc | fp_get_js_alert_link($message, $link_text = NULL, $extra_css_class = "") |
| 6.x misc.inc | fp_get_js_alert_link($message, $link_text = "", $extra_css_class = "") |
| 4.x misc.inc | fp_get_js_alert_link($message, $link_text, $extra_css_class = "") |
| 5.x misc.inc | fp_get_js_alert_link($message, $link_text = "", $extra_css_class = "") |
Creates a javascript "alert" link, which tells the user some message with javascript alert().
Similar to the fp_get_js_confirm_link function, but this is a simple alert message, with no user input.
See also
fp_get_js_confirm_link
4 calls to fp_get_js_alert_link()
- admin_display_groups_popup_edit_definition in modules/
admin/ admin.groups.inc - admin_display_main in modules/
admin/ admin.module - This is the "main" page for the admin module. It's what the user first sees when the click to go to the Admin page.
- AdvisingScreen::display_popup_substitute in classes/
AdvisingScreen.php - This is used to display the substitution popup to a user, to let them actually make a substitution.
- fp_render_element in includes/
render.inc - Returns the HTML to render this form (or content) element to the screen. $name is the HTML machine name. $element is an array containing all we need to render it. If you want default values to be taken from the SESSION (because we had form_errors,…
File
- includes/
misc.inc, line 2877 - This file contains misc functions for FlightPath
Code
function fp_get_js_alert_link($message, $link_text = NULL, $extra_css_class = "") {
$rtn = "";
if ($link_text == "" || $link_text == NULL) {
$link_text = "<span class='pop-q-mark'><i class='fa fa-question-circle'></i></span>";
}
$message = str_replace("\n", " ", $message);
$message = fp_reduce_whitespace($message);
$rtn .= "<a href='javascript: fp_alert(\"" . base64_encode($message) . "\",\"base64\");' title='" . t("View help for this item.") . "' class='fp-alert-link $extra_css_class'>$link_text</a>";
return $rtn;
}
