@extends('layouts.default') @section('content')

Firefly Edit piggy bank "{{{$piggybank->name}}}"

Use piggy banks to save for a one-time goal.

{{Form::open(['class' => 'form-horizontal','url' => route('piggybanks.update',$piggybank->id)])}}

Mandatory fields

@if($errors->has('name'))

{{$errors->first('name')}}

@else For example: new bike, new camera @endif
{{Form::select('account_id',$accounts,Input::old('account_id') ?: $piggybank->account_id,['class' => 'form-control'])}} @if($errors->has('account_id'))

{{$errors->first('account_id')}}

@else Indicate on which account you've got your savings. @endif
{{ Form::label('targetamount', 'Target amount', ['class' => 'col-sm-4 control-label'])}}
{{Form::input('number','targetamount', Input::old('targetamount') ?: $piggybank->targetamount, ['step' => 'any', 'min' => '1', 'class' => 'form-control'])}}
@if($errors->has('targetamount'))

{{$errors->first('targetamount')}}

@else How much money do you need to save? @endif

Optional fields

{{ Form::label('startdate', 'Start date', ['class' => 'col-sm-4 control-label'])}}
@if(is_null($piggybank->startdate)) @else @endif @if($errors->has('startdate'))

{{$errors->first('startdate')}}

@else This date indicates when you start(ed) saving money for this piggy bank. This field defaults to today and you should keep it on today. @endif
{{ Form::label('targetdate', 'Target date', ['class' => 'col-sm-4 control-label'])}}
@if(is_null($piggybank->targetdate)) @else @endif @if($errors->has('targetdate'))

{{$errors->first('targetdate')}}

@else If this piggy bank has a dead line, enter it here. @endif
{{ Form::label('reminder', 'Remind you every', ['class' => 'col-sm-4 control-label'])}}
@if($errors->has('reminder'))

{{$errors->first('reminder')}}

@else Enter a number and a period and Firefly will remind you to add money to this piggy bank every now and then. @endif
{{Form::close()}} @stop @section('scripts') @stop