Skip to content

Commit

Permalink
Merge pull request #35399 from nextcloud/fix/sharepi-admin
Browse files Browse the repository at this point in the history
Fix share admin page
  • Loading branch information
szaimen authored Nov 24, 2022
2 parents e00740e + 99c4030 commit c11803e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions apps/settings/src/admin.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
window.addEventListener('DOMContentLoaded', () => {
$('#excludedGroups,#linksExcludedGroups,#passwordsExcludedGroups').each(function(index, element) {
OC.Settings.setupGroupsSelect($(element))
$(element).change((ev) => {
$(element).change(function(ev) {
let groups = ev.val || []
groups = JSON.stringify(groups)
OCP.AppConfig.setValue('core', $(this).attr('name'), groups)
})
})

$('#loglevel').change(() => {
$('#loglevel').change(function() {
$.post(OC.generateUrl('/settings/admin/log/level'), { level: $(this).val() }, () => {
OC.Log.reload()
})
})

$('#shareAPIEnabled').change(() => {
$('#shareAPIEnabled').change(function() {
$('#shareAPI p:not(#enable)').toggleClass('hidden', !this.checked)
})

Expand Down Expand Up @@ -206,11 +206,11 @@ window.addEventListener('DOMContentLoaded', () => {
})
})

$('#allowGroupSharing').change(() => {
$('#allowGroupSharing').change(function() {
$('#allowGroupSharing').toggleClass('hidden', !this.checked)
})

$('#shareapiExcludeGroups').change(() => {
$('#shareapiExcludeGroups').change(function() {
$('#selectExcludedGroups').toggleClass('hidden', !this.checked)
})

Expand Down
4 changes: 2 additions & 2 deletions dist/settings-legacy-admin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c11803e

Please sign in to comment.