Commit 291ae163 authored by Håvard Lunde's avatar Håvard Lunde
Browse files

Timber: Deich-1459 - New receipt text/graphics for registration

parent ca6d9122
......@@ -5,4 +5,7 @@ build/
es5-compiled/
.sass-cache/
*.iml
.idea/
\ No newline at end of file
.idea/
.scannerwork/
package-lock.json
# must be unique in a given SonarQube instance
sonar.projectKey=no.deichman.timber:timber
sonar.projectName=Timber
sonar.projectVersion=0.0.1
sonar.sources=.
#sonar.inclusions=**/*.js
sonar.exclusions=node_modules/**,public/dist/**
# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8
import PropTypes from "prop-types"
import React from "react"
import { Link } from "react-router-dom"
import { connect } from "react-redux"
import { destroy } from "redux-form"
import { injectIntl, intlShape, defineMessages, FormattedMessage } from "react-intl"
......@@ -17,20 +18,16 @@ class Register extends React.Component {
return (
<div data-automation-id="registration_success_modal" className="default-form">
<form>
<img src="images/lanekort.jpg" />
<h2><FormattedMessage {...messages.headerTextSuccess} /></h2>
<p>
{this.props.categoryCode === "REGBARN"
? <span data-automation-id="category" className="juvenile">
<FormattedMessage {...messages.patronCategoryJuvenile} /><br />
<FormattedMessage {...messages.messageSuccessJuvenile} /><br />
</span>
: <span data-automation-id="category" className="adult">
<FormattedMessage {...messages.patronCategoryAdult} /><br />
<FormattedMessage {...messages.messageSuccessAdult} /><br />
</span>
}
<span data-automation-id="username">{this.props.username}</span>
</p>
<FormattedMessage {...messages.genericTextSuccess} />
<h2><FormattedMessage {...messages.infoHeaderJuvenile} /></h2>
<FormattedMessage {...messages.informationJuvenile} values={{ must: <strong><FormattedMessage {...messages.emphasisMust} /></strong> }} />
<h2><FormattedMessage {...messages.infoHeaderMypages} /></h2>
<FormattedMessage {...messages.informationMypages} values={{ loginMypages: <Link to="/login"><FormattedMessage {...messages.loginMypages} /></Link> }} />
<h2><FormattedMessage {...messages.infoHeaderExtendedUsage} /></h2>
<FormattedMessage {...messages.informationExtendedUsage} /><br />
<a href="https://www.deichman.no/node/3648"><FormattedMessage {...messages.moreInformationExtendedUsage} /></a>.
</form>
</div>
)
......@@ -100,6 +97,61 @@ function mapDispatchToProps (dispatch) {
}
export const messages = defineMessages({
headerTextSuccess: {
id: "Registration.headerTextSuccess",
description: "Header for successful register",
defaultMessage: "You are now registered as a user at Deichman. You can pick up your library card from your local library."
},
genericTextSuccess: {
id: "Registration.genericTextSuccess",
description: "Generic lead-in text for successful register",
defaultMessage: "With a library card you can borrow from over one million books, movies, CDs and more; completely free."
},
infoHeaderJuvenile: {
id: "Registration.infoHeaderJuvenile",
description: "Header for text regarding juveniles",
defaultMessage: "Library card for children under 15 years"
},
informationJuvenile: {
id: "Registration.informationJuvenile",
description: "Information regarding juveniles",
defaultMessage: "For children under 15 years, both a guardian/parent and the child {must} be present when picking up the library card."
},
emphasisMust: {
id: "Registration.emphasisMust",
description: "The word 'must' - for emphasis",
defaultMessage: "must"
},
infoHeaderMypages: {
id: "Registration.infoHeaderMypages",
description: "Header for mypages login",
defaultMessage: "Sign in to My Profile"
},
informationMypages: {
id: "Registration.informationMypages",
description: "Information about mypages login",
defaultMessage: "You can now {loginMypages} to reserve media. "
},
loginMypages: {
id: "Registration.loginMypages",
description: "Link text for mypages login",
defaultMessage: "sign in to My Profile"
},
infoHeaderExtendedUsage: {
id: "Registration.infoHeaderExtendedUsage",
description: "Header about usage and opening hours",
defaultMessage: "Extended opening hours"
},
informationExtendedUsage: {
id: "Registration.informationExtendedUsage",
description: "Information about usage and opening hours",
defaultMessage: "You can upgrade your library cards to an admission card and get access to some of our libraries from 7 AM until 11 PM every day, including weekends and public holidays."
},
moreInformationExtendedUsage: {
id: "Registration.moreInformationExtendedUsage",
description: "Link to even more information",
defaultMessage: "Read more about extended opening hours"
},
button: {
id: "Registration.button",
description: "The button to exit the modal dialog",
......@@ -110,31 +162,6 @@ export const messages = defineMessages({
description: "The cancel button text",
defaultMessage: "Cancel"
},
headerTextSuccess: {
id: "Registration.headerTextSuccess",
description: "Message upon successful registration",
defaultMessage: "Success! You are now ready to reserve and loan books at Deichman"
},
messageSuccessAdult: {
id: "Registration.messageSuccessAdult",
description: "The registration success message for adults",
defaultMessage: "Welcome as a new user of our library. A temporary user id is given below. Please contact library to get a library card."
},
patronCategoryAdult: {
id: "Registration.patronCategoryAdult",
description: "The patron category message for adults",
defaultMessage: "Patron category: adult"
},
messageSuccessJuvenile: {
id: "Registration.messageSuccessJuvenile",
description: "The registration success message for juvenile",
defaultMessage: "Welcome as juvenile user of our library. A temporary user id is given below. Please contact library to get a library card."
},
patronCategoryJuvenile: {
id: "Registration.patronCategoryJuvenile",
description: "The patron category message for juvenile",
defaultMessage: "Patron category: juvenile"
},
headerTextError: {
id: "Registration.headerTextError",
description: "The header text for the registration error dialog",
......
......@@ -175,11 +175,17 @@ export default {
"Registration.cancel": "Avbryt",
"Registration.genericRegistrationError": "Kunne ikke registrere ny låner. Vennligst prøv igjen senere.",
"Registration.headerTextError": "En feil har oppstått",
"Registration.headerTextSuccess": "Du er nå registrert og kan hente bibliotekkortet ditt",
"Registration.messageSuccessAdult": "Du er nå registrert som låner hos oss. Nedenfor er en midlertidig brukerid som du kan bruke til å logge inn for å reservere. Vennligst kontakt ditt bibliotek for å få lånerkort.",
"Registration.messageSuccessJuvenile": "Du er nå registrert som barnelåner hos oss. Nedenfor er en midlertidig brukerid som du kan bruke til å logge inn for å reservere. Du kan bestille bøker her, men må ta kontakt med biblioteket ditt for å få lånekort og hente det du har bestilt.",
"Registration.patronCategoryAdult": "Lånerkategori: voksen",
"Registration.patronCategoryJuvenile": "Lånerkategori: barn",
"Registration.headerTextSuccess": "Du er nå registrert som låner ved Deichman. Ditt bibliotekkort henter du på ditt lokale bibliotek.",
"Registration.genericTextSuccess": "Med bibliotekkort kan du låne fritt blant over en million bøker, filmer, cd-er og annet; helt gratis.",
"Registration.infoHeaderJuvenile": "Bibliotekkort til barn under 15 år",
"Registration.informationJuvenile": "For barn under 15 år {must} både en foresatt og barn være med når bibliotekkortet hentes.",
"Registration.emphasisMust": "",
"Registration.infoHeaderMypages": "Logg inn på Min side",
"Registration.informationMypages": "Du kan {loginMypages} for å reservere medier. Som brukernavn bruker du e-postadressen din, eller midlertidig brukernavn: 91-578.",
"Registration.loginMypages": "logge deg inn på Min side",
"Registration.infoHeaderExtendedUsage": "Bruk biblioteket når det passer deg best",
"Registration.informationExtendedUsage": "Oppgraderer du kortet til nøkkelkort, kan du også bruke flere av våre bibliotek fra 07:00 til 23:00 hver eneste dag hele året.",
"Registration.moreInformationExtendedUsage": "Les mer om meråpne bibliotek",
"RegistrationFormPartOne.birthdate": "Fødselsdato",
"RegistrationFormPartOne.cancel": "Avbryt",
"RegistrationFormPartOne.checkForExistingUser": "Fortsett",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment