Skip to content

Commit

Permalink
Merge pull request #1019 from nextcloud/add/reset-signatories
Browse files Browse the repository at this point in the history
feat: improve save terms and reset signaturies actions
  • Loading branch information
nickvergessen authored Nov 27, 2024
2 parents eba9e52 + 8cce71d commit b30538d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
4 changes: 2 additions & 2 deletions js/terms_of_service-admin.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/terms_of_service-admin.js.map

Large diffs are not rendered by default.

26 changes: 21 additions & 5 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
:checked.sync="showOnPublicShares">
{{ t('terms_of_service', 'Show on public shares') }}
</NcCheckboxRadioSwitch>

<p class="edit-form">
{{ t('terms_of_service', 'Enter or update terms of service below.. ') }}
</p>
<span class="form">
<NcSelect v-model="country"
:options="countryOptions"
Expand All @@ -39,7 +41,9 @@
<p class="settings-hint">
{{ t('terms_of_service', 'For formatting purposes Markdown is supported.') }}
</p>

<p class="terms-descr">
{{ t('terms_of_service', 'Saving the terms will update the text but will not send a notification to users. Notifications are only sent if you reset the signatories.') }}
</p>
<NcButton :disabled="saveButtonDisabled"
@click="onSubmit">
{{ saveButtonText }}
Expand All @@ -48,6 +52,9 @@

<NcSettingsSection v-if="hasTerms"
:name="t('terms_of_service', 'Existing terms of service')">
<p class="terms-descr">
{{ t('terms_of_service', 'We recommend to reset signatures if legal changes were applied. For minor changes like fixing typos or correcting links, it could be left out, as it would otherwise require all users to accept the Terms of Service again.') }}
</p>
<NcButton :disabled="resetButtonDisabled"
type="error"
@click="onResetSignatories">
Expand Down Expand Up @@ -137,7 +144,7 @@ export default {

mounted() {
this.saveButtonText = t('terms_of_service', 'Loading …')
this.resetButtonText = t('terms_of_service', 'Reset all signatories')
this.resetButtonText = t('terms_of_service', 'Reset signatories & notify users')
axios
.get(generateOcsUrl('/apps/terms_of_service/terms/admin'))
.then(response => {
Expand All @@ -162,7 +169,7 @@ export default {
})
})

this.saveButtonText = t('terms_of_service', 'Save')
this.saveButtonText = t('terms_of_service', 'Save terms')
this.$nextTick(() => {
this.saveButtonDisabled = false
})
Expand Down Expand Up @@ -213,8 +220,13 @@ export default {
display: block;
}

.form {
.edit-form {
margin-top: 30px;
opacity: .7;
}

.form {
margin-top: 10px;
display: block;
}

Expand All @@ -229,4 +241,8 @@ label span {
vertical-align: top;
}

.terms-descr {
opacity: .7;
margin-bottom: 10px;
}
</style>

0 comments on commit b30538d

Please sign in to comment.