Commits (4)
{ {
"name": "@coscine/login", "name": "@coscine/login",
"version": "1.6.0", "version": "1.7.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
......
{ {
"name": "@coscine/login", "name": "@coscine/login",
"version": "1.8.0", "version": "1.8.1",
"private": true, "private": true,
"directories": { "directories": {
"doc": "docs" "doc": "docs"
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<p class="card-text">{{ $t('ppBodyStart') }}<a href="https://git.rwth-aachen.de/coscine/terms/-/blob/master/PrivacyPolicy.md">Link</a>{{ $t('ppBodyEnd') }}</p> <p class="card-text">{{ $t('ppBodyStart') }}<a href="https://git.rwth-aachen.de/coscine/terms/-/blob/master/PrivacyPolicy.md">Link</a>{{ $t('ppBodyEnd') }}</p>
<b-form-checkbox id="checkboxPP" v-model="checkedPP">{{ $t('ppBodyCheckBox') }}</b-form-checkbox> <b-form-checkbox id="checkboxPP" v-model="checkedPP">{{ $t('ppBodyCheckBox') }}</b-form-checkbox>
<button <button
class="btn btn-secondary w-100" class="btn btn-primary w-100"
name="tosppContinue" name="tosppContinue"
@click.prevent="accept()" @click.prevent="accept()"
:disabled="!checkedTOS || !checkedPP" :disabled="!checkedTOS || !checkedPP"
...@@ -40,12 +40,14 @@ export default Vue.extend({ ...@@ -40,12 +40,14 @@ export default Vue.extend({
}, },
methods: { methods: {
accept() { accept() {
if (this.checkedTOS && this.checkedPP) {
TOSApi.acceptCurrentTOSVersion(this.getJWT(), (response: any) => { TOSApi.acceptCurrentTOSVersion(this.getJWT(), (response: any) => {
location.href = this.tosReturnUrl; location.href = this.tosReturnUrl;
}); });
}
}, },
cancel() { cancel() {
location.href = 'https://www.rwth-aachen.de/'; window.location.href = '/coscine/api/Coscine.Api.STS/account/logout';
}, },
getJWT() { getJWT() {
const urlParams = new URLSearchParams(window.location.search); const urlParams = new URLSearchParams(window.location.search);
......