<div class="box-body">
    <div class="form-group">
        <label for="name">Nom de l'entreprise</label>
        {{ Form::text('name', null, ['class' => 'form-control', 'placeholder' => '', 'readonly' => 'readonly'])  }}
    </div>

    <div class="form-group">
        <div class="row">
            <div class="col-md-6">
                <label for="mobile">Forme social</label>
                {{ Form::select('company_forme_social', [
                    'individuelle' => 'Entreprise individuelle',
                    'eurl'  => 'EURL',
                    'sarl'  => 'SARL',
                    'snc'   => 'SNC',
                    // 'scs'   => 'SCS',
                    // 'scpa'  => 'SCPA'
                ] ,null, ['class' => 'form-control', 'placeholder' => 'Séléctionnez une forme social...'])  }}
                
            </div>
            <div class="col-md-6">
                <label for="mobile">Taille de l'entreprise</label>
                {{ Form::select('company_size', [
                    '-10' => 'Mois de 10 salariés',
                    '10-20'  => 'Entre 10 et 20 salariés',
                    '20-50'  => 'Entre 20 et 50 salariés',
                    '50-100'  => 'Entre 50 et 100 salariés',
                    '+100'   => 'Plus de 100 salariés',
                ] ,null, ['class' => 'form-control', 'placeholder' => 'Séléctionnez le nombre de salariés'])  }}
            </div>
        </div>
    </div>
    <div class="form-group">
        {{-- <label for="name">Le groupe</label> --}}
        <div class="radio">
            <label>
                <input type="radio" name="optionsGroupe" value="ultime" {{ !isset($company->groupe)?"checked":'' }}>
                Entreprise ultime
            </label>
        </div>
        <div class="radio">
            <label>
                <input type="radio" name="optionsGroupe" value="filiale" {{ isset($company->groupe)?"checked":'' }}>
                Filiale
            </label>
        </div>
        <div id="container_groupes" @if(!isset($company->groupe)) style="display:none;" @endif>
            {{ Form::select('groupe_id',
            $companies ,
            null,
            [
                'class' => 'form-control select2',
                'placeholder' => 'Sélectionnez une entreprise...',
                'required' => isset($company->groupe),
                'id' => 'groupe_id'
            ])
        }}
        </div>
    </div>
    <div class="form-group">
        <label for="description">Qui sommes-nous ?</label>
        {{ Form::textarea('description', null, ['class' => 'form-control', 'placeholder' => 'Qui sommes-nous ?', 'rows' => 5, 'required' => 'required',  'maxlength' => 500])  }}
        <p class="help-block">500 caractère maximum</p>
    </div>

    {{-- <div class="form-group">
        <label for="values">Nos valeurs</label>
        {{ Form::textarea('values', null, ['class' => 'form-control', 'placeholder' => 'Nos valeurs', 'rows' => 10, 'required' => 'required'])  }}
    </div> --}}
    <div class="form-group">
        <label for="values">Logo</label>
        @if(isset($company->image) && !empty($company->image))
            <div>
                <img src="{{ asset('storage/companies/'.$company->id.'/'.$company->image) }}" class="" style="max-width: 300px">
            </div>
            <br>
        @endif
        {{ Form::file('image', null, ['class' => 'form-control'])  }}
        <p class="help-block">Pour modifier le logo sélectionnez un autre</p>
    </div>

    <div class="form-group">
        <div class="row">
            <div class="col-md-6">
                <label for="phone">Prénom contact</label>
                {{ Form::text('prenom', null, ['class' => 'form-control', 'placeholder' => 'Prénom contact'])  }}
            </div>
            <div class="col-md-6">
                <label for="mobile">Nom contact</label>
                {{ Form::text('nom', null, ['class' => 'form-control', 'placeholder' => 'Nom contact'])  }}
            </div>
            <div class="col-md-6">
                <label for="mobile">Fonction du contact</label>
                {{ Form::text('contact_fonction', null, ['class' => 'form-control', 'placeholder' => 'Fonction du contact'])  }}
            </div>
            <div class="col-md-6">
                <label for="mobile">Email du contact</label>
                {{ Form::text('contact_email', null, ['class' => 'form-control', 'placeholder' => 'Email du contact'])  }}
            </div>
        </div>
    </div>

    <div class="form-group">
        <label for="email">Email de l'entreprise</label>
        {{ Form::text('email', null, ['class' => 'form-control', 'placeholder' => '', 'readonly'])  }}
    </div>
    <div class="form-group">
        <label for="email">Site Web</label>
        {{ Form::text('site', null, ['class' => 'form-control', 'placeholder' => ''])  }}
    </div>
    <div class="form-group">
        <div class="row">
            <div class="col-md-6">
                <label for="phone">Téléphone</label>
                {{ Form::text('phone', null, ['class' => 'form-control', 'placeholder' => 'Téléphone'])  }}
            </div>
            <div class="col-md-6">
                <label for="fax">Fax</label>
                {{ Form::text('fax', null, ['class' => 'form-control', 'placeholder' => 'Fax'])  }}
            </div>
            <div class="col-md-6">
                <label for="mobile">Mobile</label>
                {{ Form::text('mobile', null, ['class' => 'form-control', 'placeholder' => 'Mobile'])  }}
            </div>
            <div class="col-md-6">
                <label for="mobile">Mobile 2</label>
                {{ Form::text('mobile2', null, ['class' => 'form-control', 'placeholder' => 'Mobile 2'])  }}
            </div>
        </div>
    </div>
    
    
    <div class="form-group">
        <label for="adresse">Adresse</label>
        {{ Form::textarea('adresse', null, ['class' => 'form-control', 'placeholder' => 'adresse', 'rows' => 3, 'required' => 'required'])  }}
    </div>
    <div class="form-group">
        <label for="wilaya_id">Wilaya</label>
        {{ Form::select('wilaya_id', $wilayas, null, ['class' => 'form-control', 'placeholder' => 'Séléctionnez une Wilaya...', 'required' => 'required', 'id' => 'wilaya_id']) }}
    </div>
    <div class="form-group">
        <div class="row">
            <div class="col-md-6">
                <label for="commune_id">Commune</label>
                <div id="communes_container">
                    {{ Form::select('commune_id', $communes, null, ['class' => 'form-control', 'placeholder' => 'Séléctionnez une Commune...', 'required' => 'required', 'disabled' => (!isset($company)), 'id' => 'commune_id']) }}
                </div>
            </div>
            <div class="col-md-6">
                <label for="wilaya_id">Code postal</label>
                {{ Form::text('codepostal', null, ['class' => 'form-control', 'placeholder' => 'Code postal', 'required' => 'required'])  }}
                {{-- <p class="form-control-static">
                    <span id="codepostal"></span>
                    {{ Form::hidden('codepostal', null, ['required' => 'required']) }}
                </p> --}}
            </div>
        </div>
    </div>
    <div class="form-group">
        <label for="adresse">Pays</label>
        {{ Form::select('country_id', $countries ,null, ['class' => 'form-control', 'placeholder' => 'Pays', 'required' => 'required'])  }}
    </div>
    <div class="form-group">
        <div class="row">
            <div class="col-md-6">
                <label for="lat">Latitude</label>
                {{ Form::text('lat', null, ['class' => 'form-control', 'placeholder' => 'Latitude'])  }}
            </div>
            <div class="col-md-6">
                <label for="long">Longitude</label>
                {{ Form::text('long', null, ['class' => 'form-control', 'placeholder' => 'Longitude'])  }}
            </div>
        </div>
    </div>

    <div class="form-group">
        <div class="row">
            <div class="col-md-12">
                <label for="company_rc">N° de Registre de commerce</label>
                {{ Form::text('company_rc', null, ['class' => 'form-control', 'placeholder' => 'N° de Registre de commerce'])  }}
            </div>
            <div class="col-md-12">
                <label for="company_nif">NIF</label>
                {{ Form::text('company_nif', null, ['class' => 'form-control', 'placeholder' => 'NIF'])  }}
            </div>
            <div class="col-md-12">
                <label for="company_ai">Article d'imposition</label>
                {{ Form::text('company_ai', null, ['class' => 'form-control', 'placeholder' => "Article d'imposition"])  }}
            </div>
        </div>        
    </div>

</div>
<!-- /.box-body -->
<div class="box-footer text-right">
    <a href="{{ URL::previous() }}" class="btn btn-danger">Annuler</a>
    <button type="submit" class="btn btn-primary">Enregistrer</button>
</div>