function fp_render_button

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

13 calls to fp_render_button()
admin_display_degrees_popup_add_group in modules/admin/admin.degrees.inc
admin_display_degrees_popup_add_group2 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.
admin_edit_degree_form in modules/admin/admin.degrees.inc
Meant to replace the old-fashioned display_edit_degree function...
advise_what_if_selection_form in modules/advise/advise.module

... See full list

File

includes/theme.inc, line 1038

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.

  // we want to add on a variable-name-friendly version of the title to extra_class.
  $extra_class .= " fp-render-button-" . fp_get_machine_readable(strtolower($title));

  $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;
}