All pastes #444250 Raw Edit

Anonymous

public php v1 · immutable
·published 2007-04-17 08:45 UTC
rendered paste body
function theme_taxonomy_alternative_overview($data) {  $rows = array();  $options = array('1' => t('Enabled'), '0' => t('Disabled'));  $form['access'] = array(    '#type' => 'fieldset',    '#title' => t('Access log settings'),    '#tree' => TRUE,  );  $form['access']['log'] = array(    '#type' => 'radios',    '#title' => t('Log'),    '#default_value' =>  variable_get('log', 0),    '#options' => $options,    '#description' => t('The log.'),  );  $period = drupal_map_assoc(array(3600, 10800, 21600, 32400, 43200, 86400, 172800, 259200, 604800, 1209600, 2419200, 4838400, 9676800), 'format_interval');  $form['access']['timer'] = array(    '#type' => 'select',    '#title' => t('Discard logs older than'),    '#default_value' => variable_get('timer', 259200),    '#options' => $period,    '#description' => t('The timer.'),  );  // Description  $form['details'] = array(    '#type' => 'fieldset',    '#title' => t('Details'),    '#collapsible' => TRUE,    '#collapsed' => TRUE,  );  $form['details']['description'] = array(    '#type' => 'textarea',    '#title' => t('Describe it'),    '#default_value' =>  variable_get('description', ''),    '#cols' => 60,    '#rows' => 5,    '#description' => t('Log description.'),  );  $form['details']['admin'] = array(    '#type' => 'checkbox',    '#title' => t('Only admin can view'),    '#default_value' => variable_get('admin', 0),  );  $form['name'] = array(    '#type' => 'textfield',    '#title' => t('Name'),    '#size' => 30,    '#maxlength' => 64,    '#description' => t('Enter the name for this group of settings'),  );  $form['hidden'] = array('#type' => 'value', '#value' => 'is_it_here');  $form['submit'] = array('#type' => 'submit', '#value' => t('Save'));    //$data = drupal_get_form('_print_taxonomy_alternative_overview_form', $form);  return drupal_get_form('theme_test_form', $form, 'theme_test_form'); }function theme_test_form($form) {    $output = '';  $output .= drupal_render($form['name']);  $output .= '<div class="foo">';  $output .= drupal_render($form['access']);  $output .= '<div class="bar">';  $output .= drupal_render($form['details']);  $output .= '</div></div>';  $output .= drupal_render($form);    return $output;}