You are here

function theme_print_mail_form in Printer, email and PDF versions 6

Same name and namespace in other branches
  1. 5.4 print_mail/print_mail.inc \theme_print_mail_form()
  2. 5.3 print_mail/print_mail.inc \theme_print_mail_form()
  3. 7.2 print_mail/print_mail.inc \theme_print_mail_form()
  4. 7 print_mail/print_mail.inc \theme_print_mail_form()
  5. 5.x print_mail/print_mail.inc \theme_print_mail_form()

Theme function for the send by-email form submission.

Adds a class to the form labels. This class is used to place the label on the left of the input fields.

File

print_mail/print_mail.inc, line 182

Code

function theme_print_mail_form($form) {
  drupal_add_css(drupal_get_path('module', 'print') . '/css/printlinks.css');
  $content = '';
  foreach (element_children($form) as $key) {
    $tmp = drupal_render($form[$key]);
    switch ($key) {
      case 'fld_from_addr':
      case 'fld_from_name':
      case 'txt_to_addrs':
      case 'fld_subject':
      case 'fld_title':
        $tmp = str_replace('<label', '<label class ="printmail-label"', $tmp);
        break;
    }
    $content .= $tmp;
  }
  return $content;
}