function theme_field__redhen_fields_email_formatter in RedHen CRM 7
Theme function for redhen_email field formatter.
File
- modules/
redhen_fields/ redhen_fields.module, line 716 - Defines email, phone and address field types for RedHen CRM.
Code
function theme_field__redhen_fields_email_formatter($variables) {
$output = '';
// Render the label, if it's not hidden.
if (!$variables['label_hidden']) {
$output .= '<div class="field-label"' . $variables['title_attributes'] . '>' . $variables['label'] . ': </div>';
}
$output .= '<div class="legend"><div class="email-address">' . t('Address') . '</div>';
$output .= '<div class="email-label">' . t('Label') . '</div>';
$output .= '<div class="bulk-label">' . t('Bulk mailings?') . '</div>';
$output .= '<div class="hold-label">' . t('On hold?') . '</div>';
$output .= '<div class="primary-label">' . t('Primary') . '</div></div>';
// Render the items.
$output .= '<div class="field-items"' . $variables['content_attributes'] . '>';
foreach ($variables['items'] as $delta => $item) {
$classes = 'field-item ' . ($delta % 2 ? 'odd' : 'even');
$output .= '<div class="' . $classes . '"' . $variables['item_attributes'][$delta] . '>' . drupal_render($item) . '</div>';
}
$output .= '</div>';
// Render the top-level DIV.
$output = '<div class="' . $variables['classes'] . '"' . $variables['attributes'] . '>' . $output . '</div>';
return $output;
}