mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
DRYed out
This commit is contained in:
parent
d30da7bf5d
commit
a1896a6336
@ -369,7 +369,8 @@ class SingleController extends Controller
|
|||||||
|
|
||||||
event(new StoredTransactionJournal($journal, $data['piggy_bank_id']));
|
event(new StoredTransactionJournal($journal, $data['piggy_bank_id']));
|
||||||
|
|
||||||
session()->flash('success_uri', (string)trans('firefly.stored_journal', ['description' => "<a href='/transactions/show/{$journal->id}'>{$journal->description}</a>"]));
|
session()->flash('success_uri', route('transactions.show', [$journal->id]));
|
||||||
|
session()->flash('success', (string)trans('firefly.stored_journal', ['description' => $journal->description]));
|
||||||
app('preferences')->mark();
|
app('preferences')->mark();
|
||||||
|
|
||||||
// @codeCoverageIgnoreStart
|
// @codeCoverageIgnoreStart
|
||||||
|
@ -14,17 +14,17 @@
|
|||||||
<button type="button" class="close" data-dismiss="alert">
|
<button type="button" class="close" data-dismiss="alert">
|
||||||
<span>×</span><span class="sr-only">{{ 'close'|_ }}</span>
|
<span>×</span><span class="sr-only">{{ 'close'|_ }}</span>
|
||||||
</button>
|
</button>
|
||||||
<strong>{{ 'flash_success'|_ }}</strong> {{ session('success') }}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{# SUCCESS MESSAGE WITH URL (ALWAYS SINGULAR) #}
|
{% if session_has('success_uri') %}
|
||||||
{% if session_has('success_uri') %}
|
<a href="{{ session('success_uri') }}">
|
||||||
<div class="alert alert-success alert-dismissible" role="alert">
|
{% endif %}
|
||||||
<button type="button" class="close" data-dismiss="alert">
|
|
||||||
<span>×</span><span class="sr-only">{{ 'close'|_ }}</span>
|
<strong>{{ 'flash_success'|_ }}</strong> {{ session('success') }}
|
||||||
</button>
|
|
||||||
<strong>{{ 'flash_success'|_ }}</strong> {{ session('success_uri') | striptags('<a>') | raw }}
|
{% if session_has('success_uri') %}
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user