Skip to content

Commit

Permalink
fixup! feat(settings): Migrate admin settings to vue
Browse files Browse the repository at this point in the history
  • Loading branch information
nickvergessen committed May 17, 2023
1 parent 2f10f0a commit 4c61b5d
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/AdminSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@

<template>
<NcSettingsSection :title="t('announcementcenter', 'Announcements')">
<NcSettingsSelectGroup label="ABD"
:value="adminGroups"
:hint="t('announcementcenter', 'These groups will be able to post announcements.')">
ABC
</NcSettingsSelectGroup>
<NcSettingsSelectGroup v-model="adminGroups"
:label="t('announcementcenter', 'These groups will be able to post announcements.')"
@input="updateGroups" />

<NcCheckboxRadioSwitch :checked="createActivities"
type="switch"
Expand Down Expand Up @@ -121,6 +119,16 @@ export default {
},
})
},
async updateGroups(config) {
OCP.AppConfig.setValue('announcementcenter', 'admin_groups', JSON.stringify(config), {
success() {
showSuccess(t('announcementcenter', 'Setting changed'))
},
error() {
showError(t('announcementcenter', 'An error occurred while changing the setting'))
},
})
},
},
}
</script>
Expand Down

0 comments on commit 4c61b5d

Please sign in to comment.