mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 17:44:32 -04:00
Bug fixes
This commit is contained in:
parent
6a2fc89962
commit
4a3beeeae7
@ -476,7 +476,11 @@ class AccountController extends BaseController
|
|||||||
{
|
{
|
||||||
if (Auth::user()->account->isPro()) {
|
if (Auth::user()->account->isPro()) {
|
||||||
|
|
||||||
$rules = [];
|
$rules = [
|
||||||
|
'invoice_number_pattern' => 'has_counter',
|
||||||
|
'quote_number_pattern' => 'has_counter',
|
||||||
|
];
|
||||||
|
|
||||||
$user = Auth::user();
|
$user = Auth::user();
|
||||||
$iframeURL = preg_replace('/[^a-zA-Z0-9_\-\:\/\.]/', '', substr(strtolower(Input::get('iframe_url')), 0, MAX_IFRAME_URL_LENGTH));
|
$iframeURL = preg_replace('/[^a-zA-Z0-9_\-\:\/\.]/', '', substr(strtolower(Input::get('iframe_url')), 0, MAX_IFRAME_URL_LENGTH));
|
||||||
$iframeURL = rtrim($iframeURL, "/");
|
$iframeURL = rtrim($iframeURL, "/");
|
||||||
|
@ -144,6 +144,10 @@ class AppServiceProvider extends ServiceProvider {
|
|||||||
Validator::replacer('less_than', function($message, $attribute, $rule, $parameters) {
|
Validator::replacer('less_than', function($message, $attribute, $rule, $parameters) {
|
||||||
return str_replace(':value', $parameters[0], $message);
|
return str_replace(':value', $parameters[0], $message);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Validator::extend('has_counter', function($attribute, $value, $parameters) {
|
||||||
|
return !$value || strstr($value, '{$counter}');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -77,6 +77,7 @@ return array(
|
|||||||
"has_credit" => "The client does not have enough credit.",
|
"has_credit" => "The client does not have enough credit.",
|
||||||
"notmasked" => "The values are masked",
|
"notmasked" => "The values are masked",
|
||||||
"less_than" => 'The :attribute must be less than :value',
|
"less_than" => 'The :attribute must be less than :value',
|
||||||
|
"has_counter" => 'The value must contain {$counter}',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -75,7 +75,8 @@ return array(
|
|||||||
"has_credit" => "Der Kunde hat nicht genug Guthaben.",
|
"has_credit" => "Der Kunde hat nicht genug Guthaben.",
|
||||||
"notmasked" => "The values are masked",
|
"notmasked" => "The values are masked",
|
||||||
"less_than" => 'The :attribute must be less than :value',
|
"less_than" => 'The :attribute must be less than :value',
|
||||||
|
"has_counter" => 'The value must contain {$counter}',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Custom Validation Language Lines
|
| Custom Validation Language Lines
|
||||||
|
@ -73,6 +73,7 @@ return array(
|
|||||||
"has_credit" => "The client does not have enough credit.",
|
"has_credit" => "The client does not have enough credit.",
|
||||||
"notmasked" => "The values are masked",
|
"notmasked" => "The values are masked",
|
||||||
"less_than" => 'The :attribute must be less than :value',
|
"less_than" => 'The :attribute must be less than :value',
|
||||||
|
"has_counter" => 'The value must contain {$counter}',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -74,7 +74,8 @@ return array(
|
|||||||
"has_credit" => "el cliente no tiene crédito suficiente.",
|
"has_credit" => "el cliente no tiene crédito suficiente.",
|
||||||
"notmasked" => "The values are masked",
|
"notmasked" => "The values are masked",
|
||||||
"less_than" => 'The :attribute must be less than :value',
|
"less_than" => 'The :attribute must be less than :value',
|
||||||
|
"has_counter" => 'The value must contain {$counter}',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Custom Validation Language Lines
|
| Custom Validation Language Lines
|
||||||
|
@ -74,6 +74,7 @@ return array(
|
|||||||
"has_credit" => "el cliente no tiene crédito suficiente.",
|
"has_credit" => "el cliente no tiene crédito suficiente.",
|
||||||
"notmasked" => "The values are masked",
|
"notmasked" => "The values are masked",
|
||||||
"less_than" => 'The :attribute must be less than :value',
|
"less_than" => 'The :attribute must be less than :value',
|
||||||
|
"has_counter" => 'The value must contain {$counter}',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -75,6 +75,7 @@ return array(
|
|||||||
"has_credit" => "The client does not have enough credit.",
|
"has_credit" => "The client does not have enough credit.",
|
||||||
"notmasked" => "The values are masked",
|
"notmasked" => "The values are masked",
|
||||||
"less_than" => 'The :attribute must be less than :value',
|
"less_than" => 'The :attribute must be less than :value',
|
||||||
|
"has_counter" => 'The value must contain {$counter}',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -75,6 +75,7 @@ return array(
|
|||||||
"has_credit" => "Le client n'a pas un crédit suffisant.",
|
"has_credit" => "Le client n'a pas un crédit suffisant.",
|
||||||
"notmasked" => "Les valeurs sont masquées",
|
"notmasked" => "Les valeurs sont masquées",
|
||||||
"less_than" => 'The :attribute must be less than :value',
|
"less_than" => 'The :attribute must be less than :value',
|
||||||
|
"has_counter" => 'The value must contain {$counter}',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -74,6 +74,7 @@ return array(
|
|||||||
"has_credit" => "The client does not have enough credit.",
|
"has_credit" => "The client does not have enough credit.",
|
||||||
"notmasked" => "The values are masked",
|
"notmasked" => "The values are masked",
|
||||||
"less_than" => 'The :attribute must be less than :value',
|
"less_than" => 'The :attribute must be less than :value',
|
||||||
|
"has_counter" => 'The value must contain {$counter}',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -73,6 +73,7 @@ return array(
|
|||||||
"has_credit" => "Klienten har ikke høy nok kreditt.",
|
"has_credit" => "Klienten har ikke høy nok kreditt.",
|
||||||
"notmasked" => "Verdiene er skjult",
|
"notmasked" => "Verdiene er skjult",
|
||||||
"less_than" => 'The :attribute must be less than :value',
|
"less_than" => 'The :attribute must be less than :value',
|
||||||
|
"has_counter" => 'The value must contain {$counter}',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -75,6 +75,7 @@ return array(
|
|||||||
"has_credit" => "De klant heeft niet voldoende krediet.",
|
"has_credit" => "De klant heeft niet voldoende krediet.",
|
||||||
"notmasked" => "De waarden zijn verborgen",
|
"notmasked" => "De waarden zijn verborgen",
|
||||||
"less_than" => 'Het :attribute moet minder zijn dan :value',
|
"less_than" => 'Het :attribute moet minder zijn dan :value',
|
||||||
|
"has_counter" => 'The value must contain {$counter}',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -73,6 +73,7 @@ return array(
|
|||||||
"has_credit" => "O cliente não possui crédito suficiente.",
|
"has_credit" => "O cliente não possui crédito suficiente.",
|
||||||
"notmasked" => "The values are masked",
|
"notmasked" => "The values are masked",
|
||||||
"less_than" => 'The :attribute must be less than :value',
|
"less_than" => 'The :attribute must be less than :value',
|
||||||
|
"has_counter" => 'The value must contain {$counter}',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -77,6 +77,7 @@ return [
|
|||||||
"has_credit" => "The client does not have enough credit.",
|
"has_credit" => "The client does not have enough credit.",
|
||||||
"notmasked" => "The values are masked",
|
"notmasked" => "The values are masked",
|
||||||
"less_than" => 'The :attribute must be less than :value',
|
"less_than" => 'The :attribute must be less than :value',
|
||||||
|
"has_counter" => 'The value must contain {$counter}',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -241,9 +241,9 @@
|
|||||||
<ul>
|
<ul>
|
||||||
@foreach (\App\Models\Invoice::$patternFields as $field)
|
@foreach (\App\Models\Invoice::$patternFields as $field)
|
||||||
@if ($field == 'date:')
|
@if ($field == 'date:')
|
||||||
<li>$date:format ({!! link_to(PHP_DATE_FORMATS, trans('texts.see_options'), ['target' => '_blank']) !!})</li>
|
<li>{$date:format} - {!! link_to(PHP_DATE_FORMATS, trans('texts.see_options'), ['target' => '_blank']) !!}</li>
|
||||||
@else
|
@else
|
||||||
<li>${{ $field }}</li>
|
<li>{${{ $field }}}</li>
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user