commit f28473e3aee09e832baf1ce39ec4183fe7cb8c5e
parent f0a852153ba236a295a4ab7434410607842401ee
Author: Sebastian <sebasjm@taler-systems.com>
Date: Wed, 3 Dec 2025 14:58:59 -0300
fix #10708
Diffstat:
9 files changed, 43 insertions(+), 50 deletions(-)
diff --git a/packages/merchant-backoffice-ui/src/components/form/Input.tsx b/packages/merchant-backoffice-ui/src/components/form/Input.tsx
@@ -70,6 +70,11 @@ export function Input<T>({
<div class="field-label is-normal">
<label class="label">
{label}
+ {required && (
+ <span class="has-text-danger" style={{marginLeft:5}}>
+ *
+ </span>
+ )}
{tooltip && (
<span class="icon has-tooltip-right" data-tooltip={tooltip}>
<i class="mdi mdi-information" />
@@ -101,11 +106,6 @@ export function Input<T>({
/>
{help}
{children}
- {required && (
- <span class="icon has-text-danger is-right">
- <i class="mdi mdi-alert" />
- </span>
- )}
</p>
{error && (
<p class="help is-danger" style={{ fontSize: 16 }}>
diff --git a/packages/merchant-backoffice-ui/src/components/form/InputArray.tsx b/packages/merchant-backoffice-ui/src/components/form/InputArray.tsx
@@ -65,6 +65,11 @@ export function InputArray<T>({
<div class="field-label is-normal">
<label class="label">
{label}
+ {required && (
+ <span class="has-text-danger" style={{marginLeft:5}}>
+ *
+ </span>
+ )}
{tooltip && (
<span class="icon has-tooltip-right" data-tooltip={tooltip}>
<i class="mdi mdi-information" />
@@ -99,11 +104,6 @@ export function InputArray<T>({
}
}}
/>
- {required && (
- <span class="icon has-text-danger is-right">
- <i class="mdi mdi-alert" />
- </span>
- )}
</p>
{getSuggestion ? undefined : (
<p class="control">
diff --git a/packages/merchant-backoffice-ui/src/components/form/InputDate.tsx b/packages/merchant-backoffice-ui/src/components/form/InputDate.tsx
@@ -75,6 +75,11 @@ export function InputDate<T>({
<div class="field-label is-normal">
<label class="label">
{label}
+ {required && (
+ <span class="has-text-danger" style={{marginLeft:5}}>
+ *
+ </span>
+ )}
{tooltip && (
<span class="icon has-tooltip-right" data-tooltip={tooltip}>
<i class="mdi mdi-information" />
@@ -102,11 +107,6 @@ export function InputDate<T>({
if (!readonly) setOpened(true);
}}
/>
- {required && (
- <span class="icon has-text-danger is-right">
- <i class="mdi mdi-alert" />
- </span>
- )}
{help}
</p>
<div
diff --git a/packages/merchant-backoffice-ui/src/components/form/InputDuration.tsx b/packages/merchant-backoffice-ui/src/components/form/InputDuration.tsx
@@ -27,7 +27,6 @@ import { SimpleModal } from "../modal/index.js";
import { DurationPicker } from "../picker/DurationPicker.js";
import { InputProps, useField } from "./useField.js";
-
const TALER_SCREEN_ID = 8;
export interface Props<T> extends InputProps<T> {
@@ -113,6 +112,11 @@ export function InputDuration<T>({
<div class="field-label is-normal">
<label class="label">
{label}
+ {required && (
+ <span class="has-text-danger" style={{ marginLeft: 5 }}>
+ *
+ </span>
+ )}
{tooltip && (
<span class="icon" data-tooltip={tooltip}>
<i class="mdi mdi-information" />
@@ -135,11 +139,6 @@ export function InputDuration<T>({
if (!readonly) setOpened(true);
}}
/>
- {required && (
- <span class="icon has-text-danger is-right">
- <i class="mdi mdi-alert" />
- </span>
- )}
</p>
<div
class="control"
@@ -195,7 +194,7 @@ export function InputDuration<T>({
minutes
value={!value || value.d_ms === "forever" ? 0 : value.d_ms}
onChange={(v) => {
- let duration: any = { d_ms: v};
+ let duration: any = { d_ms: v };
if (useProtocolDuration === true) {
onChange(Duration.toTalerProtocolDuration(duration) as any);
} else {
diff --git a/packages/merchant-backoffice-ui/src/components/form/InputGroup.tsx b/packages/merchant-backoffice-ui/src/components/form/InputGroup.tsx
@@ -55,8 +55,8 @@ export function InputGroup<T>({
</span>
)}
{group?.hasError && (
- <span class="icon has-text-danger" data-tooltip={tooltip}>
- <i class="mdi mdi-alert" />
+ <span class="has-text-danger" data-tooltip={tooltip} style={{marginLeft:5}}>
+ *
</span>
)}
</p>
diff --git a/packages/merchant-backoffice-ui/src/components/form/InputSelector.tsx b/packages/merchant-backoffice-ui/src/components/form/InputSelector.tsx
@@ -50,6 +50,11 @@ export function InputSelector<T>({
<div class="field-label is-normal">
<label class="label">
{label}
+ {required && (
+ <span class="has-text-danger" style={{ marginLeft: 5 }}>
+ *
+ </span>
+ )}
{tooltip && (
<span class="icon has-tooltip-right" data-tooltip={tooltip}>
<i class="mdi mdi-information" />
@@ -80,14 +85,6 @@ export function InputSelector<T>({
</select>
</p>
<p class="help">{help}</p>
- {required && (
- <span
- class="icon has-text-danger is-right"
- style={{ height: "2.5em" }}
- >
- <i class="mdi mdi-alert" />
- </span>
- )}
{error && (
<p class="help is-danger" style={{ fontSize: 16 }}>
{error}
diff --git a/packages/merchant-backoffice-ui/src/components/form/InputTab.tsx b/packages/merchant-backoffice-ui/src/components/form/InputTab.tsx
@@ -50,6 +50,11 @@ export function InputTab<T>({
<div class="field-label is-normal">
<label class="label">
{label}
+ {required && (
+ <span class="has-text-danger" style={{ marginLeft: 5 }}>
+ *
+ </span>
+ )}
{tooltip && (
<span class="icon has-tooltip-right" data-tooltip={tooltip}>
<i class="mdi mdi-information" />
@@ -81,14 +86,6 @@ export function InputTab<T>({
</div>
{help}
</p>
- {required && (
- <span
- class="icon has-text-danger is-right"
- style={{ height: "2.5em" }}
- >
- <i class="mdi mdi-alert" />
- </span>
- )}
{error && (
<p class="help is-danger" style={{ fontSize: 16 }}>
{error}
diff --git a/packages/merchant-backoffice-ui/src/components/form/InputToggle.tsx b/packages/merchant-backoffice-ui/src/components/form/InputToggle.tsx
@@ -60,6 +60,11 @@ export function InputToggle<T>({
<div class="field-label is-normal">
<label class="label">
{label}
+ {required && (
+ <span class="has-text-danger" style={{marginLeft:5}}>
+ *
+ </span>
+ )}
{tooltip && (
<span class="icon has-tooltip-right" data-tooltip={tooltip}>
<i class="mdi mdi-information" />
@@ -95,11 +100,6 @@ export function InputToggle<T>({
style={{ cursor: readonly ? "default" : undefined }}
></div>
</label>
- {required && (
- <span class="icon has-text-danger is-right">
- <i class="mdi mdi-alert" />
- </span>
- )}
<p>{help}</p>
</p>
{error && (
diff --git a/packages/merchant-backoffice-ui/src/components/form/InputWithAddon.tsx b/packages/merchant-backoffice-ui/src/components/form/InputWithAddon.tsx
@@ -64,6 +64,11 @@ export function InputWithAddon<T>({
<div class="field-label is-normal">
<label class="label">
{label}
+ {required && (
+ <span class="has-text-danger" style={{marginLeft:5}}>
+ *
+ </span>
+ )}
{tooltip && (
<span class="icon has-tooltip-right" data-tooltip={tooltip}>
<i class="mdi mdi-information" />
@@ -101,11 +106,6 @@ export function InputWithAddon<T>({
value={toStr(value)}
onChange={(e): void => onChange(fromStr(e.currentTarget.value))}
/>
- {required && (
- <span class="icon has-text-danger is-right">
- <i class="mdi mdi-alert" />
- </span>
- )}
{children}
</p>
{addonAfter && (