diff --git a/app/Http/Controllers/Auth/AuthController.php b/app/Http/Controllers/Auth/AuthController.php index fe39b4aedf..fa0307685c 100644 --- a/app/Http/Controllers/Auth/AuthController.php +++ b/app/Http/Controllers/Auth/AuthController.php @@ -15,7 +15,6 @@ use Illuminate\Mail\Message; use Illuminate\Support\Facades\Lang; use Log; use Mail; -use Request as Rq; use Session; use Swift_TransportException; use Validator; @@ -143,9 +142,9 @@ class AuthController extends Controller */ public function showRegistrationForm() { - $host = Rq::getHttpHost(); + $showDemoWarning = env('SHOW_DEMO_WARNING', false); - return view('auth.register', compact('host')); + return view('auth.register', compact('showDemoWarning')); } /** diff --git a/resources/views/auth/register.twig b/resources/views/auth/register.twig index 4d7ab7394a..eafefc2609 100644 --- a/resources/views/auth/register.twig +++ b/resources/views/auth/register.twig @@ -17,7 +17,7 @@

Register a new account

- {% if host == 'geld.nder.be' or host == 'firefly.app' %} + {% if showDemoWarning %}

Please note that an account on this site will only work for one (1) month.

{% endif %} @@ -27,7 +27,7 @@
- {% if host == 'geld.nder.be' or host == 'firefly.app' %} + {% if showDemoWarning %}

You will receive an email from Firefly III. If your email address is incorrect, your account may not work.

{% endif %} diff --git a/resources/views/transactions/create.twig b/resources/views/transactions/create.twig index 8d10ff20ae..f263b38ff2 100644 --- a/resources/views/transactions/create.twig +++ b/resources/views/transactions/create.twig @@ -63,7 +63,7 @@
- {% if budgets|length > 0 %} + {% if budgets|length > 1 %} {{ ExpandedForm.select('budget_id',budgets,0) }} {% else %} {{ ExpandedForm.select('budget_id',budgets,0, {helpText: trans('firefly.no_budget_pointer')}) }}