function theme_print_mail_form in Printer, email and PDF versions 7
Same name and namespace in other branches
- 5.4 print_mail/print_mail.inc \theme_print_mail_form()
- 5.3 print_mail/print_mail.inc \theme_print_mail_form()
- 6 print_mail/print_mail.inc \theme_print_mail_form()
- 7.2 print_mail/print_mail.inc \theme_print_mail_form()
- 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 186
Code
function theme_print_mail_form($variables) {
$form = $variables['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;
}