<div class="box no-border">
    <div class="box-body">
        <div class="row">
        <div class="col-sm-7">
            <h4 class="margin-top-0 margin-bottom-20 text-primary"><i class="fa fa-info-circle"></i> Informação da empresa</h4>
            <div class="form-group">
                <?php echo Form::label('company_name', 'D. Social', ['class' => 'control-label col-sm-2']); ?>

                <div class="col-sm-10">
                    <?php echo Form::text('company_name', Setting::get('company_name'), ['class' =>'form-control']); ?>

                </div>
            </div>
            <div class="row">
                <div class="col-md-5">
                    <div class="form-group">
                        <?php echo Form::label('vat', 'NIF', ['class' => 'control-label col-md-5 col-sm-4']); ?>

                        <div class="col-md-7 col-sm-10" style="padding-left: 11px;">
                            <?php echo Form::text('vat', Setting::get('vat'), ['class' =>'form-control']); ?>

                        </div>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="form-group">
                        <?php echo Form::label('charter', 'Alvará', ['class' => 'control-label col-sm-4']); ?>

                        <div class="col-sm-8">
                            <?php echo Form::text('charter', Setting::get('charter'), ['class' =>'form-control']); ?>

                        </div>
                    </div>
                </div>
                <div class="col-md-3">
                    <div class="form-group">
                        <?php echo Form::label('vat', 'Delg.', ['class' => 'control-label col-md-4 col-sm-2']); ?>

                        <div class="col-md-8 col-sm-10">
                            <?php echo Form::select('total_delegations', [1=>1,2=>2,3=>3,4 =>4,5=>5,6=>6,7=>7,8=>8,9=>9,10=>10], Setting::get('total_delegations'), ['class' =>'form-control select2']); ?>

                        </div>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <?php echo Form::label('facebook', 'Facebook', ['class' => 'control-label col-sm-2']); ?>

                <div class="col-sm-10">
                    <?php echo Form::text('facebook', Setting::get('facebook'), ['class' =>'form-control']); ?>

                </div>
            </div>
        </div>
        <div class="col-sm-5">
            <h4 class="margin-top-0 text-primary">
                <i class="fa fa-list"></i> Formulário de contacto
            </h4>
            <div class="form-group">
                <?php echo Form::label('contact_form_email', 'E-mail', ['class' => 'control-label col-sm-3']); ?>

                <div class="col-sm-9">
                    <?php echo Form::text('contact_form_email', Setting::get('contact_form_email'), ['class' =>'form-control']); ?>

                </div>
            </div>
            <div class="form-group">
                <?php echo Form::label('contact_form_blocked_ips', 'IP Bloq.', ['class' => 'control-label col-sm-3']); ?>

                <div class="col-sm-9">
                    <?php echo Form::textarea('contact_form_blocked_ips', Setting::get('contact_form_blocked_ips'), ['class' =>'form-control', 'rows' => '3']); ?>

                </div>
            </div>
        </div>
        <div class="col-sm-12">
            <h4 class="margin-top-20 margin-bottom-20 text-primary"><i class="fa fa-map-marker"></i> Delegações e Localizações</h4>
            <table class="table table-condensed">
                <tr>
                    <th class="width-130px">Designação</th>
                    <?php for($i = 1 ; $i <= Setting::get('total_delegations') ; $i++): ?>
                        <th><?php echo Form::text('delegation_name_'.$i, Setting::get('delegation_name_'.$i), ['class' =>'form-control']); ?></th>
                    <?php endfor; ?>
                </tr>
                <tr>
                    <td>Morada</td>
                    <?php for($i = 1 ; $i <= Setting::get('total_delegations') ; $i++): ?>
                        <td><?php echo Form::text('address_'.$i, Setting::get('address_'.$i), ['class' =>'form-control']); ?></td>
                    <?php endfor; ?>
                </tr>
                <tr>
                    <td>Código Postal</td>
                    <?php for($i = 1 ; $i <= Setting::get('total_delegations') ; $i++): ?>
                        <td><?php echo Form::text('zip_code_'.$i, Setting::get('zip_code_'.$i), ['class' =>'form-control']); ?></td>
                    <?php endfor; ?>
                </tr>
                <tr>
                    <td>Localidade</td>
                    <?php for($i = 1 ; $i <= Setting::get('total_delegations') ; $i++): ?>
                        <td><?php echo Form::text('city_'.$i, Setting::get('city_'.$i), ['class' =>'form-control']); ?></td>
                    <?php endfor; ?>
                </tr>
                <tr>
                    <td>Telefone</td>
                    <?php for($i = 1 ; $i <= Setting::get('total_delegations') ; $i++): ?>
                        <td><?php echo Form::text('phone_'.$i, Setting::get('phone_' . $i), ['class' =>'form-control']); ?></td>
                    <?php endfor; ?>
                </tr>
                <tr>
                    <td>Telemóvel</td>
                    <?php for($i = 1 ; $i <= Setting::get('total_delegations') ; $i++): ?>
                        <td><?php echo Form::text('mobile_'.$i, Setting::get('mobile_' . $i), ['class' =>'form-control']); ?></td>
                    <?php endfor; ?>
                </tr>
                <tr>
                    <td>E-mail</td>
                    <?php for($i = 1 ; $i <= Setting::get('total_delegations') ; $i++): ?>
                        <td><?php echo Form::text('email_'.$i, Setting::get('email_' . $i), ['class' =>'form-control']); ?></td>
                    <?php endfor; ?>
                </tr>
                <tr>
                    <td>Horário</td>
                    <?php for($i = 1 ; $i <= Setting::get('total_delegations') ; $i++): ?>
                        <td><?php echo Form::text('horary_'.$i, Setting::get('horary_' . $i), ['class' =>'form-control']); ?></td>
                    <?php endfor; ?>
                </tr>
            </table>

            <h4 class="margin-top-30 margin-bottom-20 text-primary">
                <i class="fa fa-map"></i> Coordenadas GPS e Google Maps
            </h4>
            <table class="table table-condensed">
                <tr>
                    <td class="width-130px">Latitude Google</td>
                    <?php for($i = 1 ; $i <= Setting::get('total_delegations') ; $i++): ?>
                        <td><?php echo Form::text('maps_latitude_' . $i, Setting::get('maps_latitude_' . $i), ['class' =>'form-control']); ?></td>
                    <?php endfor; ?>
                </tr>
                <tr>
                    <td>Longitude Google</td>
                    <?php for($i = 1 ; $i <= Setting::get('total_delegations') ; $i++): ?>
                        <td><?php echo Form::text('maps_longitude_' . $i, Setting::get('maps_longitude_' . $i), ['class' =>'form-control']); ?></td>
                    <?php endfor; ?>
                </tr>
                <tr>
                    <td>Google Maps URL</td>
                    <?php for($i = 1 ; $i <= Setting::get('total_delegations') ; $i++): ?>
                        <td><?php echo Form::text('maps_url_' . $i, Setting::get('maps_url_' . $i), ['class' =>'form-control']); ?></td>
                    <?php endfor; ?>
                </tr>
                <tr>
                    <td>Latitude GPS</td>
                    <?php for($i = 1 ; $i <= Setting::get('total_delegations') ; $i++): ?>
                        <td><?php echo Form::text('gps_latitude_' . $i, Setting::get('gps_latitude_' . $i), ['class' =>'form-control']); ?></td>
                    <?php endfor; ?>
                </tr>
                <tr>
                    <td>Longitude GPS</td>
                    <?php for($i = 1 ; $i <= Setting::get('total_delegations') ; $i++): ?>
                        <td><?php echo Form::text('gps_longitude_' . $i, Setting::get('gps_longitude_' . $i), ['class' =>'form-control']); ?></td>
                    <?php endfor; ?>
                </tr>
            </table>
        </div>
            <div class="col-sm-4">
                <h4 class="margin-top-30 margin-bottom-20 text-primary">
                    <i class="fa fa-map"></i> Apoio ao Cliente
                </h4>
                <table class="table table-condensed">
                    <tr>
                        <td>Telefone</td>
                        <td><?php echo Form::text('support_phone', Setting::get('support_phone'), ['class' =>'form-control']); ?></td>
                    </tr>
                    <tr>
                        <td>E-mail 1</td>
                        <td><?php echo Form::text('support_email01', Setting::get('support_email01'), ['class' =>'form-control']); ?></td>
                    </tr>
                    <tr>
                        <td>E-mail 2</td>
                        <td><?php echo Form::text('support_email02', Setting::get('support_email02'), ['class' =>'form-control']); ?></td>
                    </tr>

                </table>
            </div>
            <div class="col-sm-4">
                <h4 class="margin-top-30 margin-bottom-20 text-primary">
                    <i class="fa fa-map"></i> Departamento Comercial
                </h4>
                <table class="table table-condensed">
                    <tr>
                        <td>Telefone</td>
                        <td><?php echo Form::text('commercial_phone', Setting::get('commercial_phone'), ['class' =>'form-control']); ?></td>
                    </tr>
                    <tr>
                        <td>E-mail</td>
                        <td><?php echo Form::text('commercial_email', Setting::get('commercial_email'), ['class' =>'form-control']); ?></td>
                    </tr>

                </table>
            </div>
            <div class="col-sm-4">
                <h4 class="margin-top-30 margin-bottom-20 text-primary">
                    <i class="fa fa-map"></i> Recolhas
                </h4>
                <table class="table table-condensed">
                    <tr>
                        <td>Telefone</td>
                        <td><?php echo Form::text('collections_phone', Setting::get('collections_phone'), ['class' =>'form-control']); ?></td>
                    </tr>
                    <tr>
                        <td>E-mail</td>
                        <td><?php echo Form::text('collections_email', Setting::get('collections_email'), ['class' =>'form-control']); ?></td>
                    </tr>

                </table>
            </div>


    <div class="col-sm-12">
        <?php echo Form::submit('Gravar', array('class' => 'btn btn-primary' )); ?>

    </div>
    </div>
    </div>
</div>