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
Branches
Tags
2 merge requests!143Release: Sprint/2022 22 :robot:,!140Update: Adding ToS checkbox for gitlab
......@@ -237,7 +237,8 @@ export default defineComponent({
this.resource.resourceTypeOption["RepoUrl"] &&
this.resource.resourceTypeOption["AccessToken"] &&
this.resource.resourceTypeOption["ProjectId"] &&
this.resource.resourceTypeOption["Branch"]
this.resource.resourceTypeOption["Branch"] &&
this.resource.resourceTypeOption["TosAccepted"]
);
}
// Evaluate resource type specific - Linked Data
......
......@@ -142,6 +142,17 @@
</span>
</multiselect>
</CoscineFormGroup>
<CoscineFormGroup>
<b-form-checkbox
id="GitlabTos"
v-model="isGitlabTosChecked"
@change="setGitlabTos"
>
{{ $t("resourceType.gitlab.tos") }}
<span id="mandatory" />
</b-form-checkbox>
</CoscineFormGroup>
</div>
</template>
......@@ -200,6 +211,7 @@ export default defineComponent({
gitlabReferences: [] as Branch[] | null,
isGitlabConnectionSuccessful: null as boolean | null,
isLoading: false,
isGitlabTosChecked: false,
};
},
......@@ -316,6 +328,14 @@ export default defineComponent({
);
},
setGitlabTos() {
this.$set(
this.resource.resourceTypeOption,
"TosAccepted",
this.isGitlabTosChecked
);
},
async initTabContent() {
this.isLoading = true;
if (
......@@ -323,7 +343,8 @@ export default defineComponent({
this.resource.resourceTypeOption["RepoUrl"] &&
this.resource.resourceTypeOption["AccessToken"] &&
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.
this.gitlabInformation.domain =
......@@ -346,9 +367,18 @@ export default defineComponent({
this.setSelectedGitLabReference();
}
}
this.isGitlabTosChecked =
this.resource.resourceTypeOption["TosAccepted"];
}
this.isLoading = false;
},
},
});
</script>
<style scoped>
#mandatory:after {
content: " *";
color: #a70619;
}
</style>
......@@ -308,6 +308,8 @@ export default {
reference: "GitLab Branch auswählen",
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",
verificationToast: {
success: {
......
......@@ -302,6 +302,8 @@ export default {
reference: "Select a 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",
verificationToast: {
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