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 @@ ...@@ -2,6 +2,9 @@
Taxonomy Display 7.x-1.x, YYYY-MM-DD 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 Issue #1143622 by codycraven, vito_swat: Fixed inability to enable/disable term
page displays when Display Suite is not installed/enabled. page displays when Display Suite is not installed/enabled.
......
...@@ -60,14 +60,10 @@ function taxonomy_display_admin_form(&$form, &$form_state) { ...@@ -60,14 +60,10 @@ function taxonomy_display_admin_form(&$form, &$form_state) {
'#type' => 'fieldset', '#type' => 'fieldset',
); );
$fieldset =& $form['additional_settings']['taxonomy_display']; $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. // 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('term', $fieldset, $form_state, $stored_settings);
_taxonomy_display_admin_form_build_plugin_form('associated', $fieldset, $values, $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 // Add selection for adding taxonomy term core feed to page
$fieldset['add_feed'] = array( $fieldset['add_feed'] = array(
...@@ -121,7 +117,6 @@ function taxonomy_display_admin_form_setup_additional_settings(&$form) { ...@@ -121,7 +117,6 @@ function taxonomy_display_admin_form_setup_additional_settings(&$form) {
* Form submit callback; save Taxonomy Display settings for term pages. * Form submit callback; save Taxonomy Display settings for term pages.
*/ */
function taxonomy_display_admin_form_submit($form, &$form_state) { function taxonomy_display_admin_form_submit($form, &$form_state) {
dpm($form_state);
$values =& $form_state['values']['additional_settings']['taxonomy_display']; $values =& $form_state['values']['additional_settings']['taxonomy_display'];
$td_form =& $form['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) { ...@@ -206,9 +201,8 @@ function taxonomy_display_field_ui_layouts_validate($form, &$form_state) {
* Either term or associated. * Either term or associated.
* @param array $fieldset * @param array $fieldset
* Form array that we will modify. * Form array that we will modify.
* @param array|null $values * @param array|null $form_state
* Array of values submitted to the fieldset, taken from $form_state or null * The form state array.
* if the form has not yet been submitted.
* @param $stored_settings * @param $stored_settings
* Associated array from taxonomy_display_fetch_taxonomy_display(). * Associated array from taxonomy_display_fetch_taxonomy_display().
* *
...@@ -216,7 +210,7 @@ function taxonomy_display_field_ui_layouts_validate($form, &$form_state) { ...@@ -216,7 +210,7 @@ function taxonomy_display_field_ui_layouts_validate($form, &$form_state) {
* *
* @see taxonomy_display_admin_form() * @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 // Set variables needed based on type
switch ($type) { switch ($type) {
case 'associated': case 'associated':
...@@ -231,6 +225,11 @@ function _taxonomy_display_admin_form_build_plugin_form($type, &$fieldset, &$val ...@@ -231,6 +225,11 @@ function _taxonomy_display_admin_form_build_plugin_form($type, &$fieldset, &$val
return; 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. // Populate $options with plugins that are available.
$options = taxonomy_display_plugins($type); $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