From d539f97b4d8add8a42c94af40c434086bad791e2 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 22 Aug 2024 13:09:24 -0300 Subject: name_and_dob --- packages/kyc-ui/src/forms/index.ts | 7 ++++ packages/kyc-ui/src/forms/nameAndBirthdate.ts | 47 +++++++++++++++++++++++++++ packages/kyc-ui/src/forms/name_and_dob.ts | 47 --------------------------- 3 files changed, 54 insertions(+), 47 deletions(-) create mode 100644 packages/kyc-ui/src/forms/nameAndBirthdate.ts delete mode 100644 packages/kyc-ui/src/forms/name_and_dob.ts (limited to 'packages') diff --git a/packages/kyc-ui/src/forms/index.ts b/packages/kyc-ui/src/forms/index.ts index 5f6cf9ba0..a8803ec9f 100644 --- a/packages/kyc-ui/src/forms/index.ts +++ b/packages/kyc-ui/src/forms/index.ts @@ -19,6 +19,7 @@ import { } from "@gnu-taler/web-util/browser"; import { simplest } from "./simplest.js"; import { personalInfo } from "./personal-info.js"; +import { nameAndDob } from "./nameAndBirthdate.js"; export const preloadedForms: ( i18n: InternationalizationAPI, @@ -35,4 +36,10 @@ export const preloadedForms: ( version: 1, config: personalInfo(i18n), }, + { + label: i18n.str`Name and birthdate`, + id: "name_and_dob", + version: 1, + config: nameAndDob(i18n), + }, ]; diff --git a/packages/kyc-ui/src/forms/nameAndBirthdate.ts b/packages/kyc-ui/src/forms/nameAndBirthdate.ts new file mode 100644 index 000000000..4e4cb17e6 --- /dev/null +++ b/packages/kyc-ui/src/forms/nameAndBirthdate.ts @@ -0,0 +1,47 @@ +/* + This file is part of GNU Taler + (C) 2022-2024 Taler Systems S.A. + + GNU Taler is free software; you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation; either version 3, or (at your option) any later version. + + GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + GNU Taler; see the file COPYING. If not, see + */ + + import type { + DoubleColumnForm, + DoubleColumnFormSection, + InternationalizationAPI, + UIHandlerId, + } from "@gnu-taler/web-util/browser"; + + export const nameAndDob = (i18n: InternationalizationAPI): DoubleColumnForm => ({ + type: "double-column" as const, + design: [ + { + title: i18n.str`Simple form`, + fields: [ + { + type: "textArea", + id: ".full_name" as UIHandlerId, + name: "full_name", + label: i18n.str`Full Name`, + }, + { + type: "textArea", + id: ".birthdate" as UIHandlerId, + name: "birthdate", + label: i18n.str`Birthdate`, + }, + ], + }, + ], + }); + + \ No newline at end of file diff --git a/packages/kyc-ui/src/forms/name_and_dob.ts b/packages/kyc-ui/src/forms/name_and_dob.ts deleted file mode 100644 index 4e4cb17e6..000000000 --- a/packages/kyc-ui/src/forms/name_and_dob.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - This file is part of GNU Taler - (C) 2022-2024 Taler Systems S.A. - - GNU Taler is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - GNU Taler; see the file COPYING. If not, see - */ - - import type { - DoubleColumnForm, - DoubleColumnFormSection, - InternationalizationAPI, - UIHandlerId, - } from "@gnu-taler/web-util/browser"; - - export const nameAndDob = (i18n: InternationalizationAPI): DoubleColumnForm => ({ - type: "double-column" as const, - design: [ - { - title: i18n.str`Simple form`, - fields: [ - { - type: "textArea", - id: ".full_name" as UIHandlerId, - name: "full_name", - label: i18n.str`Full Name`, - }, - { - type: "textArea", - id: ".birthdate" as UIHandlerId, - name: "birthdate", - label: i18n.str`Birthdate`, - }, - ], - }, - ], - }); - - \ No newline at end of file -- cgit v1.2.3