2026-03-30 14:17:31 +02:00
|
|
|
// * Other
|
|
|
|
|
import BtnOptionnalLinkWithTooltip from "@/back/Components/BtnOptionnalLinkWithTooltip";
|
|
|
|
|
import str from "@/hooks/use-string";
|
2026-10-19 17:43:33 +02:00
|
|
|
import trans from "@/hooks/use-translations";
|
2026-03-30 14:17:31 +02:00
|
|
|
|
|
|
|
|
function SubmitButton({
|
|
|
|
|
isInDialog = false,
|
|
|
|
|
modelTrans,
|
2026-10-19 17:43:33 +02:00
|
|
|
}: Readonly<{
|
2026-03-30 14:17:31 +02:00
|
|
|
isInDialog?: boolean;
|
|
|
|
|
modelTrans: string;
|
2026-10-19 17:43:33 +02:00
|
|
|
}>) {
|
2026-03-30 14:17:31 +02:00
|
|
|
return (
|
|
|
|
|
<BtnOptionnalLinkWithTooltip
|
2026-10-19 17:43:33 +02:00
|
|
|
content={str(trans("uwil-backend::crud.actions.save")).ucFirst().value()}
|
|
|
|
|
tooltipContent={trans("uwil-backend::crud.helpers.save_model", {
|
2026-03-30 14:17:31 +02:00
|
|
|
params: {
|
|
|
|
|
model: modelTrans,
|
|
|
|
|
},
|
|
|
|
|
})}
|
|
|
|
|
type={isInDialog ? "button" : "submit"}
|
|
|
|
|
size="default"
|
|
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default SubmitButton;
|