mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-02 13:39:19 -06:00
101 lines
4.2 KiB
PHP
101 lines
4.2 KiB
PHP
@extends('layouts.default')
|
|
@section('content')
|
|
<div class="row">
|
|
<div class="col-lg-12 col-md-12 col-sm-12">
|
|
<h1>Firefly
|
|
<small>Create an envelope for a budget</small>
|
|
</h1>
|
|
<p class="text-info">
|
|
Firefly uses an "<a href="http://en.wikipedia.org/wiki/Envelope_System" class="text-success">envelope
|
|
system</a>" for your budgets, which means that for each period of time (for example a month) a virtual
|
|
"envelope" can be created containing a certain amount of money. Money spent within a budget is removed from
|
|
the envelope.
|
|
</p>
|
|
|
|
<p class="text-info">
|
|
Firefly gives you the opportunity to create such an envelope when you create a budget. However, you can
|
|
always add more of them.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
{{Form::open(['class' => 'form-horizontal','url' => route('budgets.limits.store',$prefilled['budget_id'])])}}
|
|
{{Form::hidden('from',e(Input::get('from')))}}
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-lg-6 col-md-12 col-sm-6">
|
|
<h4>Mandatory fields</h4>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('budget_id', 'Budget', ['class' => 'col-sm-4 control-label'])}}
|
|
<div class="col-sm-8">
|
|
{{Form::select('budget_id',$budgets,Input::old('budget_id') ?: $prefilled['budget_id'], ['class' =>
|
|
'form-control'])}}
|
|
@if($errors->has('budget_id'))
|
|
<p class="text-danger">{{$errors->first('name')}}</p>
|
|
@else
|
|
<span class="help-block">Select one of your existing budgets.</span>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('startdate', 'Start date', ['class' => 'col-sm-4 control-label'])}}
|
|
<div class="col-sm-8">
|
|
<input type="date" name="startdate" value="{{Input::old('startdate') ?: $prefilled['startdate']}}"
|
|
class="form-control"/>
|
|
<span class="help-block">This date indicates when the envelope "starts". The date you select
|
|
here will correct itself to the nearest [period] you select below.</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="period" class="col-sm-4 control-label">Spending period</label>
|
|
|
|
<div class="col-sm-8">
|
|
{{Form::select('period',$periods,Input::old('period') ?: $prefilled['repeat_freq'],['class' => 'form-control'])}}
|
|
<span class="help-block">How long will the envelope last? A week, a month, or even longer?</span>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="period" class="col-sm-4 control-label">Repeat</label>
|
|
|
|
<div class="col-sm-8">
|
|
<div class="checkbox">
|
|
<label>
|
|
<input type="checkbox" value="1" name="repeats" @if(intval(Input::old('repeats')) == 1) checked @endif>
|
|
Repeat
|
|
</label>
|
|
</div>
|
|
<span class="help-block">If you want, Firefly can automatically recreate the "envelope" and fill it again
|
|
when the timespan above has expired. Be careful with this option though. It makes it easier
|
|
to <a href="http://en.wikipedia.org/wiki/Personal_budget#Concepts">fall back to old habits</a>.
|
|
Instead, you should recreate the envelope yourself each [period].</span>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('amount', 'Amount', ['class' => 'col-sm-4 control-label'])}}
|
|
<div class="col-sm-8">
|
|
<input type="number" value="{{Input::old('amount')}}" name="amount" min="0.01" step="any" class="form-control"/>
|
|
<span class="help-block">Of course, there needs to be money in the envelope.</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
{{ Form::label('submit', ' ', ['class' => 'col-sm-4 control-label'])}}
|
|
<div class="col-sm-8">
|
|
<input type="submit" name="submit" value="Save new envelope" class="btn btn-success"/>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
{{Form::close()}}
|
|
|
|
|
|
@stop |