@extends('layouts.master') @section('title') {{trans_choice('general.edit',1)}} {{trans_choice('general.pledge',1)}} @endsection @section('content')

{{trans_choice('general.edit',1)}} {{trans_choice('general.pledge',1)}}

{!! Form::open(array('url' => url('pledge/'.$pledge->id.'/update'), 'method' => 'post','class'=>'', 'name' => 'form',"enctype"=>"multipart/form-data")) !!}

{{trans_choice('general.required',1)}} {{trans_choice('general.field',2)}}

{!! Form::label('branch_id',trans_choice('general.branch',1),array('class'=>' control-label')) !!} {!! Form::select('branch_id',$branches,$pledge->branch_id, array('class' => 'form-control select2','placeholder'=>'','required'=>'required','id'=>'contribution_batch_id')) !!}
{!! Form::label('member_id',trans_choice('general.member',1),array('class'=>' control-label')) !!} {!! Form::select('member_id',$members,$pledge->member_id, array('class' => 'form-control','required'=>'required')) !!}
{!! Form::label('campaign_id',trans_choice('general.campaign',1),array('class'=>' control-label')) !!} {!! Form::select('campaign_id',$campaigns,$pledge->campaign_id, array('class' => 'form-control select2','required'=>'required','placeholder'=>'')) !!}
{!! Form::label('amount',trans_choice('general.expense',1).' '.trans_choice('general.amount',1),array('class'=>'')) !!} {!! Form::text('amount',$pledge->amount, array('class' => 'form-control touchspin', 'placeholder'=>"",'required'=>'required')) !!}
{!! Form::label('date',trans_choice('general.date',1),array('class'=>'')) !!} {!! Form::text('date',$pledge->date, array('class' => 'form-control date-picker', 'placeholder'=>"",'required'=>'required')) !!}

{{trans_choice('general.optional',1)}} {{trans_choice('general.field',2)}}

{!! Form::label('Recurring',trans_choice('general.recurring',1),array('class'=>'active')) !!} {!! Form::select('recurring', array('1'=>trans_choice('general.yes',1),'0'=>trans_choice('general.no',1)),$pledge->recurring, array('class' => 'form-control','id'=>'recurring')) !!}
{!! Form::label('recur_frequency',trans_choice('general.recur_frequency',1),array('class'=>'')) !!} {!! Form::number('recur_frequency',$pledge->recur_frequency, array('class' => 'form-control','id'=>'recurF')) !!}
{!! Form::label('recur_type',trans_choice('general.recur_type',1),array('class'=>'active')) !!} {!! Form::select('recur_type', array('day'=>'Day(s)','week'=>'Week(s)','month'=>'Month(s)','year'=>'Year(s)'),$pledge->recur_type, array('class' => 'form-control','id'=>'recurT')) !!}
{!! Form::label('recur_start_date',trans_choice('general.recur_starts',1),array('class'=>'')) !!} {!! Form::text('recur_start_date',$pledge->recur_start_date, array('class' => 'form-control date-picker','id'=>'recur_start_date')) !!}
{!! Form::label('recur_end_date',trans_choice('general.recur_ends',1),array('class'=>'')) !!} {!! Form::text('recur_end_date',$pledge->recur_end_date, array('class' => 'form-control date-picker','id'=>'recur_end_date')) !!}

{!! Form::label('notes',trans_choice('general.description',1),array('class'=>'')) !!} {!! Form::textarea('notes',$pledge->notes, array('class' => 'form-control')) !!}

{{trans_choice('general.custom_field',2)}}

@foreach($custom_fields as $key)
{!! Form::label($key->id,$key->name,array('class'=>'')) !!} @if($key->field_type=="number") required==1) required @endif value="@if(!empty(\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$pledge->id)->where('category','expenses')->first())){{\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$pledge->id)->where('category','expenses')->first()->name}} @endif"> @endif @if($key->field_type=="textfield") required==1) required @endif value="@if(!empty(\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$pledge->id)->where('category','expenses')->first())){{\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$pledge->id)->where('category','expenses')->first()->name}} @endif"> @endif @if($key->field_type=="date") required==1) required @endif value="@if(!empty(\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$pledge->id)->where('category','expenses')->first())){{\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$pledge->id)->where('category','expenses')->first()->name}} @endif"> @endif @if($key->field_type=="textarea") @endif @if($key->field_type=="decimal") required==1) required @endif value="@if(!empty(\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$pledge->id)->where('category','expenses')->first())){{\App\Models\CustomFieldMeta::where('custom_field_id',$key->id)->where('parent_id',$pledge->id)->where('category','expenses')->first()->name}} @endif"> @endif
@endforeach

Click here to add custom fields on this page

{!! Form::close() !!}
@endsection @section('footer-scripts') @endsection