Last active
August 29, 2015 14:21
-
-
Save robcolburn/139421e81ce1d85b379e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/docroot/profiles/publisher/modules/custom/pub_mpx/pub_mpx.module b/docroot/profiles/publisher/modules/custom/pub_mpx/pub_mpx.module | |
index 6b5441b..d973eda 100644 | |
--- a/docroot/profiles/publisher/modules/custom/pub_mpx/pub_mpx.module | |
+++ b/docroot/profiles/publisher/modules/custom/pub_mpx/pub_mpx.module | |
@@ -1957,7 +1957,7 @@ function pub_mpx_date_combo_process_alter(&$element, &$form_state, $context) { | |
if (!$mpx_value_overrides_enabled) { | |
- $element['#disabled'] = TRUE; | |
+ // $element['#disabled'] = TRUE; | |
$element['#suffix'] = PUB_MPX_DISABLED_MPX_FIELD_MESSAGE_MARKUP . $element_suffix; | |
} | |
else { | |
@@ -2019,7 +2019,7 @@ function _pub_mpx_append_overridden_mpx_field_message(&$field) { | |
// Altering the #description element isn't working for all field types. | |
// Try to do it properly for the fields it does work with, and use a | |
// fallback method for displaying the message for fields that it doesn't. | |
- $field['#disabled'] = FALSE; | |
+ // $field['#disabled'] = FALSE; | |
// Multiple textfields. | |
if ($form_field_type == 'textfield' && $form_field_children_count > 1) { | |
$form_field_description = isset($field['#description']) ? $field['#description'] : ''; | |
@@ -2144,7 +2144,7 @@ function _pub_mpx_form_file_entity_process_callback($form, $form_state) { | |
if (!in_array($form_field_name, $default_mpx_field_map) && | |
!empty($field_instance_info['widget']['settings']['pub_mpx']['media_data_fieldpath'])) { | |
- $form_field['#disabled'] = TRUE; | |
+ // $form_field['#disabled'] = TRUE; | |
_pub_mpx_append_disabled_mpx_field_message($form_field); | |
} | |
// Handle default mpx fields. | |
@@ -2162,7 +2162,7 @@ function _pub_mpx_form_file_entity_process_callback($form, $form_state) { | |
// Disable fields by default if mpx default field overrides are disabled. | |
if (!$mpx_value_overrides_enabled || !in_array($form_field_name, $mpx_value_overridable_fields, TRUE)) { | |
- $form_field['#disabled'] = TRUE; | |
+ // $form_field['#disabled'] = TRUE; | |
_pub_mpx_append_disabled_mpx_field_message($form_field); | |
$form[$form_field_name]['#weight'] = ++$field_weight_counter; | |
} | |
@@ -2240,18 +2240,18 @@ function _pub_mpx_form_file_entity_process_callback($form, $form_state) { | |
else { | |
$form_field['#value'] = FALSE; | |
} | |
- $form_field['#disabled'] = (bool) !$field_is_overridden; | |
+ // $form_field['#disabled'] = (bool) !$field_is_overridden; | |
} | |
// #states aren't working when the AJAX content is injected. Set | |
// the #disabled property on each element as a fallback if this is | |
// rebuilding the property values. | |
- if ($form_state['values'][$mpx_override_checkbox_name] == 0) { | |
- foreach ($form_field_children as $key) { | |
- isset($form_field[$key]['value']) ? ($form_field[$key]['value']['#disabled'] = TRUE) : | |
- ($form_field[$key]['#disabled'] = TRUE); | |
- } | |
- } | |
+ // if ($form_state['values'][$mpx_override_checkbox_name] == 0) { | |
+ // foreach ($form_field_children as $key) { | |
+ // isset($form_field[$key]['value']) ? ($form_field[$key]['value']['#disabled'] = TRUE) : | |
+ // ($form_field[$key]['#disabled'] = TRUE); | |
+ // } | |
+ // } | |
} | |
// Ensure $field_is_overridden is set correctly for *_add_more Ajax | |
// responses. | |
diff --git a/docroot/sites/nbcunbc/modules/custom/features/nbc_mpx/nbc_mpx.module b/docroot/sites/nbcunbc/modules/custom/features/nbc_mpx/nbc_mpx.module | |
index 6a4b49d..8ce9061 100644 | |
--- a/docroot/sites/nbcunbc/modules/custom/features/nbc_mpx/nbc_mpx.module | |
+++ b/docroot/sites/nbcunbc/modules/custom/features/nbc_mpx/nbc_mpx.module | |
@@ -1327,13 +1327,3 @@ function nbc_mpx_gigya_sharebar_alter(&$share_settings) { | |
); | |
} | |
} | |
- | |
-/** | |
- * Implements hook_form_FORM_ID_alter(). | |
- */ | |
-function nbc_mpx_form_file_entity_edit_alter(&$form, &$form_state, $form_id) { | |
- if ($form['#entity']->filemime != 'video/mpx' || empty($form[VideoInterface::FIELD_WINDOW_NBC])) { | |
- return; | |
- } | |
- $form[VideoInterface::FIELD_WINDOW_NBC]['#disabled'] = TRUE; | |
-} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment