function fp_render_button
Search API
6.x theme.inc | fp_render_button($title, $on_click, $extra_class = "") |
4.x theme.inc | fp_render_button($title, $on_click, $bool_padd = true, $style = "", $extra_class = "") |
5.x theme.inc | fp_render_button($title, $on_click, $bool_padd = true, $style = "", $extra_class = "") |
Returns the HTML to draw a pretty button.
Parameters
string $title:
string $on_click:
bool $bool_padd:
string $style:
Return value
string
10 calls to fp_render_button()
- admin_display_degrees_popup_add_group in modules/
admin/ admin.degrees.inc - admin_display_edit_degree in modules/
admin/ admin.degrees.inc - This screen displays the form which allows the user to actually edit a degree.
- advise_display_what_if_selection in modules/
advise/ advise.module - Displays the pulldown select list for picking a new What If degree. Returns HTML.
- comments_display_main in modules/
comments/ comments.module - This displays the primary Comments tab, where we see past comments and can enter a new one (with the right permissions).
- fp_render_sub_tab_array in includes/
theme.inc - Similar to render_tab_array.
File
- includes/
theme.inc, line 836
Code
function fp_render_button($title, $on_click, $bool_padd = true, $style = "", $extra_class = "")
{
// Style is expected to look like:
// style='some:thing;'
// with SINGLE apostrophes! not quotes.
$on_mouse = "onmouseover='this.className=\"gradbutton gradbutton_hover hand $extra_class\";'
onmouseout='this.className=\"gradbutton hand $extra_class\";'
onmousedown='this.className=\"gradbutton gradbutton_down hand $extra_class\";'
onmouseup='this.className=\"gradbutton gradbutton_hover hand $extra_class\";'
";
if (fp_screen_is_mobile()) {
$on_mouse = ""; // Causes problems for some mobile devices.
}
if ($bool_padd) {
$padd = " ";
}
$rtn = "<span class='gradbutton hand $extra_class' onClick='$on_click' $on_mouse $style >
$padd $title $padd
</span>
";
return $rtn;
}