openscholar/openscholar — pull request #4039 by baisong (2013-10-04 16:51:46+00:00)
Title: add logic to override settings for hwpi themes #3848

#### Changes

##### 1. Logic

* In the logic that controls adding breadcrumbs, now it always shows breadcrumbs on HWPI themes.
* In the CP > Settings form, the setting is disabled and displayed as "Show breadcrumbs" for HWPI theme sites.

##### 2. Settings UI

* The setting is now a checkbox (not a 2-option radio)
* There is now description text with a demonstration Breadcrumb trail (see screenshot below)
* When the setting is disabled for HWPI themes, a description appears saying the option is not allowed in accordance with accessibility standards.

##### 3. Under the hood

* Added an optional param to API function `_is_hwpi_theme()` to enable determining the vsite theme from the CP settings form.
* Renamed the PHP variable name (but not the drupal variable name) to match the logic (previously, `$show_breadcrumbs == 1` meant "do not show breadcrumbs". Now, the PHP variable is named `$hide_breadcrumbs` instead)
* Added a class to make the disabled checkbox appear disabled `.checkbox-disabled`.