Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gender versions of the letter #1523

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/Email.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import {
FilledInput,
FormHelperText,
FormControl,
IconButton,
Typography,
} from "@material-ui/core";

import Alert from "@material-ui/lab/Alert";
Expand All @@ -21,7 +23,6 @@ import EmailAction from "@components/email/Action";
import SkeletonListItem from "@components/layout/SkeletonListItem";
import ProgressCounter from "@components/ProgressCounter";
import Filter from "@components/filter/Filter";

import useData from "@hooks/useData";
import useToken, { extractTokens } from "@hooks/useToken";
import { useIsMobile } from "@hooks/useDevice";
Expand Down Expand Up @@ -556,7 +557,6 @@ const EmailComponent = (props) => {
};
// <TwitterText text={actionText} handleChange={handleChange} label="Your message to them"/>
//

const ExtraFields = (props) => {
return (
<>
Expand Down
7 changes: 5 additions & 2 deletions src/components/field/Salutation.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ import CancelIcon from "@material-ui/icons/Cancel";
const Salutation = (props) => {
const { t } = useTranslation();
const { setValue, watch } = props.form;
const [firstname, lastname] = watch(["firstname", "lastname"]);
console.log(firstname, lastname);

let options = t("salutations", {
returnObjects: true,
defaultValues: [
{ m: "Dear {{name}}" },
{ f: "Dear {{name}}" },
{ m: "Dear Mr. {{name}}" },
{ f: "Dear Ms. {{name}}" },
{ other: "Dear {{name}}" },
],
name: firstname,
});
const sal = watch("salutation") || "";
const [open, setOpen] = useState(false);
Expand Down
4 changes: 2 additions & 2 deletions src/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@
"required": "required",
"required field": "required field",
"salutations": {
"f": "Dear {{name}}",
"m": "Dear {{name}}",
"f": "Dear Mr. {{name}}",
"m": "Dear Ms. {{name}}",
"other": "Dear {{name}}"
},
"select_all": "Select all",
Expand Down
Loading
Loading