mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
display legal agreement
This commit is contained in:
parent
66c205d0ed
commit
a20be8ecb2
18
app/frontend/src/javascript/components/html-translate.tsx
Normal file
18
app/frontend/src/javascript/components/html-translate.tsx
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* This component renders a translation with some HTML content.
|
||||||
|
*/
|
||||||
|
import React from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
|
interface HtmlTranslateProps {
|
||||||
|
trKey: string,
|
||||||
|
options?: any
|
||||||
|
}
|
||||||
|
|
||||||
|
export const HtmlTranslate: React.FC<HtmlTranslateProps> = ({ trKey, options }) => {
|
||||||
|
const { t } = useTranslation(trKey?.split('.')[1]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<span dangerouslySetInnerHTML={{__html: t(trKey, options)}} />
|
||||||
|
);
|
||||||
|
}
|
@ -26,6 +26,7 @@ import visaLogo from '../../../images/visa.png';
|
|||||||
import { CartItems, PaymentConfirmation } from '../models/payment';
|
import { CartItems, PaymentConfirmation } from '../models/payment';
|
||||||
import WalletAPI from '../api/wallet';
|
import WalletAPI from '../api/wallet';
|
||||||
import PriceAPI from '../api/price';
|
import PriceAPI from '../api/price';
|
||||||
|
import { HtmlTranslate } from './html-translate';
|
||||||
|
|
||||||
declare var Application: IApplication;
|
declare var Application: IApplication;
|
||||||
declare var Fablab: IFablab;
|
declare var Fablab: IFablab;
|
||||||
@ -193,8 +194,7 @@ const StripeModal: React.FC<StripeModalProps> = ({ isOpen, toggleModal, afterSuc
|
|||||||
</label>
|
</label>
|
||||||
</div>}
|
</div>}
|
||||||
{isPaymentSchedule() && <div className="payment-schedule-info">
|
{isPaymentSchedule() && <div className="payment-schedule-info">
|
||||||
<i className="fa fa-warning" />
|
<HtmlTranslate trKey="app.shared.stripe.payment_schedule_html" options={{ DEADLINES: schedule.items.length }} />
|
||||||
<p>{ t('app.shared.stripe.payment_schedule', { DEADLINES: schedule.items.length }) }</p>
|
|
||||||
</div>}
|
</div>}
|
||||||
</StripeForm>
|
</StripeForm>
|
||||||
{!submitState && <button type="submit"
|
{!submitState && <button type="submit"
|
||||||
|
@ -48,11 +48,9 @@
|
|||||||
background-color: #fcf8e3;
|
background-color: #fcf8e3;
|
||||||
color: #8a6d3b;
|
color: #8a6d3b;
|
||||||
|
|
||||||
.fa.fa-warning {
|
|
||||||
margin-right: 0.5em;
|
|
||||||
}
|
|
||||||
p {
|
p {
|
||||||
display: inline;
|
font-size: small;
|
||||||
|
margin-bottom: 0.5em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.validate-btn {
|
.validate-btn {
|
||||||
|
Loading…
Reference in New Issue
Block a user