Skip to content
Snippets Groups Projects
Commit da02ae6d authored by Hangzhi Yu's avatar Hangzhi Yu
Browse files

Allow autofill of invitation code from URL

parent bf78512d
No related branches found
No related tags found
No related merge requests found
Pipeline #196948 failed
......@@ -67,6 +67,9 @@ import PersonDetailsCard from "../person/PersonDetailsCard.vue";
:step="getStepIndex('invitation')"
>
<h2 class="text-h6 mb-4">{{ $t(getStepTitleKey("invitation")) }}</h2>
<v-alert v-if="invitationCodeAutofilled" type="info" outlined class="mb-4">{{
$t("accounts.signup.form.steps.invitation.autofilled")
}}</v-alert>
<div class="mb-4">
<v-form v-model="validationStatuses['invitation']">
<div :aria-required="invitationCodeRequired">
......@@ -818,6 +821,7 @@ export default {
validationStatuses: {},
invitation: null,
invitationCodeInvalid: false,
invitationCodeAutofilled: false,
accountRegistrationSent: false,
step: 1,
emailMode: null,
......@@ -863,6 +867,10 @@ export default {
},
mounted() {
this.addPermissions(["core.signup_rule", "core.invite_enabled"]);
if (this.$route.query.invitation_code) {
this.data.invitationCode = this.$route.query.invitation_code;
this.invitationCodeAutofilled = true;
}
},
};
</script>
......
......@@ -56,6 +56,7 @@
"code_required": "Invitation code required"
},
"not_valid": "The invitation code you entered is not valid.",
"autofilled": "The invitation code was automatically filled in.",
"fields": {
"invitation_code": {
"label": "Invitation code",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment