Skip to content

Commit

Permalink
Rename setting 'sendEventRemindersToSharedGroupMembers' -> 'sendEvent…
Browse files Browse the repository at this point in the history
…RemindersToSharedUsers'.

Signed-off-by: Daniel Teichmann <daniel.teichmann@das-netzwerkteam.de>
  • Loading branch information
dzatoah committed Mar 23, 2022
1 parent 0fa17f8 commit cc8efc8
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion apps/dav/lib/CalDAV/Reminder/ReminderService.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public function processReminders():void {
continue;
}

if ($this->config->getAppValue('dav', 'sendEventRemindersToSharedGroupMembers', 'yes') === 'no') {
if ($this->config->getAppValue('dav', 'sendEventRemindersToSharedUsers', 'yes') === 'no') {
$users = $this->getAllUsersWithWriteAccessToCalendar($reminder['calendar_id']);
} else {
$users = [];
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/Settings/CalDAVSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class CalDAVSettings implements IDelegatedSettings {
'sendInvitations' => 'yes',
'generateBirthdayCalendar' => 'yes',
'sendEventReminders' => 'yes',
'sendEventRemindersToSharedGroupMembers' => 'yes',
'sendEventRemindersToSharedUsers' => 'yes',
'sendEventRemindersPush' => 'no',
];

Expand Down
4 changes: 2 additions & 2 deletions apps/dav/src/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ const CalDavSettingsView = new View({
'generateBirthdayCalendar'
),
sendEventReminders: loadState('dav', 'sendEventReminders'),
sendEventRemindersToSharedGroupMembers: loadState(
sendEventRemindersToSharedUsers: loadState(
'dav',
'sendEventRemindersToSharedGroupMembers'
'sendEventRemindersToSharedUsers'
),
sendEventRemindersPush: loadState('dav', 'sendEventRemindersPush'),
}
Expand Down
10 changes: 5 additions & 5 deletions apps/dav/src/views/CalDavSettings.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('CalDavSettings', () => {
sendInvitations: true,
generateBirthdayCalendar: true,
sendEventReminders: true,
sendEventRemindersToSharedGroupMembers: true,
sendEventRemindersToSharedUsers: true,
sendEventRemindersPush: true,
}
},
Expand All @@ -67,10 +67,10 @@ describe('CalDavSettings', () => {
'Send notifications for events'
)
expect(sendEventReminders).toBeChecked()
const sendEventRemindersToSharedGroupMembers = TLUtils.getByLabelText(
const sendEventRemindersToSharedUsers = TLUtils.getByLabelText(
'Send reminder notifications to calendar sharees as well'
)
expect(sendEventRemindersToSharedGroupMembers).toBeChecked()
expect(sendEventRemindersToSharedUsers).toBeChecked()
const sendEventRemindersPush = TLUtils.getByLabelText(
'Enable notifications for events via push'
)
Expand Down Expand Up @@ -113,7 +113,7 @@ describe('CalDavSettings', () => {
'no'
)

expect(sendEventRemindersToSharedGroupMembers).toBeDisabled()
expect(sendEventRemindersToSharedUsers).toBeDisabled()
expect(sendEventRemindersPush).toBeDisabled()

OCP.AppConfig.setValue.mockClear()
Expand All @@ -125,7 +125,7 @@ describe('CalDavSettings', () => {
'yes'
)

expect(sendEventRemindersToSharedGroupMembers).toBeEnabled()
expect(sendEventRemindersToSharedUsers).toBeEnabled()
expect(sendEventRemindersPush).toBeEnabled()
})
})
10 changes: 5 additions & 5 deletions apps/dav/src/views/CalDavSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@
</em>
</p>
<p class="indented">
<input id="caldavSendEventRemindersToSharedGroupMembers"
v-model="sendEventRemindersToSharedGroupMembers"
<input id="caldavSendEventRemindersToSharedUsers"
v-model="sendEventRemindersToSharedUsers"
type="checkbox"
class="checkbox"
:disabled="!sendEventReminders">
<label for="caldavSendEventRemindersToSharedGroupMembers">
<label for="caldavSendEventRemindersToSharedUsers">
{{ $t('dav', 'Send reminder notifications to calendar sharees as well' ) }}
</label>
<br>
Expand Down Expand Up @@ -138,10 +138,10 @@ export default {
sendEventReminders(value) {
OCP.AppConfig.setValue('dav', 'sendEventReminders', value ? 'yes' : 'no')
},
sendEventRemindersToSharedGroupMembers(value) {
sendEventRemindersToSharedUsers(value) {
OCP.AppConfig.setValue(
'dav',
'sendEventRemindersToSharedGroupMembers',
'sendEventRemindersToSharedUsers',
value ? 'yes' : 'no'
)
},
Expand Down
4 changes: 2 additions & 2 deletions apps/dav/src/views/__snapshots__/CalDavSettings.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ exports[`CalDavSettings interactions 1`] = `
>
<input
class="checkbox"
id="caldavSendEventRemindersToSharedGroupMembers"
id="caldavSendEventRemindersToSharedUsers"
type="checkbox"
/>
<label
for="caldavSendEventRemindersToSharedGroupMembers"
for="caldavSendEventRemindersToSharedUsers"
>
Send reminder notifications to calendar sharees as well
Expand Down
4 changes: 2 additions & 2 deletions apps/dav/tests/unit/Settings/CalDAVSettingsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function testGetForm() {
['dav', 'sendInvitations', 'yes'],
['dav', 'generateBirthdayCalendar', 'yes'],
['dav', 'sendEventReminders', 'yes'],
['dav', 'sendEventRemindersToSharedGroupMembers', 'yes'],
['dav', 'sendEventRemindersToSharedUsers', 'yes'],
['dav', 'sendEventRemindersPush', 'no'],
)
->will($this->onConsecutiveCalls('yes', 'no', 'yes', 'yes', 'yes'));
Expand All @@ -77,7 +77,7 @@ public function testGetForm() {
['sendInvitations', true],
['generateBirthdayCalendar', false],
['sendEventReminders', true],
['sendEventRemindersToSharedGroupMembers', true],
['sendEventRemindersToSharedUsers', true],
['sendEventRemindersPush', true],
);
$result = $this->settings->getForm();
Expand Down

0 comments on commit cc8efc8

Please sign in to comment.