function theme_print_mail_form in Printer, email and PDF versions 7.2
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 print_mail/print_mail.inc \theme_print_mail_form()
- 5.x print_mail/print_mail.inc \theme_print_mail_form()
Returns HTML for the send by-email form.
Adds a class to the form labels. This class is used to place the label on the left of the input fields.
Parameters
array $variables: Theme variables including the form.
Return value
string Send by-email form HTML.
See also
Related topics
File
- print_mail/
print_mail.inc, line 252 - Displays and processes the mail send form.
Code
function theme_print_mail_form($variables) {
$form = $variables['form'];
drupal_add_css(drupal_get_path('module', 'print_mail') . '/css/print_mail.theme.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':
case 'fld_subject':
case 'fld_title':
$tmp = str_replace('<label', '<label class ="printmail-label"', $tmp);
break;
}
$content .= $tmp;
}
return $content;
}