diff --git a/i18n/en-US.yml b/i18n/en-US.yml
index 8216c7667..24cc85cb1 100644
--- a/i18n/en-US.yml
+++ b/i18n/en-US.yml
@@ -577,11 +577,18 @@ components:
linkCopied: Copied
reportIssue: Report Issue
reportEmailSubject: Reporting an Issue with OpenTripPlanner
- reportEmailTemplate: >
- ***INSTRUCTIONS TO USER***
+ reportEmailTemplate: |+
+ *** INSTRUCTIONS TO USER ***
This feature allows you to email a report to site administrators for review.
- Please add any additional feedback for this trip under the 'Additional Comments'
- section below and send using your regular email program."
+ Please fill out the prompts below and send using your regular email program.
+
+ *** PLEASE COMPLETE THE FOLLOWING ***
+
+ Issue encountered:
+
+ Type of trip you wanted to take (ex. walk + transit, bike + transit, car + transit):
+
+ *** TECHNICAL DETAILS ***
# Used in both desktop and mobile
TripViewer:
accessible: Accessible
diff --git a/i18n/fr-FR.yml b/i18n/fr-FR.yml
index 64908ebd7..52ce58fdb 100644
--- a/i18n/fr-FR.yml
+++ b/i18n/fr-FR.yml
@@ -561,11 +561,18 @@ components:
linkCopied: Copié
reportIssue: Un problème ? # "Signaler un problème" does not fit.
reportEmailSubject: Signaler un problème avec OpenTripPlanner
- reportEmailTemplate: >
- *** À L'ATTENTION DE L'UTILISATEUR ***
- Vous pouvez communiquer votre problème par e-mail et en détail aux administrateurs de ce site.
- Veuillez ajouter toute remarque sur cet itinéraire dans la section 'Additional Comments'
- ci-dessous, puis envoyez depuis votre logiciel de messagerie usuel."
+ reportEmailTemplate: |+
+ *** CONSIGNES POUR L'UTILISATEUR ***
+ Cet email signalera votre problème aux administrateurs de ce site.
+ Veuillez remplir les détails ci-dessous, puis envoyez depuis votre logiciel de messagerie habituel.
+
+ *** VEUILLEZ REMPLIR CI-DESSOUS ***
+
+ Problème rencontré :
+
+ Type de trajet recherché (ex. à pied + transports, vélo + transports, voiture + transports) :
+
+ *** DÉTAILS TECHNIQUES ***
# Used in both desktop and mobile
TripViewer:
accessible: Accessible
diff --git a/lib/components/narrative/trip-tools.js b/lib/components/narrative/trip-tools.js
index 9b89a814b..2bc3d7dd9 100644
--- a/lib/components/narrative/trip-tools.js
+++ b/lib/components/narrative/trip-tools.js
@@ -1,88 +1,18 @@
+/* eslint-disable no-case-declarations */
+import { Button } from 'react-bootstrap'
+import { connect } from 'react-redux'
import bowser from 'bowser'
import copyToClipboard from 'copy-to-clipboard'
-import React, {Component} from 'react'
-import { connect } from 'react-redux'
-import { Button } from 'react-bootstrap'
+import PropTypes from 'prop-types'
+import React, { Component } from 'react'
// import { DropdownButton, MenuItem } from 'react-bootstrap'
import { FormattedMessage, injectIntl } from 'react-intl'
import Icon from '../util/icon'
-
-class TripTools extends Component {
- static defaultProps = {
- buttonTypes: [ 'COPY_URL', 'PRINT', 'REPORT_ISSUE', 'START_OVER' ]
- }
-
- render () {
- const { buttonTypes, reactRouterConfig, reportConfig } = this.props
-
- const buttonComponents = []
- buttonTypes.forEach((type) => {
- switch (type) {
- case 'COPY_URL':
- buttonComponents.push()
- break
- case 'PRINT':
- buttonComponents.push()
- break
- case 'REPORT_ISSUE':
- if (!reportConfig || !reportConfig.mailto) break
- buttonComponents.push()
- break
- case 'START_OVER':
- // Determine "home" URL
- let startOverUrl = '/'
- if (reactRouterConfig && reactRouterConfig.basename) {
- startOverUrl += reactRouterConfig.basename
- }
- buttonComponents.push(
- // FIXME: The Spanish string does not fit in button width.
- }
- url={startOverUrl}
- />
- )
- break
- }
- })
-
- return (
-
- {buttonComponents.map((btn, i) =>
{btn}
)}
-
- )
- }
-}
-
-// Share/Save Dropdown Component -- not used currently
-
-/*
-class ShareSaveDropdownButton extends Component {
- _onCopyToClipboardClick = () => {
- copyToClipboard(window.location.href)
- }
-
- render () {
- return (
- Share/Save}
- id={'tool-share-dropdown'}
- >
-
-
- )
- }
-}
-*/
-
// Copy URL Button
class CopyUrlButton extends Component {
- constructor (props) {
+ constructor(props) {
super(props)
this.state = { showCopied: false }
}
@@ -100,7 +30,10 @@ class CopyUrlButton extends Component {
url = `${parts[0]}#/start/x/x/x/${routerId}${parts[1]}`
} else {
// Console logs are not internationalized.
- console.warn('URL not formatted as expected, copied URL will not contain session routerId.', routerId)
+ console.warn(
+ 'URL not formatted as expected, copied URL will not contain session routerId.',
+ routerId
+ )
}
}
copyToClipboard(url)
@@ -108,27 +41,21 @@ class CopyUrlButton extends Component {
window.setTimeout(this._resetState, 2000)
}
- render () {
+ render() {
return (