
<div class="form-group row">
    <div class="col-md-5">
        {!! html()->label('Nom','nom') !!}
        {!! html()->text('nom', null)->attributes([($mode=="show"?'disabled':''),'placeholder' => 'Dénomination de la filière', 'class' => 'form-control']) !!}
    </div>
</div>

<div class="row">
    <div class="col-md-5">
        <div class="form-group">
        {!! html()->label('Catégorie de la filière', 'id_filiere_categorie') !!}
        {!! html()->select('id_filiere_categorie')->options($categories)->value(isset($filiere)?$filiere->id_filiere_categorie:'')
            ->placeholder('A définir')
            ->attributes([($mode=="show"?'disabled':''),'class' => 'form-control'])  !!}
        </div>
    </div>
</div>

<div class='form-group '>
    @if($mode!='show')
        {!! html()->button('Enregistrer')->value('Enregistrer')->type('submit')->attributes(['class' => 'btn btn-primary']) !!}
    @else
        @if($user->hasRole("ADMINISTRATEUR") || $user->can("modifier filieres"))
            <a class="btn btn-primary"  href="{!! url('filieres/'.$filiere->id.'/edit') !!}">Modifier</a>
        @endif
    @endif
    @if($mode=='show')
        <a class="btn btn-warning"  href="{!! url('filieres') !!}">Retour</a>
    @else
        <a class="btn btn-danger"  href="{!! url('filieres') !!}">Annuler</a>
    @endif
</div>
