{% extends 'base_frontend.html.twig' %}

{% block title %} Partenaire {% endblock %}

{% block content %}
<!-- ============================================== HEADER : END ============================================== -->
<div class="breadcrumb">
	<div class="breadcrumb-inner">
		<ul class="list-inline list-unstyled">
			<li><a href="#">Partenaire</a></li>
			<li class='active'>Devenir Partenaire</li>
		</ul>
	</div><!-- /.breadcrumb-inner -->
</div><!-- /.breadcrumb -->

<div class="body-content ">
	<div class="sign-in-page">
		<div class="row">
            <div class="col-md-12 col-sm-12">
            {{ form_start(form, {'attr': {'class': 'register-form outer-top-xs'}}) }}

                {% include 'frontend/basic/alert.html.twig' %}

                <h3>Devenir Partenaire</h3>
                <br><br>
                {% set formErrors = form.vars.errors.form.getErrors(true) %}
                {% if formErrors|length %}
                    <div class="alert alert-danger">
                        <ul>
                            {% for key,error in formErrors %}
                                <li><strong>{{ error.message }}</strong></li>
                            {% endfor %}
                        </ul>
                    </div>
                {% endif %}

                <div class="row">
                    <div class="col-md-6 col-sm-6">
                        <div class="form-group">
                            <label class="info-title">{{ form_label(form.nom) }} <span>*</span></label>
                            {{ form_widget(form.nom, {'attr': {'class': 'form-control unicase-form-control text-input'}}) }}
                            <span class="help-block">{{ form_errors(form.nom) }}</span>
                        </div>
                    </div>
                    <div class="col-md-6 col-sm-6">
                        <div class="form-group">
                            <label class="info-title">{{ form_label(form.immatriculation) }} <span>*</span></label>
                            {{ form_widget(form.immatriculation, {'attr': {'class': 'form-control unicase-form-control text-input'}}) }}
                            <span class="help-block">{{ form_errors(form.immatriculation) }}</span>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-md-6 col-sm-6">
                        <div class="form-group">
                            <label class="info-title">{{ form_label(form.telephone) }} <span>*</span></label>
                            {{ form_widget(form.telephone, {'attr': {'class': 'form-control unicase-form-control text-input'}}) }}
                            <span class="help-block">{{ form_errors(form.telephone) }}</span>
                        </div>
                    </div>
                    <div class="col-md-6 col-sm-6">
                        <div class="form-group">
                            <label class="info-title">{{ form_label(form.fax) }} </label>
                            {{ form_widget(form.fax, {'attr': {'class': 'form-control unicase-form-control text-input'}}) }}
                            <span class="help-block">{{ form_errors(form.fax) }}</span>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-md-4 col-sm-4">
                        <div class="form-group">
                            <label class="info-title">{{ form_label(form.email) }} <span>*</span></label>
                            {{ form_widget(form.email, {'attr': {'class': 'form-control unicase-form-control text-input'}}) }}
                            <span class="help-block">{{ form_errors(form.email) }}</span>
                        </div>
                    </div>
                    <div class="col-md-8 col-sm-8">
                        <div class="form-group">
                            <label class="info-title">{{ form_label(form.adresse) }} <span>*</span></label>
                            {{ form_widget(form.adresse, {'attr': {'class': 'form-control unicase-form-control text-input'}}) }}
                            <span class="help-block">{{ form_errors(form.adresse) }}</span>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-md-12 col-sm-12">
                        <div class="form-group">
                            <label class="info-title">{{ form_label(form.photo) }} <span>*</span></label>
                            {{ form_widget(form.photo, {'attr': {'class': 'form-control unicase-form-control text-input'}}) }}
                            <span class="help-block">{{ form_errors(form.photo) }}</span>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-md-12 col-sm-12">
                        <div class="form-group">
                            <label class="info-title">{{ form_label(form.description) }} <span>*</span></label>
                            {{ form_widget(form.description, {'attr': {'class': 'form-control unicase-form-control text-input'}}) }}
                            <span class="help-block">{{ form_errors(form.description) }}</span>
                        </div>
                    </div>
                </div>

                <div class="row">
                    <div class="col-md-3 col-sm-3 col-md-offset-5">
                        {{ form_row(form.save, { 'label': "valider", 'attr': {'class': 'btn btn-primary'} }) }}
                    </div>
                </div>

            {{ form_end(form) }}	

            {#
            {{ form_start(form) }}
                <div class="row g-3">

                    {{ form_errors(form) }}
                    {{ form_row(form._token) }}
                    
                    <div class="col-6 my-3">
						{{ form_label(form.nom, 'Nom Société', {'attr': {'class': 'form-label'}}) }}
						<div class="input-group">
							<span class="input-group-text"><i class="fa-solid fa-building"></i></span>
							{{ form_widget(form.nom, {'attr': {'class': 'form-control'}}) }}
							<div class="invalid-feedback">
								{{ form_errors(form.nom) }}
							</div>
						</div>
					</div>

                    <div class="col-6">
						{{ form_label(form.immatriculation, 'Immatriculation', {'attr': {'class': 'form-label'}}) }}
						<div class="input-group">
							<span class="input-group-text"><i class="fa-solid fa-cash-register"></i></span>
							{{ form_widget(form.immatriculation, {'attr': {'class': 'form-control'}}) }}
							<div class="invalid-feedback">
								{{ form_errors(form.immatriculation) }}
							</div>
						</div>
					</div>
                    
                    <div class="col-12 my-3">
						{{ form_label(form.email, 'Email', {'attr': {'class': 'form-label'}}) }} 
						<div class="input-group">
							<span class="input-group-text"><i class="fa-solid fa-at"></i></span>
							{{ form_widget(form.email, {'attr': {'class': 'form-control'}}) }}
							<div class="invalid-feedback">
								Your username is required.
							</div>
						</div>
					</div>


                    <div class="col-12 my-3">
						{{ form_label(form.telephone, 'Téléphone', {'attr': {'class': 'form-label'}}) }}
						<div class="input-group">
							<span class="input-group-text"><i class="fa-solid fa-phone-volume"></i></span>
							{{ form_widget(form.telephone, {'attr': {'class': 'form-control'}}) }}
							<div class="invalid-feedback">
								{{ form_errors(form.telephone) }}
							</div>
						</div>
					</div>

                    <div class="col-12 my-3">
						{{ form_label(form.fax, 'Fax', {'attr': {'class': 'form-label'}}) }}
						<div class="input-group">
							<span class="input-group-text"><i class="fa-solid fa-fax"></i></span>
							{{ form_widget(form.fax, {'attr': {'class': 'form-control'}}) }}
							<div class="invalid-feedback">
								{{ form_errors(form.fax) }}
							</div>
						</div>
					</div>

                    
                    <div class="col-12 my-3">
						{{ form_label(form.adresse, 'Adresse', {'attr': {'class': 'form-label'}}) }}
						<div class="input-group">
							<span class="input-group-text"><i class="fa-solid fa-location-dot"></i></span>
							{{ form_widget(form.adresse, {'attr': {'class': 'form-control'}}) }}
							<div class="invalid-feedback">
								{{ form_errors(form.adresse) }}
							</div>
						</div>
					</div>

                    <div class="col-12 my-3">
                        {{ form_label(form.photo, 'Logo', {'attr': {'class': 'form-label'}}) }}
                        {{ form_widget(form.photo, {'attr': {'class': 'form-control'}}) }}
                        <div class="invalid-feedback">{{ form_errors(form.photo) }}</div>
                    </div>

                    <div class="col-12 my-3">
                        {{ form_label(form.description, 'Déscription', {'attr': {'class': 'form-label'}}) }}
                        {{ form_widget(form.description, {'attr': {'class': 'form-control'}}) }}
                        <div class="invalid-feedback">{{ form_errors(form.description) }}</div>
                    </div>

                    <hr class="my-4">
                    {{ form_widget(form.save, {'label': "Enregister", 'attr': {'class': 'w-90 btn btn-primary btn-lg'}}) }}
						

                </div>

            {{ form_end(form) }}
            {#<div class="col-md-3 "></div>                                 
            <div class="col-md-7 col-md-offset-1"></div>#}     
            </div>	
        </div>
	</div>
    <br><br><br><br>
    
</div>
{% endblock %}

{% block javascripts %}
    <script>
        
    </script>

    {{ parent() }}
  
{% endblock %}