You are here

function theme_insert_field_widget_settings_styles in Insert 7

Same name and namespace in other branches
  1. 6 insert.module \theme_insert_field_widget_settings_styles()

Theme the output of the styles list on the settings form.

1 theme call to theme_insert_field_widget_settings_styles()
insert_field_widget_settings_form in ./insert.module
Configuration form for editing insert settings for a field instance.

File

./insert.module, line 461
Allows insertion of files, images, and other media directly into the body field by using an "Insert" button next to the uploaded file.

Code

function theme_insert_field_widget_settings_styles($variables) {
  $element = $variables['element'];
  drupal_add_js('misc/tableselect.js');
  $header = array(
    array(
      'class' => array(
        'select-all',
      ),
      'data' => ' ' . t('Select all'),
    ),
  );
  $rows = array();
  foreach ($element['#options'] as $key => $label) {
    $row = array();
    $row[] = drupal_render($element[$key]);
    $rows[] = $row;
  }
  return theme('table', array(
    'header' => $header,
    'rows' => $rows,
  ));
}