diff options
Diffstat (limited to 'packages/merchant-backoffice-ui/src/components/instance/DefaultInstanceFormFields.tsx')
-rw-r--r-- | packages/merchant-backoffice-ui/src/components/instance/DefaultInstanceFormFields.tsx | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/packages/merchant-backoffice-ui/src/components/instance/DefaultInstanceFormFields.tsx b/packages/merchant-backoffice-ui/src/components/instance/DefaultInstanceFormFields.tsx index cb4442897..efcca302f 100644 --- a/packages/merchant-backoffice-ui/src/components/instance/DefaultInstanceFormFields.tsx +++ b/packages/merchant-backoffice-ui/src/components/instance/DefaultInstanceFormFields.tsx @@ -19,9 +19,7 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { - useTranslationContext -} from "@gnu-taler/web-util/browser"; +import { useTranslationContext } from "@gnu-taler/web-util/browser"; import { Fragment, VNode, h } from "preact"; import { useSessionContext } from "../../context/session.js"; import { Entity } from "../../paths/admin/create/CreatePage.js"; @@ -33,6 +31,7 @@ import { InputLocation } from "../form/InputLocation.js"; import { InputSelector } from "../form/InputSelector.js"; import { InputToggle } from "../form/InputToggle.js"; import { InputWithAddon } from "../form/InputWithAddon.js"; +import { TextField } from "../form/TextField.js"; export function DefaultInstanceFormFields({ readonlyId, @@ -42,15 +41,13 @@ export function DefaultInstanceFormFields({ showId: boolean; }): VNode { const { i18n } = useTranslationContext(); - const { - state: { backendUrl }, - } = useSessionContext(); + const { state } = useSessionContext(); return ( <Fragment> {showId && ( <InputWithAddon<Entity> name="id" - addonBefore={new URL("instances/", backendUrl).href} + addonBefore={new URL("instances/", state.backendUrl.href).href} readonly={readonlyId} label={i18n.str`Identifier`} tooltip={i18n.str`Name of the instance in URLs. The 'default' instance is special in that it is used to administer other instances.`} @@ -63,13 +60,6 @@ export function DefaultInstanceFormFields({ tooltip={i18n.str`Legal name of the business represented by this instance.`} /> - <InputSelector<Entity> - name="user_type" - label={i18n.str`Type`} - tooltip={i18n.str`Different type of account can have different rules and requirements.`} - values={["business", "individual"]} - /> - <Input<Entity> name="email" label={i18n.str`Email`} @@ -88,12 +78,6 @@ export function DefaultInstanceFormFields({ tooltip={i18n.str`Logo image.`} /> - <InputToggle<Entity> - name="use_stefan" - label={i18n.str`Pay transaction fee`} - tooltip={i18n.str`Assume the cost of the transaction of let the user pay for it.`} - /> - <InputGroup name="address" label={i18n.str`Address`} @@ -110,6 +94,12 @@ export function DefaultInstanceFormFields({ <InputLocation name="jurisdiction" /> </InputGroup> + <InputToggle<Entity> + name="use_stefan" + label={i18n.str`Pay transaction fee`} + tooltip={i18n.str`Assume the cost of the transaction of let the user pay for it.`} + /> + <InputDuration<Entity> name="default_pay_delay" label={i18n.str`Default payment delay`} |