Commit 82fb5682 authored by Cody Craven's avatar Cody Craven
Browse files

Issue #1143628 by codycraven, vito_swat: Fixed values failing to be provided...

Issue #1143628 by codycraven, vito_swat: Fixed  values failing to be provided to TaxonomyDisplayHandlerForm::formFieldset() implementations when Ajax is being used in the implementation.
parent ada985b3
......@@ -2,6 +2,9 @@
Taxonomy Display 7.x-1.x, YYYY-MM-DD
------------------------------------
Issue #1143628 by codycraven, vito_swat: Fixed $form_state values failing to be
provided to TaxonomyDisplayHandlerForm::formFieldset() implementations when
Ajax is being used in the implementation.
Issue #1143622 by codycraven, vito_swat: Fixed inability to enable/disable term
page displays when Display Suite is not installed/enabled.
......
......@@ -60,14 +60,10 @@ function taxonomy_display_admin_form(&$form, &$form_state) {
'#type' => 'fieldset',
);
$fieldset =& $form['additional_settings']['taxonomy_display'];
$values = NULL;
if (isset($form_state['values']['additional_settings']['taxonomy_display'])) {
$values =& $form_state['values']['additional_settings']['taxonomy_display'];
}
// Build the plugin forms for term and associated content display.
_taxonomy_display_admin_form_build_plugin_form('term', $fieldset, $values, $stored_settings);
_taxonomy_display_admin_form_build_plugin_form('associated', $fieldset, $values, $stored_settings);
_taxonomy_display_admin_form_build_plugin_form('term', $fieldset, $form_state, $stored_settings);
_taxonomy_display_admin_form_build_plugin_form('associated', $fieldset, $form_state, $stored_settings);
// Add selection for adding taxonomy term core feed to page
$fieldset['add_feed'] = array(
......@@ -121,7 +117,6 @@ function taxonomy_display_admin_form_setup_additional_settings(&$form) {
* Form submit callback; save Taxonomy Display settings for term pages.
*/
function taxonomy_display_admin_form_submit($form, &$form_state) {
dpm($form_state);
$values =& $form_state['values']['additional_settings']['taxonomy_display'];
$td_form =& $form['additional_settings']['taxonomy_display'];
......@@ -206,9 +201,8 @@ function taxonomy_display_field_ui_layouts_validate($form, &$form_state) {
* Either term or associated.
* @param array $fieldset
* Form array that we will modify.
* @param array|null $values
* Array of values submitted to the fieldset, taken from $form_state or null
* if the form has not yet been submitted.
* @param array|null $form_state
* The form state array.
* @param $stored_settings
* Associated array from taxonomy_display_fetch_taxonomy_display().
*
......@@ -216,7 +210,7 @@ function taxonomy_display_field_ui_layouts_validate($form, &$form_state) {
*
* @see taxonomy_display_admin_form()
*/
function _taxonomy_display_admin_form_build_plugin_form($type, &$fieldset, &$values, $stored_settings) {
function _taxonomy_display_admin_form_build_plugin_form($type, &$fieldset, &$form_state, $stored_settings) {
// Set variables needed based on type
switch ($type) {
case 'associated':
......@@ -231,6 +225,11 @@ function _taxonomy_display_admin_form_build_plugin_form($type, &$fieldset, &$val
return;
}
$values = NULL;
if (isset($form_state['values']['additional_settings']['taxonomy_display'])) {
$values =& $form_state['values']['additional_settings']['taxonomy_display'];
}
// Populate $options with plugins that are available.
$options = taxonomy_display_plugins($type);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment