feat: add page component for public registration

This commit is contained in:
roschaefer 2019-10-04 22:13:46 +02:00 committed by mattwr18
parent 6955323f51
commit 71e94d88c6
9 changed files with 129 additions and 78 deletions

View File

@ -10,9 +10,6 @@
</ds-space> </ds-space>
</ds-flex-item> </ds-flex-item>
<ds-flex-item :width="{ base: '100%', sm: '50%' }" centered> <ds-flex-item :width="{ base: '100%', sm: '50%' }" centered>
<ds-space margin="small">
<ds-text size="small" align="left">{{ $t('login.copy') }}</ds-text>
</ds-space>
<ds-form <ds-form
v-if="!submitted" v-if="!submitted"
@input="handleInput" @input="handleInput"
@ -21,6 +18,7 @@
:schema="formSchema" :schema="formSchema"
@submit="handleSubmit" @submit="handleSubmit"
> >
<ds-space margin="small">
<ds-input <ds-input
:placeholder="$t('login.email')" :placeholder="$t('login.email')"
type="email" type="email"
@ -29,6 +27,7 @@
name="email" name="email"
icon="envelope" icon="envelope"
/> />
</ds-space>
<ds-space margin-botton="large"> <ds-space margin-botton="large">
<ds-text align="left">{{ $t('password-reset.form.description') }}</ds-text> <ds-text align="left">{{ $t('password-reset.form.description') }}</ds-text>
</ds-space> </ds-space>

View File

@ -1,5 +1,4 @@
<template> <template>
<ds-card class="signup">
<ds-space margin="large"> <ds-space margin="large">
<ds-form <ds-form
v-if="!success && !error" v-if="!success && !error"
@ -53,7 +52,6 @@
</template> </template>
</div> </div>
</ds-space> </ds-space>
</ds-card>
</template> </template>
<script> <script>

View File

@ -55,6 +55,8 @@
"email": "Deine E-Mail", "email": "Deine E-Mail",
"password": "Dein Passwort", "password": "Dein Passwort",
"forgotPassword": "Passwort vergessen?", "forgotPassword": "Passwort vergessen?",
"no-account": "Du hast noch keinen Benutzerkonto?",
"register": "Benutzerkonto erstellen",
"moreInfo": "Was ist Human Connection?", "moreInfo": "Was ist Human Connection?",
"moreInfoURL": "https://human-connection.org", "moreInfoURL": "https://human-connection.org",
"moreInfoHint": "zur Präsentationsseite", "moreInfoHint": "zur Präsentationsseite",

View File

@ -55,6 +55,8 @@
"email": "Your Email", "email": "Your Email",
"password": "Your Password", "password": "Your Password",
"forgotPassword": "Forgot Password?", "forgotPassword": "Forgot Password?",
"no-account": "Don't have an account?",
"register": "Sign up",
"moreInfo": "What is Human Connection?", "moreInfo": "What is Human Connection?",
"moreInfoURL": "https://human-connection.org/en/", "moreInfoURL": "https://human-connection.org/en/",
"moreInfoHint": "to the presentation page", "moreInfoHint": "to the presentation page",

View File

@ -38,9 +38,8 @@ export default {
'password-reset-request', 'password-reset-request',
'password-reset-verify-nonce', 'password-reset-verify-nonce',
'password-reset-change-password', 'password-reset-change-password',
// 'registration-signup', TODO: implement to open public registration 'registration-signup',
// 'registration-signup-by-invitation-code', 'registration-enter-nonce',
// 'registration-verify-nonce',
'registration-create-user-account', 'registration-create-user-account',
'pages-slug', 'pages-slug',
'terms-and-conditions', 'terms-and-conditions',

View File

@ -5,7 +5,9 @@
<ds-heading size="h3">{{ $t('admin.invites.title') }}</ds-heading> <ds-heading size="h3">{{ $t('admin.invites.title') }}</ds-heading>
<ds-text>{{ $t('admin.invites.description') }}</ds-text> <ds-text>{{ $t('admin.invites.description') }}</ds-text>
</ds-space> </ds-space>
<ds-card class="signup">
<signup :invitation="true" /> <signup :invitation="true" />
</ds-card>
</ds-section> </ds-section>
</template> </template>

View File

@ -22,6 +22,11 @@
</ds-space> </ds-space>
</ds-flex-item> </ds-flex-item>
<ds-flex-item :width="{ base: '100%', sm: '50%' }" centered> <ds-flex-item :width="{ base: '100%', sm: '50%' }" centered>
<ds-space margin="small">
<a :href="$t('login.moreInfoURL')" :title="$t('login.moreInfoHint')" target="_blank">
{{ $t('login.moreInfo') }}
</a>
</ds-space>
<ds-space margin="small"> <ds-space margin="small">
<ds-text size="small">{{ $t('login.copy') }}</ds-text> <ds-text size="small">{{ $t('login.copy') }}</ds-text>
</ds-space> </ds-space>
@ -43,7 +48,7 @@
name="password" name="password"
type="password" type="password"
/> />
<ds-space class="password-reset-link" margin-bottom="large"> <ds-space margin-bottom="large">
<nuxt-link to="/password-reset/request">{{ $t('login.forgotPassword') }}</nuxt-link> <nuxt-link to="/password-reset/request">{{ $t('login.forgotPassword') }}</nuxt-link>
</ds-space> </ds-space>
<ds-button <ds-button
@ -56,14 +61,9 @@
> >
{{ $t('login.login') }} {{ $t('login.login') }}
</ds-button> </ds-button>
<ds-space margin="x-small"> <ds-space margin-top="large" margin-bottom="x-small">
<a {{ $t('login.no-account') }}
:href="$t('login.moreInfoURL')" <nuxt-link to="/registration/signup">{{ $t('login.register') }}</nuxt-link>
:title="$t('login.moreInfoHint')"
target="_blank"
>
{{ $t('login.moreInfo') }}
</a>
</ds-space> </ds-space>
</form> </form>
</ds-flex-item> </ds-flex-item>

View File

@ -0,0 +1,7 @@
<template>
<h1>Enter nonce</h1>
</template>
<script>
export default {}
</script>

View File

@ -0,0 +1,42 @@
<template>
<ds-container width="medium">
<ds-card>
<ds-flex gutter="small">
<ds-flex-item :width="{ base: '100%', sm: '50%' }" centered>
<client-only>
<locale-switch class="login-locale-switch" offset="5" />
</client-only>
<ds-space margin-top="small" margin-bottom="xxx-small" centered>
<img class="signup-image" alt="Human Connection" src="/img/sign-up/nicetomeetyou.svg" />
</ds-space>
</ds-flex-item>
<ds-flex-item :width="{ base: '100%', sm: '50%' }" centered>
<signup :invitation="false" />
</ds-flex-item>
</ds-flex>
</ds-card>
</ds-container>
</template>
<script>
import Signup from '~/components/Registration/Signup'
import LocaleSwitch from '~/components/LocaleSwitch/LocaleSwitch'
export default {
layout: 'no-header',
components: {
Signup,
LocaleSwitch,
},
}
</script>
<style lang="scss" scoped>
.signup-image {
width: 90%;
max-width: 200px;
}
.login-card {
position: relative;
}
</style>