Skip to content
Snippets Groups Projects
Commit 473a44cd authored by Hanna Führ's avatar Hanna Führ
Browse files

Update: Adding ToS checkbox for gitlab (coscine/issues#2278)

parent 697cc280
No related branches found
No related tags found
2 merge requests!143Release: Sprint/2022 22 :robot:,!140Update: Adding ToS checkbox for gitlab
...@@ -237,7 +237,8 @@ export default defineComponent({ ...@@ -237,7 +237,8 @@ export default defineComponent({
this.resource.resourceTypeOption["RepoUrl"] && this.resource.resourceTypeOption["RepoUrl"] &&
this.resource.resourceTypeOption["AccessToken"] && this.resource.resourceTypeOption["AccessToken"] &&
this.resource.resourceTypeOption["ProjectId"] && this.resource.resourceTypeOption["ProjectId"] &&
this.resource.resourceTypeOption["Branch"] this.resource.resourceTypeOption["Branch"] &&
this.resource.resourceTypeOption["TosAccepted"]
); );
} }
// Evaluate resource type specific - Linked Data // Evaluate resource type specific - Linked Data
......
...@@ -142,6 +142,17 @@ ...@@ -142,6 +142,17 @@
</span> </span>
</multiselect> </multiselect>
</CoscineFormGroup> </CoscineFormGroup>
<CoscineFormGroup>
<b-form-checkbox
id="GitlabTos"
v-model="isGitlabTosChecked"
@change="setGitlabTos"
>
{{ $t("resourceType.gitlab.tos") }}
<span id="mandatory" />
</b-form-checkbox>
</CoscineFormGroup>
</div> </div>
</template> </template>
...@@ -200,6 +211,7 @@ export default defineComponent({ ...@@ -200,6 +211,7 @@ export default defineComponent({
gitlabReferences: [] as Branch[] | null, gitlabReferences: [] as Branch[] | null,
isGitlabConnectionSuccessful: null as boolean | null, isGitlabConnectionSuccessful: null as boolean | null,
isLoading: false, isLoading: false,
isGitlabTosChecked: false,
}; };
}, },
...@@ -316,6 +328,14 @@ export default defineComponent({ ...@@ -316,6 +328,14 @@ export default defineComponent({
); );
}, },
setGitlabTos() {
this.$set(
this.resource.resourceTypeOption,
"TosAccepted",
this.isGitlabTosChecked
);
},
async initTabContent() { async initTabContent() {
this.isLoading = true; this.isLoading = true;
if ( if (
...@@ -323,7 +343,8 @@ export default defineComponent({ ...@@ -323,7 +343,8 @@ export default defineComponent({
this.resource.resourceTypeOption["RepoUrl"] && this.resource.resourceTypeOption["RepoUrl"] &&
this.resource.resourceTypeOption["AccessToken"] && this.resource.resourceTypeOption["AccessToken"] &&
this.resource.resourceTypeOption["ProjectId"] && this.resource.resourceTypeOption["ProjectId"] &&
this.resource.resourceTypeOption["Branch"] this.resource.resourceTypeOption["Branch"] &&
this.resource.resourceTypeOption["TosAccepted"]
) { ) {
// A resource type has been selected, but the resource's properties are unset. Set the values. // A resource type has been selected, but the resource's properties are unset. Set the values.
this.gitlabInformation.domain = this.gitlabInformation.domain =
...@@ -346,9 +367,18 @@ export default defineComponent({ ...@@ -346,9 +367,18 @@ export default defineComponent({
this.setSelectedGitLabReference(); this.setSelectedGitLabReference();
} }
} }
this.isGitlabTosChecked =
this.resource.resourceTypeOption["TosAccepted"];
} }
this.isLoading = false; this.isLoading = false;
}, },
}, },
}); });
</script> </script>
<style scoped>
#mandatory:after {
content: " *";
color: #a70619;
}
</style>
...@@ -308,6 +308,8 @@ export default { ...@@ -308,6 +308,8 @@ export default {
reference: "GitLab Branch auswählen", reference: "GitLab Branch auswählen",
referenceLabel: "GitLab Branch:", referenceLabel: "GitLab Branch:",
tos: "Mit Erstellung der Ressource versichere ich, dass alle Mitglieder des Projekts die Nutzungsbedingungen und Datenschutzerklärung des zugrundeliegenden Systems befolgen.",
verifyConnection: "Überprüfen der GitLab-Verbindung", verifyConnection: "Überprüfen der GitLab-Verbindung",
verificationToast: { verificationToast: {
success: { success: {
......
...@@ -302,6 +302,8 @@ export default { ...@@ -302,6 +302,8 @@ export default {
reference: "Select a GitLab Branch", reference: "Select a GitLab Branch",
referenceLabel: "GitLab Branch:", referenceLabel: "GitLab Branch:",
tos: "By creating the resource, I commit that all members of the project will comply with the terms of use and privacy policy of the underlying system.",
verifyConnection: "Verify GitLab Connection", verifyConnection: "Verify GitLab Connection",
verificationToast: { verificationToast: {
success: { success: {
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment