@if(!$mode_frame)
{!! html()->label( 'Allocataire','id_allocataire') !!}
{!! isset($document->id_allocataire)?str_pad($document->id_allocataire, 6, "0", STR_PAD_LEFT):'' !!}
{!! html()->text('allocataire', isset($document->id_allocataire)?$document->NomCompletAllocataire:'') ->attributes([($mode=="show"?'disabled':''), 'id'=>'allocataire','class' => 'form-control']) !!}
@endif
{!! html()->label( 'Type de Document','type') !!} {!! html()->select('type',$types_documents,null)->placeholder('A définir')->attributes([($mode=="show"?'disabled':''),'class' => 'form-control']) !!}
{!! html()->label( 'Date','date') !!}
{!! html()->text('date', date('d/m/Y'))->placeholder('') ->attributes([($mode=="show"?'disabled':''),'class' => 'form-control','style' => 'text-align:center']) !!}
@if($mode=="show")
Cliquer pour voir le fichier
@endif
@if($mode=="create")
{!! html()->file('doc_file')->attributes(['id'=>'doc_file','name'=>'doc_file','class'=>'form-control-file','style'=>'visibility:hidden','accept'=>'.jpg,.png,.pdf']) !!} {!! html()->label(' + Ajouter le fichier','doc_file')->attributes(['id'=>'btn_file','class'=>'btn btn-md btn-info','title'=>'Choisir le document .jpg,.png,.pdf (4Mo maxi)']) !!}
@endif
{!! html()->label( 'Description','description') !!} {!! html()->textarea('description', null) ->placeholder('') ->attributes([($mode=="show"?'disabled':''), 'class' => 'form-control', 'rows'=>'2']) !!}
@if($mode=="show") @if($user->hasRole("ADMINISTRATEUR") || $user->can("DOC_MAJ")) @if($mode_frame) Modifier @else Modifier @endif @endif @if($mode_frame) Supprimer @else {{ html()->form('DELETE', url('/documents/'. $document->id))->open() }} {{ html()->form()->close() }} @endif @else {!! html()->button('Enregistrer')->value('Enregistrer')->type('submit')->attributes(['class' => 'btn btn-primary']) !!} @endif @if(!$mode_frame) Retour @endif