{{-- Name: receiver.partials.editForm Author: Arto Laine Created: 2015-09-28 Updated by: Description: receiver.partials.editForm displays an edit form for receiver.edit --}} @extends('partials.box') @section($content_id) @include('partials.bounce-stick', ['statsData' => $receiver->bounceStickData() ]) @if($receiver->isBlacklisted())
{{ Lang::get('receiver.edit.blacklisted') }}
@endif {!! Form::open(['method' => 'PUT', 'class' => 'form-horizontal', 'route' => ['receiver.update', $receiver->id]]) !!}
{!! Form::label('text', Lang::get('receiver.status'), ['class' => 'col-xs-12 control-label ']) !!}
{!! Form::select('status', array( '0' => Lang::get('receiver.form.statusActive'), '1' => Lang::get('receiver.form.statusInactive'), ), (is_null($receiver->inactivated_at)) ? '0' : '1', ['class' => 'form-control']) !!}
{!! Form::label('consent', Lang::get('receiver.form.consentStatus'), ['class' => 'col-xs-12 control-label ']) !!}
{!! Form::select('consent', !is_null($receiver->consent) ? [ 0 => Lang::get('receiver.form.consentStatusConsented'), 1 => Lang::get('receiver.form.consentStatusNotConsent') ] : [ 0 => Lang::get('receiver.form.consentStatusConsented'), 1 => Lang::get('receiver.form.consentStatusNotConsent'), 2 => Lang::get('receiver.form.consentStatusUnconsented') ], !is_null($receiver->consent) ? 0 : (!is_null($receiver->not_consent) ? 1 : 2), ['class' => 'form-control']) !!}
{{-- {!! Form::label('email', Lang::get('receiver.form.email'), ['class' => 'col-xs-12 control-label receiverfield']) !!} --}}
@if(!$receiver->complaints->isEmpty()) {{-- This receiver have complains --}} {!! Form::email('email', $receiver['email'], ['class' => 'form-control', 'id' => 'email', 'readonly' => true]) !!} @else {!! Form::email('email', $receiver['email'], ['class' => 'form-control', 'id' => 'email']) !!} @endif {!! $errors->first('email', ':message') !!} @if(session('duplicate_id', false) && $errors->has('email')) Denna mottagaren finns redan, klicka här för att gå till den @endif
{!! Form::label('phone', Lang::get('receiver.form.phone'), ['class' => 'col-xs-12 control-label receiverfield']) !!}
{!! Form::input('text','phone', $receiver['phone'], ['class' => 'form-control',]) !!} {!! $errors->first('phone', ':message') !!} @if(session('duplicate_id', false) && $errors->has('phone')) Denna mottagaren finns redan, klicka här för att gå till den @endif
@if(!empty(old('template'))) @foreach (old('template') as $prop)
@endforeach @else @foreach ($receiver_props as $prop)
@endforeach @endif

{{ Lang::get('receiver.form.whatisfields') }}

{!! Form::text('newfield', null, ['class' => 'form-control', 'maxlength' => '26', 'placeholder' => Lang::get('receiver.form.newfieldtext')]) !!} {!! $errors->first('newfield', ':message') !!}
{!! Form::button(Lang::get('receiver.form.addnewfield'), ['id' => 'newfield-btn', 'class' => 'btn']) !!}

{{ trans('receiver.lists')}}

{{ trans('receiver.receiverlistheader')}}

{!! Form::text('filter', null, ['class' => 'form-control', 'placeholder' => Lang::get('receiver.form.filterlist')]) !!}
{!! Form::button(Lang::get('receiver.form.filter'), ['class' => 'btn btn-success pull-left filterbtn']) !!}

{{-- Receiver List listing --}}
@include('receiver.partials.receiverList')

{!! Form::submit(Lang::get('receiver.form.save'), ['class' => 'btn btn-primary']) !!} {!! Form::close() !!} {!! Form::open(['class' => 'pull-right margin-left delete-form', 'route' => ['receiver.destroy', $receiver->id]]) !!} {!! Form::submit(Lang::get('receiver.delete'), ['class' => 'btn btn-danger' ,'data' => 'delete-confirm']) !!} {!! Form::close() !!}
{!! Form::close() !!} @stop @section('footer-script') @stop