contact.php 6.15 KB
Newer Older
imac's avatar
imac committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
<?php
/**
 * Template Name: Contact
 *
 */
get_header();
$post_ID = 157;
?>

<div class="container clearfix" id="contact" data-page = "contact">
    <div class="container-bg abs-full"></div>
    <?php get_sidebar(); ?>
    <div class="contact-wrapper">
        <div class="right-container">
            <div class="left-panel fixed-full position--after-menu ">
                <div class="map">
                    <object id="map" type="image/svg+xml" data="<?php echo home_url('wp-content/themes/nap/assets/css/img/departements2.svg') ?>"></object>
                </div>
            </div>
        </div>
        <div class="right-panel full-height right">
            <div class="filter-wrapper search-filter fixed full-height form-wrapper border-l row">
                <h2>Trouver mon contact commercial</h2>
imac's avatar
imac committed
24
                <div class="filter">    
imac's avatar
imac committed
25
                    <form id="map-search" method="get" action='contact.php'>
imac's avatar
imac committed
26
                        <p class="form-element">    
imac's avatar
imac committed
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
                            <span class = "chevron bottom"></span>

                            <select id="selectCountry" >
                                <?php
                                if (get_field('contact_pays', $post_ID)):

                                    while (has_sub_field('contact_pays', $post_ID)) :
                                        ?>
                                        <option value="<?php the_sub_field('pays_code'); ?>" ><?php the_sub_field('pays_nom'); ?></option>

                                        <?php
                                    endwhile;
                                endif;
                                ?>
                            </select>

                        </p>
imac's avatar
imac committed
44
                        <p class="form-element cp"> 
imac's avatar
imac committed
45 46
                            <input placeholder="Code postal" class="search" id="search" type="text" name="search">
                            <input class ="search-btn" type="submit" />
imac's avatar
imac committed
47
                        </p>        
imac's avatar
imac committed
48 49 50 51 52 53 54 55 56 57

                    </form>
                </div>

                <?php
                if (get_field('zones_commerciaux', $post_ID)):
                    $i = 1;
                    while (has_sub_field('zones_commerciaux', $post_ID)) :
                        ?>
                        <div class="commercial commercial-details" data-zone = "zone<?php echo $i; ?>">
imac's avatar
imac committed
58
                            <figure style="background-image:url(<?php the_sub_field('photo_commercial'); ?>)"></figure>                 
imac's avatar
imac committed
59 60 61 62 63 64 65 66 67 68
                            <?php the_sub_field('infos_commercial'); ?>
                        </div>

                        <?php
                        // list zones par commercial 
                             if (get_sub_field('list_zones', $post_ID)):
                                $list_zone = array();
                                while (has_sub_field('list_zones', $post_ID)) :
                                    $list_zone[]= get_sub_field('num_zone');
                                endwhile;
imac's avatar
imac committed
69
                             endif;  
imac's avatar
imac committed
70 71 72 73 74
                        $i++;
                    endwhile;
                endif;
                ?>
                <span class="separation"></span>
imac's avatar
imac committed
75
                <div class="details">   
imac's avatar
imac committed
76 77 78 79
                    <div class="filter-bloc">
                        <div class="header">
                            <p><span>GMS</span></p>
                        </div>
imac's avatar
imac committed
80 81
                        <div class="bloc-content commercial-details">   
                            <figure style="background-image:url(<?php echo get_field('photo_gms', $post_ID) ?>)"></figure>                  
imac's avatar
imac committed
82 83 84 85 86 87 88
                            <?php echo get_field('contact_gms', $post_ID) ?>
                        </div>
                    </div>
                    <div class="filter-bloc">
                        <div class="header">
                            <p><span>Groupement</span></p>
                        </div>
imac's avatar
imac committed
89 90
                        <div class="bloc-content commercial-details">   
                            <figure style="background-image:url(<?php echo get_field('photo_groupement', $post_ID) ?>)"></figure>                   
imac's avatar
imac committed
91 92 93 94
                            <?php echo get_field('contact_groupement', $post_ID) ?>
                        </div>

                    </div>
imac's avatar
imac committed
95
                </div>  
imac's avatar
imac committed
96 97

            </div>
imac's avatar
imac committed
98 99 100 101 102 103 104 105 106 107 108 109 110 111
            <div class="contact-form right border-l row">
                <div class="form-wrapper inner-form">
                    <h2>Je souhaite être <br> contacté</h2>
                    <!--<form method="POST">    
                        <div class="clearfix">
                            <div class="row left half-col">
                                <input placeholder = "Nom" type="text" name="name" id="name" value="" />
                                <input placeholder = "Prénom" type="text" name="fname" id="fname" value="" />
                            </div>
                            <div class="row right half-col">
                                <input placeholder = "Mail" type="text" name="mail" id="mail" value="" />
                                <input placeholder = "Téléphone" type="text" name="phone" id="phone" value="" />
                            </div>
                            <textarea name="message" id="message" title="Message" placeholder="Message"></textarea>
imac's avatar
imac committed
112
                        </div>
imac's avatar
imac committed
113 114 115 116 117
                        <input type = "submit" class="btn pink-btn rounded" value = 'Envoyer'>



                    </form>-->
imac's avatar
imac committed
118
                    <?php echo do_shortcode( '[contact-form-7 id="558" title="Contact form"]' ); ?>
imac's avatar
imac committed
119 120
                </div>
                <div class="footer blue-bg abs font-small"> 
imac's avatar
imac committed
121 122 123 124 125 126 127 128 129 130 131
                    <h3 class="crete marker">Siège</h3>
                    <div class="content">
                        <div class="row left half-col">
                            <?php echo get_field('contact_adresse', $post_ID); ?>
                        </div>
                        <div class="row right half-col">
                            <?php echo get_field('contact_tel_fax', $post_ID); ?>
                        </div>
                    </div>
                </div>
            </div>
imac's avatar
imac committed
132
        </div>  
imac's avatar
imac committed
133 134 135
    </div>
</div>
<?php get_footer(); ?>