function theme_domain_locale_form in Domain Locale 7
Form theming.
File
- ./
domain_locale.admin.inc, line 86 - Provides admin functionality for domain specific language settings
Code
function theme_domain_locale_form($variables) {
$form = $variables['form'];
$output = '';
$redirect = t('Check the enabled box to make the language enabled for the registered domain.');
$output .= drupal_render($form['domain_help']);
$output .= '<br /><h3>' . drupal_render($form['domain']) . '</h3>';
// Edit existing records.
$elements = element_children($form['domain_language']);
if (!empty($elements)) {
$header = array(
t('Language'),
t('Langcode'),
t('Enabled'),
t('Weight'),
t('Default'),
);
$rows = array();
foreach ($elements as $element) {
$rows[] = array(
$form['domain_language'][$element]['title']['#value'],
$form['domain_language'][$element]['langcode']['#value'],
drupal_render($form['domain_language'][$element]['enabled']),
drupal_render($form['domain_language'][$element]['weight']),
drupal_render($form['domain_language'][$element]['site_default']),
);
}
$output .= theme('table', array(
'header' => $header,
'rows' => $rows,
));
$output .= '<p><em>' . $redirect . '</em></p>';
}
else {
$output .= '<p>' . t('There are no languages available for this domain.') . '</p>';
}
$output .= drupal_render_children($form);
return $output;
}