You are here

function theme_notifications_forum_user_subscriptions_form in Forum notifications 6

Same name and namespace in other branches
  1. 7 notifications_forum.module \theme_notifications_forum_user_subscriptions_form()

Theme the user forum notifications form.

1 theme call to theme_notifications_forum_user_subscriptions_form()
notifications_forum_user_forum_form in ./notifications_forum.module
User forum notifications form.

File

./notifications_forum.module, line 251

Code

function theme_notifications_forum_user_subscriptions_form($form) {
  $header = array(
    t('Forum'),
    /*
    array(
      'data' => t('Description'),
      'width' => '100%',
    ),
    */
    t('Method'),
    t('Interval'),
  );
  $rows = array();
  foreach (element_children($form) as $key) {
    $element = $form[$key];
    $row = array();
    $row[] = drupal_render($element['subscribe']);
    foreach (array(
      'send_method',
      'send_interval',
    ) as $name) {
      unset($element[$name]['#title']);
      $row[] = drupal_render($element[$name]);
    }
    $rows[] = $row;
  }
  return theme('table', $header, $rows);
}