You are here

function _hierarchical_select_nojs_helptext in Hierarchical Select 7.3

Same name and namespace in other branches
  1. 5.3 hierarchical_select.module \_hierarchical_select_nojs_helptext()
  2. 6.3 hierarchical_select.module \_hierarchical_select_nojs_helptext()

Helper function that generates the help text is that is displayed to the user when Javascript is disabled.

Parameters

$dropbox_is_enabled: Indicates if the dropbox is enabled or not, the help text will be adjusted depending on this value.

Return value

The generated help text (in HTML).

1 call to _hierarchical_select_nojs_helptext()
_hs_process_render_nojs in ./hierarchical_select.module

File

./hierarchical_select.module, line 1566
This module defines the "hierarchical_select" form element, which is a greatly enhanced way for letting the user select items in a hierarchy.

Code

function _hierarchical_select_nojs_helptext($dropbox_is_enabled) {
  $output = '<noscript>';

  // The options that will be used in the unordered list.
  $items = array(
    t('<span class="highlight">enable Javascript</span> in your browser and then refresh this page, for a much enhanced experience.'),
    t('<span class="highlight">click the <em>Update</em> button</span> every time you want to update the selection'),
  );
  $items[1] .= !$dropbox_is_enabled ? '.' : t(", or when you've checked some checkboxes for entries in the dropbox you'd like to remove.");
  $output .= '<span class="warning">';
  $output .= t("You don't have Javascript enabled.");
  $output .= '</span> ';
  $output .= '<span class="ask-to-hover">';
  $output .= t('Hover for more information!');
  $output .= '</span> ';
  $output .= t("But don't worry: you can still use this web site! You have two options:");
  $output .= theme('item_list', array(
    'items' => $items,
    'title' => NULL,
    'type' => 'ul',
    'attributes' => array(
      'class' => array(
        'solutions',
      ),
    ),
  ));
  $output .= '</noscript>';
  return $output;
}