{!! html()->hidden('id_allocataire', isset($allocataire_id)?$allocataire_id:null)->attributes(['id' => 'id_allocataire']) !!} @if(!$mode_frame)
{!! html()->label( 'Allocataire','id_allocataire') !!}
{!! isset($ressource->id_allocataire)?str_pad($ressource->id_allocataire, 6, "0", STR_PAD_LEFT):'' !!}
{!! html()->text('allocataire', isset($ressource->id_allocataire)?$ressource->NomCompletAllocataire:'') ->attributes([($mode=="show"?'disabled':''), 'id'=>'allocataire','class' => 'form-control']) !!}
@endif
{!! html()->label( 'Type de ressource','type_ressource') !!} {!! html()->select('type_ressource',$types_ressources,null)->placeholder('A définir') ->attributes([($mode=="show"?'disabled':''),'class' => 'form-control']) !!}
{!! html()->label( 'Source','source') !!} {!! html()->text('source', null)->attributes([($mode=="show"?'disabled':''), 'class' => 'form-control']) !!}
{!! html()->label( 'Montant','montant') !!} {!! html()->text('montant', null)->attributes([($mode=="show"?'disabled':''), 'class' => 'form-control']) !!}
{!! html()->label( 'Date de fin','date_fin') !!}
{!! html()->text('date_fin', null) ->placeholder('') ->attributes([($mode=="show"?'disabled':''),'class' => 'form-control']) !!}
{!! html()->label( 'Observations','observations') !!} {!! html()->textarea('observations', null) ->placeholder('') ->attributes([($mode=="show"?'disabled':''), 'class' => 'form-control', 'rows'=>'2']) !!}
@if($mode=="show") @if($user->hasRole("ADMINISTRATEUR") || $user->can("RES_MAJ")) @if($mode_frame) Modifier @else Modifier @endif @endif @if($ressource->IsSupprimable) @if($mode_frame) Supprimer @else {{ html()->form('DELETE', url('/ressources/'. $ressource->id))->open() }} {{ html()->form()->close() }} @endif @endif @else {!! html()->button('Enregistrer')->value('Enregistrer')->type('submit')->attributes(['class' => 'btn btn-primary']) !!} @endif @if(!$mode_frame) Retour @endif