mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 10:24:31 -04:00
Update frontend validation to use translations
This commit is contained in:
parent
cb38a366d4
commit
8b9d0b9762
6
resources/js/clients/payments/stripe-sepa.js
vendored
6
resources/js/clients/payments/stripe-sepa.js
vendored
@ -109,21 +109,21 @@ class ProcessSEPA {
|
|||||||
|
|
||||||
if (document.getElementById('sepa-name').value === "") {
|
if (document.getElementById('sepa-name').value === "") {
|
||||||
document.getElementById('sepa-name').focus();
|
document.getElementById('sepa-name').focus();
|
||||||
errors.textContent = "Name required.";
|
errors.textContent = document.querySelector('meta[name=translation-name-required]').content;
|
||||||
errors.hidden = false;
|
errors.hidden = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (document.getElementById('sepa-email-address').value === "") {
|
if (document.getElementById('sepa-email-address').value === "") {
|
||||||
document.getElementById('sepa-email-address').focus();
|
document.getElementById('sepa-email-address').focus();
|
||||||
errors.textContent = "Email required.";
|
errors.textContent = document.querySelector('meta[name=translation-email-required]').content;
|
||||||
errors.hidden = false;
|
errors.hidden = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!document.getElementById('sepa-mandate-acceptance').checked) {
|
if (!document.getElementById('sepa-mandate-acceptance').checked) {
|
||||||
errors.textContent = "Accept Terms";
|
errors.textContent = document.querySelector('meta[name=translation-terms-required]').content;
|
||||||
errors.hidden = false;
|
errors.hidden = false;
|
||||||
console.log("Terms");
|
console.log("Terms");
|
||||||
return;
|
return;
|
||||||
|
@ -4325,6 +4325,7 @@ $LANG = array(
|
|||||||
'giropay' => 'GiroPay',
|
'giropay' => 'GiroPay',
|
||||||
'giropay_law' => 'By entering your Customer information (such as name, sort code and account number) you (the Customer) agree that this information is given voluntarily.',
|
'giropay_law' => 'By entering your Customer information (such as name, sort code and account number) you (the Customer) agree that this information is given voluntarily.',
|
||||||
'eps' => 'EPS',
|
'eps' => 'EPS',
|
||||||
|
'you_need_to_accept_the_terms_before_proceeding' => 'You need to accept the terms before proceeding.',
|
||||||
);
|
);
|
||||||
|
|
||||||
return $LANG;
|
return $LANG;
|
||||||
|
@ -8,6 +8,10 @@
|
|||||||
<meta name="customer" content="{{ $customer }}">
|
<meta name="customer" content="{{ $customer }}">
|
||||||
<meta name="pi-client-secret" content="{{ $pi_client_secret }}">
|
<meta name="pi-client-secret" content="{{ $pi_client_secret }}">
|
||||||
<meta name="si-client-secret" content="{{ $si_client_secret ?? '' }}">
|
<meta name="si-client-secret" content="{{ $si_client_secret ?? '' }}">
|
||||||
|
|
||||||
|
<meta name="translation-name-required" content="{{ ctrans('texts.missing_account_holder_name') }}">
|
||||||
|
<meta name="translation-email-required" content="{{ ctrans('texts.provide_email') }}">
|
||||||
|
<meta name="translation-terms-required" content="{{ ctrans('texts.you_need_to_accept_the_terms_before_proceeding') }}">
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('gateway_content')
|
@section('gateway_content')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user