You are here

function theme_legal_display in Legal 7.2

Same name and namespace in other branches
  1. 5 legal.module \theme_legal_display()
  2. 6.8 legal.module \theme_legal_display()
  3. 6.7 legal.module \theme_legal_display()
  4. 7 legal.module \theme_legal_display()
5 theme calls to theme_legal_display()
legal_form_user_profile_form_alter in ./legal.module
Implements hook_form_FORM_ID_alter().
legal_form_user_register_form_alter in ./legal.module
Implements hook_form_FORM_ID_alter().
theme_legal_administration in ./legal.admin.inc
theme_legal_login in ./legal.module
theme_legal_page in ./legal.module

File

./legal.module, line 205
Module file for Legal.

Code

function theme_legal_display($variables) {
  $form = $variables['form'];
  if (!empty($form['legal']['conditions']['#markup'])) {

    // Scroll box (CSS).
    if ($form['display']['#value'] == 1) {
      $path = base_path() . drupal_get_path('module', 'legal');
      drupal_add_css(drupal_get_path('module', 'legal') . '/legal.css');
      $form['legal']['conditions']['#prefix'] = '<div class="legal-terms">';
      $form['legal']['conditions']['#suffix'] = '</div>';
    }
  }
  return $form;
}