Patch #1552984 by Niklas Fiekas: Added Make 'File displayed by default' depend on 'Enable display field' with #states.

8.0.x
Dries 2012-05-16 21:12:19 -04:00
parent 747e01ca53
commit 39195776b1
1 changed files with 5 additions and 0 deletions

View File

@ -50,6 +50,11 @@ function file_field_settings_form($field, $instance, $has_data) {
'#title' => t('Files displayed by default'),
'#default_value' => $settings['display_default'],
'#description' => t('This setting only has an effect if the display option is enabled.'),
'#states' => array(
'visible' => array(
':input[name="field[settings][display_field]"]' => array('checked' => TRUE),
),
),
);
$scheme_options = array();