aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'apps/settings/src/components')
-rw-r--r--apps/settings/src/components/DeclarativeSettings/DeclarativeSection.vue15
-rw-r--r--apps/settings/src/components/GroupListItem.vue6
2 files changed, 16 insertions, 5 deletions
diff --git a/apps/settings/src/components/DeclarativeSettings/DeclarativeSection.vue b/apps/settings/src/components/DeclarativeSettings/DeclarativeSection.vue
index 334739337e1..9ee1680516e 100644
--- a/apps/settings/src/components/DeclarativeSettings/DeclarativeSection.vue
+++ b/apps/settings/src/components/DeclarativeSettings/DeclarativeSection.vue
@@ -119,6 +119,7 @@ import NcSettingsSection from '@nextcloud/vue/components/NcSettingsSection'
import NcInputField from '@nextcloud/vue/components/NcInputField'
import NcSelect from '@nextcloud/vue/components/NcSelect'
import NcCheckboxRadioSwitch from '@nextcloud/vue/components/NcCheckboxRadioSwitch'
+import { confirmPassword } from '@nextcloud/password-confirmation'
export default {
name: 'DeclarativeSection',
@@ -202,9 +203,19 @@ export default {
}
},
- updateDeclarativeSettingsValue(formField, value = null) {
+ async updateDeclarativeSettingsValue(formField, value = null) {
try {
- return axios.post(generateOcsUrl('settings/api/declarative/value'), {
+ let url = generateOcsUrl('settings/api/declarative/value')
+ if (formField?.sensitive === true) {
+ url = generateOcsUrl('settings/api/declarative/value-sensitive')
+ try {
+ await confirmPassword()
+ } catch (err) {
+ showError(t('settings', 'Password confirmation is required'))
+ return
+ }
+ }
+ return axios.post(url, {
app: this.formApp,
formId: this.form.id.replace(this.formApp + '_', ''), // Remove app prefix to send clean form id
fieldId: formField.id,
diff --git a/apps/settings/src/components/GroupListItem.vue b/apps/settings/src/components/GroupListItem.vue
index 65d46136ec1..76088fa74db 100644
--- a/apps/settings/src/components/GroupListItem.vue
+++ b/apps/settings/src/components/GroupListItem.vue
@@ -13,7 +13,7 @@
</h2>
<NcNoteCard type="warning"
show-alert>
- {{ t('settings', 'You are about to remove the group "{group}". The accounts will NOT be deleted.', { group: name }) }}
+ {{ t('settings', 'You are about to delete the group "{group}". The accounts will NOT be deleted.', { group: name }) }}
</NcNoteCard>
<div class="modal__button-row">
<NcButton type="secondary"
@@ -62,7 +62,7 @@
<template #icon>
<Delete :size="20" />
</template>
- {{ t('settings', 'Remove group') }}
+ {{ t('settings', 'Delete group') }}
</NcActionButton>
</template>
</NcAppNavigationItem>
@@ -179,7 +179,7 @@ export default {
await this.$store.dispatch('removeGroup', this.id)
this.showRemoveGroupModal = false
} catch (error) {
- showError(t('settings', 'Failed to remove group "{group}"', { group: this.name }))
+ showError(t('settings', 'Failed to delete group "{group}"', { group: this.name }))
}
},
},