Skip to content

Firefly III: a personal finances manager

Better demo warning and budget indication.

James Cole8bcc319b7dd7
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 @@
<div class="register-box-body">
<p class="login-box-msg">Register a new account</p>
- {% if host == 'geld.nder.be' or host == 'firefly.app' %}
+ {% if showDemoWarning %}
<p class="text-info login-box-msg">Please note that an account on this site will only
work for one (1) month.</p>
{% endif %}
@@ -27,7 +27,7 @@
<div class="form-group has-feedback">
<input type="email" name="email" class="form-control" placeholder="Email"/>
- {% if host == 'geld.nder.be' or host == 'firefly.app' %}
+ {% if showDemoWarning %}
<p class="help-block">You will receive an email from Firefly III. If your email address
is incorrect, your account may not work.</p>
{% 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 @@
</div>
<div class="box-body">
<!-- BUDGET ONLY WHEN CREATING A WITHDRAWAL -->
- {% 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')}) }}