fix: sharing groups dropdown not showing when adding a feed with distribution set to sharing group.

pull/7815/head^2
Luciano Righetti 2021-10-08 10:32:48 +02:00
parent 7553b49784
commit 4df55d99c8
2 changed files with 9 additions and 1 deletions

View File

@ -140,6 +140,13 @@ echo $this->element('genericElements/Form/genericForm', [
'selected' => isset($entity['Feed']['distribution']) ? $entity['Feed']['distribution'] : 3,
'type' => 'dropdown'
],
[
'field' => 'sharing_group_id',
'label' => __('Sharing Group'),
'div' => ['id' => 'SGContainer', 'style' => 'display:none', 'class' => 'optionalField'],
'options' => $dropdownData['sharingGroups'],
'type' => 'dropdown'
],
[
'field' => 'tag_id',
'label' => __('Default Tag'),
@ -174,7 +181,7 @@ if (!$ajax) {
<script type="text/javascript">
$(document).ready(function() {
feedFormUpdate();
$("#FeedSourceFormat, #FeedFixedEvent, #FeedInputSource").change(function() {
$("#FeedSourceFormat, #FeedFixedEvent, #FeedInputSource, #FeedDistribution").change(function() {
feedFormUpdate();
});
});

View File

@ -4043,6 +4043,7 @@ function feedFormUpdate() {
$('#DeleteLocalFileDiv').hide();
$('#HeadersDiv').show();
}
feedDistributionChange();
}
function setContextFields() {