Skip to content

Firefly III: a personal finances manager

Various layout updates and tiny upgrade fixes [skip ci]

James Coleaac0c9ab9899
diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php
index 4347728d38..891785c676 100755
--- a/app/Http/Controllers/Auth/LoginController.php
+++ b/app/Http/Controllers/Auth/LoginController.php
@@ -104,7 +104,7 @@ class LoginController extends Controller
*
* @return \Illuminate\Http\Response
*/
- public function showLoginForm()
+ public function showLoginForm(Request $request)
{
// is allowed to?
$singleUserMode = FireflyConfig::get('single_user_mode', Config::get('firefly.configuration.single_user_mode'))->data;
@@ -114,7 +114,10 @@ class LoginController extends Controller
$allowRegistration = false;
}
- return view('auth.login', compact('allowRegistration'));
+ $email = $request->old('email');
+ $remember = $request->old('remember');
+
+ return view('auth.login', compact('allowRegistration', 'email', 'remember'));
}
/**
diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php
index fd82eb0588..73b9b0edcf 100755
--- a/app/Http/Controllers/Auth/RegisterController.php
+++ b/app/Http/Controllers/Auth/RegisterController.php
@@ -109,7 +109,7 @@ class RegisterController extends Controller
*
* @return \Illuminate\Http\Response
*/
- public function showRegistrationForm()
+ public function showRegistrationForm(Request $request)
{
// TODO move to FireflyConfig
$showDemoWarning = env('SHOW_DEMO_WARNING', false);
@@ -123,7 +123,9 @@ class RegisterController extends Controller
return view('error', compact('message'));
}
- return view('auth.register', compact('showDemoWarning'));
+ $email = $request->old('email');
+
+ return view('auth.register', compact('showDemoWarning', 'email'));
}
/**
diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.php
index aee6e0e42c..eef4b62769 100644
--- a/app/Repositories/Bill/BillRepository.php
+++ b/app/Repositories/Bill/BillRepository.php
@@ -173,6 +173,22 @@ class BillRepository implements BillRepositoryInterface
*/
public function getBillsForAccounts(Collection $accounts): Collection
{
+ $fields = ['bills.id',
+ 'bills.created_at',
+ 'bills.updated_at',
+ 'bills.deleted_at',
+ 'bills.user_id',
+ 'bills.name',
+ 'bills.match',
+ 'bills.amount_min',
+ 'bills.amount_max',
+ 'bills.date',
+ 'bills.repeat_freq',
+ 'bills.skip',
+ 'bills.automatch',
+ 'bills.active',
+ 'bills.name_encrypted',
+ 'bills.match_encrypted'];
$ids = $accounts->pluck('id')->toArray();
$set = $this->user->bills()
->leftJoin(
@@ -187,8 +203,8 @@ class BillRepository implements BillRepositoryInterface
)
->whereIn('transactions.account_id', $ids)
->whereNull('transaction_journals.deleted_at')
- ->groupBy('bills.id')
- ->get(['bills.*']);
+ ->groupBy($fields)
+ ->get($fields);
$set = $set->sortBy(
function (Bill $bill) {
diff --git a/public/js/ff/import/status.js b/public/js/ff/import/status.js
index 4ffd4c3bb5..2084858131 100644
--- a/public/js/ff/import/status.js
+++ b/public/js/ff/import/status.js
@@ -29,7 +29,7 @@ $(function () {
function checkImportStatus() {
"use strict";
console.log('checkImportStatus()');
- $.getJSON(jobImportUrl).success(reportOnJobImport).fail(failedJobImport);
+ $.getJSON(jobImportUrl).done(reportOnJobImport).fail(failedJobImport);
}
function importComplete(data) {
diff --git a/public/js/ff/reports/default/all.js b/public/js/ff/reports/default/all.js
index 357c91b7d6..30810842eb 100644
--- a/public/js/ff/reports/default/all.js
+++ b/public/js/ff/reports/default/all.js
@@ -34,7 +34,7 @@ function clickInfoButton(e) {
attributes.reportType = reportType;
attributes.accounts = accountIds;
- $.getJSON('popup/report', {attributes: attributes}).success(respondInfoButton).fail(errorInfoButton);
+ $.getJSON('popup/report', {attributes: attributes}).done(respondInfoButton).fail(errorInfoButton);
}
function errorInfoButton(data) {
diff --git a/resources/views/auth/login.twig b/resources/views/auth/login.twig
index 24a4accb89..435870685a 100644
--- a/resources/views/auth/login.twig
+++ b/resources/views/auth/login.twig
@@ -33,7 +33,7 @@
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
<div class="form-group has-feedback">
- <input type="email" name="email" class="form-control" placeholder="Email"/>
+ <input type="email" name="email" value="{{ email }}" class="form-control" placeholder="Email"/>
</div>
<div class="form-group has-feedback">
<input type="password" name="password" class="form-control" placeholder="Password"/>
@@ -42,7 +42,7 @@
<div class="col-xs-8">
<div class="checkbox">
<label>
- <input type="checkbox" name="remember" value="1"> Remember Me
+ <input type="checkbox" name="remember" {% if remember %}checked="checked"{% endif %} value="1"> Remember Me
</label>
</div>
</div>
diff --git a/resources/views/auth/register.twig b/resources/views/auth/register.twig
index eafefc2609..e627e6691d 100644
--- a/resources/views/auth/register.twig
+++ b/resources/views/auth/register.twig
@@ -26,7 +26,7 @@
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<div class="form-group has-feedback">
- <input type="email" name="email" class="form-control" placeholder="Email"/>
+ <input type="email" name="email" value="{{ email }}"class="form-control" placeholder="Email"/>
{% 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>