Various updates [skip ci]

This commit is contained in:
James Cole
2014-07-30 22:31:35 +02:00
parent 00a767cfc9
commit 78d575fbb1
13 changed files with 411 additions and 263 deletions

View File

@@ -19,16 +19,18 @@
</div>
</div>
{{Form::open(['class' => 'form-horizontal','url' => route('budgets.limits.store')])}}
{{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-3 control-label'])}}
<div class="col-sm-9">
{{Form::select('budget_id',$budgets,Input::old('budget_id') ?: $budget_id, ['class' =>
{{ 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>
@@ -39,8 +41,8 @@
</div>
<div class="form-group">
{{ Form::label('startdate', 'Start date', ['class' => 'col-sm-3 control-label'])}}
<div class="col-sm-9">
{{ 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
@@ -49,17 +51,17 @@
</div>
<div class="form-group">
<label for="period" class="col-sm-3 control-label">Spending period</label>
<label for="period" class="col-sm-4 control-label">Spending period</label>
<div class="col-sm-9">
<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-3 control-label">Repeat</label>
<label for="period" class="col-sm-4 control-label">Repeat</label>
<div class="col-sm-9">
<div class="col-sm-8">
<div class="checkbox">
<label>
<input type="checkbox" value="1" name="repeats" @if(intval(Input::old('repeats')) == 1) checked @endif>
@@ -75,17 +77,17 @@
<div class="form-group">
{{ Form::label('amount', 'Amount', ['class' => 'col-sm-3 control-label'])}}
<div class="col-sm-9">
{{ 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', '&nbsp;', ['class' => 'col-sm-3 control-label'])}}
<div class="col-sm-9">
<input type="submit" name="submit" value="Save new limit" class="btn btn-default"/>
{{ Form::label('submit', '&nbsp;', ['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>
@@ -93,11 +95,7 @@
</div>
</div>
{{Form::open()}}
{{Form::close()}}
@stop
@section('scripts')
<script type="text/javascript" src="assets/javascript/moment.min.js"></script>
<script type="text/javascript" src="assets/javascript/limits.js"></script>
@stop