mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
This commit is contained in:
@@ -31,6 +31,7 @@ use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\View\View;
|
||||
|
||||
/**
|
||||
@@ -106,6 +107,7 @@ class ForgotPasswordController extends Controller
|
||||
}
|
||||
$host = request()->host();
|
||||
if ($configuredHost !== $host) {
|
||||
Log::error(sprintf('Host header is "%s", APP_URL is "%s".', $host, $configuredHost));
|
||||
throw new FireflyException('The Host-header does not match the host in the APP_URL environment variable. Please make sure these match. See also: https://bit.ly/FF3-host-header');
|
||||
}
|
||||
}
|
||||
|
@@ -49,6 +49,7 @@ class Translation extends AbstractExtension
|
||||
{
|
||||
return [
|
||||
$this->journalLinkTranslation(),
|
||||
$this->laravelTranslation(),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -68,4 +69,19 @@ class Translation extends AbstractExtension
|
||||
['is_safe' => ['html']]
|
||||
);
|
||||
}
|
||||
|
||||
public function laravelTranslation(): TwigFunction
|
||||
{
|
||||
return new TwigFunction(
|
||||
'__',
|
||||
static function (string $key) {
|
||||
$translation = trans($key);
|
||||
if ($key === $translation) {
|
||||
return $key;
|
||||
}
|
||||
|
||||
return $translation;
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
35
resources/views/partials/password-modal-twig.twig
Normal file
35
resources/views/partials/password-modal-twig.twig
Normal file
@@ -0,0 +1,35 @@
|
||||
<div class="modal fade" id="passwordModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">
|
||||
{{ __('firefly.secure_pw_title') }}
|
||||
</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ __('firefly.close') }}"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
{{ __('firefly.secure_pw_history') }}
|
||||
</p>
|
||||
<p>
|
||||
{{ __('firefly.secure_pw_ff') }}
|
||||
</p>
|
||||
<p>
|
||||
{{ __('firefly.secure_pw_check_box') }}
|
||||
</p>
|
||||
|
||||
<h4>{{ __('firefly.secure_pw_working_title') }}</h4>
|
||||
<p>
|
||||
{{ __('firefly.secure_pw_working')|raw }}
|
||||
</p>
|
||||
<h4>{{ __('firefly.secure_pw_should') }}</h4>
|
||||
<p>
|
||||
{{ __('firefly.secure_pw_long_password') }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ __('firefly.close') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -65,5 +65,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% include 'partials.password-modal' %}
|
||||
{% include 'partials.password-modal-twig' %}
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user