contact.php 6.48 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
<?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">
23 24 25 26
                <div class="header-filter-contact">
                     <h2>Trouver mon contact commercial</h2>
                     <span class="open-filter abs-full display--only-mobile"></span>
                </div>
imac's avatar
imac committed
27
                <div class="filter">    
imac's avatar
imac committed
28
                    <form id="map-search" method="get" action='contact.php'>
imac's avatar
imac committed
29
                        <p class="form-element">    
imac's avatar
imac committed
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
                            <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
47
                        <p class="form-element cp"> 
imac's avatar
imac committed
48 49
                            <input placeholder="Code postal" class="search" id="search" type="text" name="search">
                            <input class ="search-btn" type="submit" />
imac's avatar
imac committed
50
                        </p>        
imac's avatar
imac committed
51 52 53 54 55 56

                    </form>
                </div>

                <?php
                if (get_field('zones_commerciaux', $post_ID)):
imac's avatar
imac committed
57
                    $i = 0;
imac's avatar
imac committed
58 59 60
                    while (has_sub_field('zones_commerciaux', $post_ID)) :
                        ?>
                        <div class="commercial commercial-details" data-zone = "zone<?php echo $i; ?>">
imac's avatar
imac committed
61
                            <figure style="background-image:url(<?php the_sub_field('photo_commercial'); ?>)"></figure>                 
imac's avatar
imac committed
62 63 64 65 66 67 68 69 70 71
                            <?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
72
                             endif;  
imac's avatar
imac committed
73 74 75 76 77
                        $i++;
                    endwhile;
                endif;
                ?>
                <span class="separation"></span>
imac's avatar
imac committed
78
                <div class="details">   
imac's avatar
imac committed
79 80 81 82
                    <div class="filter-bloc">
                        <div class="header">
                            <p><span>GMS</span></p>
                        </div>
imac's avatar
imac committed
83 84
                        <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
85 86 87 88 89 90 91
                            <?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
92 93
                        <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
94 95 96 97
                            <?php echo get_field('contact_groupement', $post_ID) ?>
                        </div>

                    </div>
imac's avatar
imac committed
98
                </div>  
imac's avatar
imac committed
99 100

            </div>
imac's avatar
imac committed
101
            <div class="contact-form right border-l row gray-bg">
imac's avatar
imac committed
102
                <div class="form-wrapper inner-form">
103 104
                <div class="header-filter-contact on">
                    <h2>Je souhaite être <br> contacté</h2>
105 106
                    <span class="open-filter abs-full display--only-mobile"></span>
                </div>
imac's avatar
imac committed
107 108 109 110 111 112 113 114 115 116 117
                    <!--<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
118
                        </div>
imac's avatar
imac committed
119 120 121 122 123
                        <input type = "submit" class="btn pink-btn rounded" value = 'Envoyer'>



                    </form>-->
imac's avatar
imac committed
124
                    <?php echo do_shortcode( '[contact-form-7 id="558" title="Contact form"]' ); ?>
imac's avatar
imac committed
125 126
                </div>
                <div class="footer blue-bg abs font-small"> 
imac's avatar
imac committed
127
                    <h3 class="crete marker">Siège</h3>
imac's avatar
imac committed
128
                    <div class="content clearfix">
imac's avatar
imac committed
129 130 131 132 133 134 135 136 137
                        <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
138
        </div>  
imac's avatar
imac committed
139 140 141
    </div>
</div>
<?php get_footer(); ?>