diff --git a/README.txt b/README.txt index 2061e17..d5b5e95 100644 --- a/README.txt +++ b/README.txt @@ -68,4 +68,4 @@ LIMITATIONS URL. When loaded on the same page, there will be a conflict. The way to resolve this issue is use one Cloud Player Library URL (the default defined on the General Settings page at /admin/config/media/jw_player/settings), and - set each preset used on the page to have Drupal-defined settings. \ No newline at end of file + set each preset used on the page to have Drupal-defined settings. diff --git a/config/install/jw_player.settings.yml b/config/install/jw_player.settings.yml index 3f07c94..fe3fef8 100644 --- a/config/install/jw_player.settings.yml +++ b/config/install/jw_player.settings.yml @@ -1,3 +1,3 @@ jw_player_key: null jw_player_version: 6 -jw_player_hosting: cloud \ No newline at end of file +jw_player_hosting: cloud diff --git a/src/Element/JwPlayer.php b/src/Element/JwPlayer.php index aad2cf7..fb9fd5d 100644 --- a/src/Element/JwPlayer.php +++ b/src/Element/JwPlayer.php @@ -113,11 +113,18 @@ class JwPlayer extends RenderElement { // Unset sharing if it is not set. if (isset($settings['sharing']) && $settings['sharing']) { unset($settings['sharing']); + $settings['sharing']['sites'] = []; foreach($settings['sharing_sites']['sites'] as $key => $value) { if ($value['enabled'] == 1) { $settings['sharing']['sites'][] = $key; } } + // If none selected, all selected. + if (!$settings['sharing']['sites']) { + foreach($settings['sharing_sites']['sites'] as $key => $value) { + $settings['sharing']['sites'][] = $key; + } + } $settings['sharing']['heading'] = $settings['sharing_heading']; } unset($settings['sharing_sites']); diff --git a/src/Form/JwplayerPresetAdd.php b/src/Form/JwplayerPresetAdd.php index 6fbb0f1..a71a4cb 100644 --- a/src/Form/JwplayerPresetAdd.php +++ b/src/Form/JwplayerPresetAdd.php @@ -1,8 +1,4 @@ 'table', '#header' => [t('Label'), t('Weight')], '#empty' => t('There are no items yet. Add an item.'), + '#suffix' => '