Przeglądaj źródła

Fix attributes names and date formats

omassot 6 lat temu
rodzic
commit
41d34680ad
2 zmienionych plików z 809 dodań i 809 usunięć
  1. 785 785
      index.html
  2. 24 24
      js/app.js

+ 785 - 785
index.html

@@ -1,785 +1,785 @@
-<!DOCTYPE html>
-<html
-  ng-app = "application"
-  lang   = "en-US">
-
-  <head>
-
-    <!-- Page title -->
-    <title>Manche Numérique</title>
-
-    <!-- Meta tags -->
-    <meta charset = "UTF-8">
-    <meta name = "description" content = "Zeno-Labs">
-    <meta name = "keywords"    content = "HTML,CSS,JavaScript">
-    <meta name = "author"      content = "Francois Beaufils">
-
-    <!-- Angulars Material CSS using RawGit to load directly from `bower-material/master` -->
-    <link rel = "stylesheet" href = "css/angular-material.css">
-    <link rel = "stylesheet" href = "css/theme.css">
-
-    <!-- Favicon-->
-    <link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">
-
-    <!-- Material design CSS font http://zavoloklom.github.io/material-design-iconic-font/examples.html -->
-    <link rel="stylesheet" href="css/material-design-iconic-font.min.css">
-    <link rel="stylesheet" href="css/font-awesome.min.css">
-
-    <!-- Roboto font-->
-    <link href='http://fonts.googleapis.com/css?family=Roboto:500,300,400' rel='stylesheet' type='text/css'>
-
-    <!-- Specific CSS -->
-    <link rel = "stylesheet" href = "css/main.css">
-
-    <script type = "text/javascript" src = "https://code.jquery.com/jquery-1.11.3.min.js"></script>
-    <script type = "text/javascript" src = "https://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js"></script>
-    <script type = "text/javascript" src = "js/proj4js/dist/proj4.js"></script>
-
-    <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
-    <script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
-
-    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment-with-locales.min.js"></script>
-
-    <!-- Angular Material Dependencies -->
-    <script type = "text/javascript" src = "http://cdn.jsdelivr.net/hammerjs/2.0.4/hammer.js"></script>
-    <script type = "text/javascript" src = "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular.js"></script>
-    <script type = "text/javascript" src = "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular-animate.js"></script>
-    <script type = "text/javascript" src = "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular-aria.js"></script>
-
-    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/skrollr/0.6.29/skrollr.min.js"></script>
-
-
-    <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
-
-    <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
-    <script src="js/typeahead.js"></script>
-    <!-- Angular Material Javascript using RawGit to load directly from `bower-material/master` -->
-    <script type = "text/javascript" src = "js/angular-material.js"></script>
-
-    <script type = "text/javascript" src = "js/angular-adaptive-detection.js"></script>
-    <script type = "text/javascript" src = "js/app.js"></script>
-  </head>
-
-  <!--[If lte IE 9]>
-
-    <div class = "ie-compatibility">
-        Votre navigateur Internet Explorer n'est pas compatible avec notre logiciel, il vous faut au minimum Internet Explorer 10.<br><br>
-        Vous pouvez aussi télécharger un de ces navigateurs:<br><br>
-        - <a href="https://www.google.fr/intl/fr/chrome/" target = "_blank">Google Chrome</a><br>
-        - <a href="http://www.mozilla.org/download" target = "_blank">Mozilla Firefox</a>
-    </div>
-  <![endif]-->
-
-  <body ng-controller = "mainController">
-
-    <div class = "title">
-
-      <img
-        src      = "img/logo.png"
-        ng-click = "toggleResultPane()"/>
-    </div>
-
-    <div class = "address-bar">
-
-      <div class = "input-type">
-
-        <input
-          type                 = "text"
-          placeholder          = "Pour tester votre éligibilité, merci de saisir une adresse"
-          ng-model             = "address"
-          ng-focus             = "closeRight()"
-          class                = "typeahead"
-          options              = "typeAheadOpts"
-          datasets             = "allAdresses"
-          typeahead-on-select  = "onSubmitAddress($item, $model, $label)"
-          uib-typeahead        = "address for address in suggestLocation($viewValue)"
-          typeahead-loading    = "loadingLocations"
-          typeahead-no-results = "noResults"
-          autofocus/>
-
-        <div
-          ng-show = "loadingLocations"
-          class   = "loading-typeahead-results">
-
-          <i
-            class   = "glyphicon glyphicon-refresh">
-          </i>
-
-          Recherche en cours...
-        </div>
-
-
-        <div
-          ng-show = "noResults"
-          class   = "no-typeahead-results">
-
-          <i class = "glyphicon glyphicon-remove"></i>
-
-          Aucun résultat trouvé!
-        </div>
-      </div>
-
-      <md-button
-        aria-label = "submit"
-        ng-click   = "suggestionsReady && onSubmitAddress()"
-        class      = "md-raised md-primary">
-
-        <i class = "md-search md-2x"></i>
-      </md-button>
-
-      <i class = "md-menu md-2x" ng-click = "toggleRight()"></i>
-    </div>
-
-    <md-sidenav class="md-sidenav-right md-whiteframe-z2" md-component-id="right">
-      <md-toolbar class="md-theme-light">
-        <h1 class="md-toolbar-tools">Options</h1>
-
-        <md-progress-circular
-          id          = "layer-loading"
-          class       = "md-warn md-hue-3 force-hidden"
-          md-mode     = "indeterminate"
-          md-diameter = "25">
-        </md-progress-circular>
-      </md-toolbar>
-      <md-content class="md-padding">
-
-        <div class = "section-title">
-
-          Type de vue
-        </div>
-
-        <md-radio-group ng-model="mapType">
-
-          <md-radio-button
-            value      = "Satellite"
-            ng-click   = "changeMap('satellite')"
-            aria-label = "Satellite">Satellite
-          </md-radio-button>
-
-          <br/>
-
-          <md-radio-button
-            value      = "Carte"
-            ng-click   = "changeMap('carte')"
-            aria-label = "Carte">Carte
-          </md-radio-button>
-        </md-radio-group>
-      </md-content>
-    </md-sidenav>
-
-    <div id="map"></div>
-
-    <div id="result">
-
-      <div
-        class         = "result-container"
-        layout        = "row"
-        layout-margin>
-
-        <div
-          flex
-          flex-order = "1"
-          class      = "result-box">
-
-          <div class = "box-header">
-            <div class = "box-logo">
-
-              <img src = "img/fibre.png"/>
-            </div>
-
-            <div class = "box-title-description">
-
-              <div class = "box-title">
-
-                Fibre optique (FTTH)
-              </div>
-
-              <div class = "box-desc">
-
-                Le Ftth (Fiber To The Home) “signifie la fibre optique jusqu'à l'abonné”. Cette technologie présente des atouts majeurs (un débit  très fortement  augmenté - de l’ordre de 100 Mbit/s à 1 Gbit/s)  et ouvre des possibilités nouvelles en termes d 'usages numériques.
-
-                <a
-                  href   = "http://www.manchenumerique.fr/Un-citoyen/Equipes-et-connectes/Internet-a-tres-haut-debit#ancre_contenu"
-                  target = "_blank">
-
-                  En savoir plus
-                </a>
-              </div>
-            </div>
-          </div>
-
-          <div
-            class    = "box-body  box-body-ftth"
-            ng-style = "{'border-color': colors.ftth}">
-
-            <hr>
-
-            <div
-              class = "box-eligibilite-title"
-              ng-if = "results.ftth !== undefined && results.ftth.date !== true && !results.ftth.eligible && inscription.cas !== 6">
-
-              possiblité inscription
-
-              <span ng-init = "refreshInscriptionInfo()">
-
-                <span
-                  ng-if = "inscription.open"
-                  class = "box-eligibilite-yes">
-
-                  OUI
-                </span>
-
-                <span
-                  ng-if = "!inscription.open"
-                  class = "box-eligibilite-no">
-
-                  NON
-                </span>
-
-                <div
-                  ng-if = "results.ftth.date && inscription.open"
-                  style = "text-align: center; margin-top: 14px;">
-
-                  <button
-                    type          = "button"
-                    class         = "btn btn-primary btn-lg"
-                    data-toggle   = "modal"
-                    data-backdrop = "static"
-                    data-keyboard = "false"
-                    ng-click      = "initPopup()"
-                    data-target   = "#mn_inscription">
-
-                    Inscription
-                  </button>
-                </div>
-              </span>
-            </div>
-
-            <div class = "box-eligibilite">
-
-              <div
-                ng-if = "results.ftth !== undefined">
-
-                <div
-                  ng-if        = "results.ftth && results.ftth.date !== true && inscription.cas !== 5 && inscription.cas !== 6"
-                  style        = "margin-top: 30px;"
-                  ng-bind-html = "formatDateFTTH(results.ftth.date)">
-                </div>
-
-                <div
-                  ng-if        = "results.ftth.eligible"
-                  style        = "text-align: center; font-weight: bold;">
-
-                  <i
-                    class = "fa fa-check-circle"
-                    style = "font-size: 45px; color: #1fa67a">
-                  </i>
-
-                  <br>
-
-                  Vous êtes situé dans une zone éligible à la fibre optique.<br>
-                  Si vous souhaitez souscrire à une offre très haut débit merci de contacter:<br>
-
-                  <table style = "width: 100%;">
-                    <tr>
-                      <td style = "text-align: center;">
-
-                        <a
-                          href   = "https://boutique.orange.fr/internet/offres-fibre"
-                          target = "_blank">
-
-                          <img
-                            src   = "img/orange.jpg"
-                            alt   = "Orange"
-                            style = "width: 80px;"/>
-                        </a>
-                      </td>
-
-                      <td>
-
-                        <a
-                          href   = "http://www.sfr.fr/offre-internet/fibre-optique"
-                          target = "_blank">
-
-                          <img
-                            src   = "img/sfr.jpg"
-                            alt   = "SFR"
-                            style = "width: 80px;"/>
-                        </a>
-                      </td>
-                    </tr>
-                  </table>
-                </div>
-
-                <div ng-if = "inscription.message">
-
-                  {{inscription.message}}
-
-                  <div ng-if = "inscription.cas === 6">
-
-                    <table style="width:100%;">
-                      <tr>
-                        <td style="width:33%;text-align:center;">
-                          <a href = "http://www.comcable.fr" target="_blank">
-                            <img style="width:100%;" src="./img/comcable.png"/>
-                          </a>
-                        </td>
-                        <td style="width:33%;text-align:center;">
-                          <a href = "http://www.k-net.fr" target="_blank">
-                            <img style="width:100%;" src="./img/knet.png"/>
-                          </a>
-                        </td>
-                        <td style="width:33%;text-align:center;">
-                          <a href = "http://www.ozone.net" target="_blank">
-                            <img style="width:100%;" src="./img/ozone.png"/>
-                          </a>
-                        </td>
-                      </tr>
-                      <tr>
-                        <td style="width:33%;text-align:center;">
-                          <a href = "http://www.wibox.fr" target="_blank">
-                            <img style="width:110%;" src="./img/wibox.png"/>
-                          </a>
-                        </td>
-                        <td style="width:33%;text-align:center;">
-                          <a href = "http://www.lafibrevideofutur.fr/" target="_blank">
-                            <img style="width:80%;" src="./img/videofutur.png"/>
-                          </a>
-                        </td>
-                        <td style="width:33%;text-align:center;">
-                          <a href = "https://www.coriolis.com/forfait-internet/fibre" target="_blank">
-                            <img style="width:80%;" src="./img/coriolis.png"/>
-                          </a>
-                        </td>
-                      </tr>
-                      <tr>
-                        <td style="width:33%;text-align:center;">
-                          <a href = "https://www.nordnet.com/connexion-internet/internet-fibre" target="_blank">
-                            <img style="width:100%;" src="./img/nordnet.png"/>
-                          </a>
-                        </td>
-                        <td style="width:33%;text-align:center;">
-                          &nbsp;
-                        </td>
-                        <td style="width:33%;text-align:center;">
-                          &nbsp;
-                        </td>
-                      </tr>
-                    </table>
-                  </div>
-                </div>
-
-                <div
-                  class = "box-description-more"
-                  ng-if = "!results.ftth._advanced"
-                  style = "margin-bottom: 30px;">
-
-                  <a
-                    href     = ""
-                    ng-click = "results.ftth._advanced = true">
-
-                    + détails
-                  </a>
-                </div>
-
-                <div
-                  ng-if        = "results.ftth._advanced"
-                  ng-bind-html = "formatResults('ftth', results.ftth)">
-                </div>
-              </div>
-
-              <div
-                ng-if = "results.ftth === undefined"
-                class = "box-eligibilite-spinner">
-
-                <md-progress-circular class="md-warn md-hue-3" md-mode="indeterminate"></md-progress-circular>
-              </div>
-            </div>
-          </div>
-        </div>
-
-        <div
-          flex
-          flex-order = "2"
-          class      = "result-box">
-
-          <div class = "box-header">
-            <div class = "box-logo">
-
-              <img src = "img/adsl.png"/>
-            </div>
-
-            <div class = "box-title-description">
-
-              <div class = "box-title">
-
-                ADSL (téléphone)
-              </div>
-
-              <div class = "box-desc">
-
-                L'ADSL est une technologie permettant l'accès à internet haut débit par le biais de la ligne téléphonique, constituée  de fils de cuivre.  Cette  ligne  téléphonique  relie  votre domicile  au central téléphonique  de France Télécom.
-                <a
-                  href   = "http://www.manchenumerique.fr/Un-citoyen/Equipes-et-connectes/Acceder-a-internet-haut-debit-partout-dans-la-Manche"
-                  target = "_blank">
-
-                  En savoir plus
-                </a>
-              </div>
-            </div>
-          </div>
-
-          <div
-            class    = "box-body  box-body-adsl"
-            ng-style = "{'border-color': colors.adsl}">
-
-            <div class = "box-description-more">
-
-
-            </div>
-
-
-            <hr>
-
-            <div
-              class = "box-eligibilite-title"
-              ng-if = "results.adsl !== undefined">
-
-              éligibilité
-
-              <span>
-
-                <span
-                  ng-if = "results.adsl && results.adsl.LEGENDE !== 'Non eligible' && results.adsl.CLASSEDEBI !== '0'"
-                  class = "box-eligibilite-yes">
-
-                  OUI
-                </span>
-
-                <span
-                  ng-if = "!results.adsl || results.adsl.LEGENDE === 'Non eligible' || results.adsl.CLASSEDEBI === '0'"
-                  class = "box-eligibilite-no">
-
-                  NON
-                </span>
-              </span>
-            </div>
-
-            <div class = "box-eligibilite">
-
-              <div
-                ng-if = "results.adsl !== undefined">
-
-                <div
-                  class = "popup-line"
-                  ng-if = "!results.adsl._advanced && results.adsl.CLASSEDEBI && results.adsl.CLASSEDEBI !== 'Non eligible'">
-
-                  <span class="popup-title">
-
-                    <span
-                      ng-if = "results.adsl.CLASSEDEBI === '0'">
-
-                      Non éligible
-                    </span>
-
-                    <span
-                      ng-if = "results.adsl.CLASSEDEBI === '1'">
-
-                      ADSL < 3 Mbit/s
-                    </span>
-
-                    <span
-                      ng-if = "results.adsl.CLASSEDEBI === '2'">
-
-                      ADSL 3 à 8 Mbit/s
-                    </span>
-
-                    <span
-                      ng-if = "results.adsl.CLASSEDEBI === '3'">
-
-                      ADSL 8 à 30 Mbit/s
-                    </span>
-
-                    <span
-                      ng-if = "results.adsl.CLASSEDEBI === '4'">
-
-                      ADSL 30 à 100 Mbit/s
-                    </span>
-                  </span>
-                </div>
-
-                <div
-                  class = "box-description-more"
-                  ng-if = "!results.adsl._advanced"
-                  style = "margin-bottom: 30px;">
-
-                  <a
-                    href     = ""
-                    ng-click = "results.adsl._advanced = true">
-
-                    + détails
-                  </a>
-                </div>
-
-                <div
-                  ng-if        = "results.adsl._advanced"
-                  ng-bind-html = "formatResults('adsl', results.adsl)">
-                </div>
-              </div>
-
-              <div
-                ng-if = "results.adsl === undefined"
-                class = "box-eligibilite-spinner">
-
-                <md-progress-circular class="md-warn md-hue-3" md-mode="indeterminate"></md-progress-circular>
-              </div>
-            </div>
-          </div>
-        </div>
-
-        <div
-          flex
-          flex-order = "3"
-          class      = "result-box">
-
-          <div class = "box-header">
-            <div class = "box-logo">
-
-              <img src = "img/mimo.png"/>
-            </div>
-
-            <div class = "box-title-description">
-
-              <div class = "box-title">
-
-                Réseau MiMo
-              </div>
-
-              <div class = "box-desc">
-
-                Cette technologie hertzienne, déployée par Manche Numérique, permet de desservir les zones non-éligibles à I'ADSL dites "zones blanches" et les zones qui seront déployées ultérieurement par la fibre optique.  Le MiMo permet un accès à internet et à un service de téléphonie. Cette technologie offre des débits de l'ordre de 20 Mbit/s descendants et de 3 Mbit/s montants.
-
-                <a
-                  href   = "http://www.manchenumerique.fr/Un-citoyen/Equipes-et-connectes/MiMo"
-                  target = "_blank">
-
-                  En savoir plus
-                </a>
-              </div>
-            </div>
-          </div>
-
-          <div
-            class    = "box-body  box-body-mimo"
-            ng-style = "{'border-color': colors.mimo}">
-
-            <hr>
-
-            <div
-              class = "box-eligibilite-title"
-              ng-if = "results.mimo !== undefined">
-
-              éligibilité
-
-              <span>
-
-                <span
-                  ng-if = "results.mimo"
-                  class = "box-eligibilite-yes">
-
-                  OUI
-                </span>
-
-                <span
-                  ng-if = "!results.mimo"
-                  class = "box-eligibilite-no">
-
-                  NON
-                </span>
-              </span>
-            </div>
-
-            <div class = "box-eligibilite">
-
-              <div
-                ng-if = "results.mimo">
-
-                <p class="bg-warning">Votre éligibilité à la technologie MiMo est théorique. Seul le passage d'un antenniste pourra confirmer votre niveau de signal.</p>
-
-                <div>
-                Vous pouvez souscrire à une offre d'accès internet auprès de l'un de ces FAI:
-
-                  <table style = "width:100%">
-                    <tr>
-                      <td style = "width:50%">
-                        <div class = "bg-info">
-
-                          <a
-                            href = "https://www.ozone.net/"
-                            target = "_blank">
-                            <img style="height:40px;" src="./img/ozone.png"/>
-                            <br/>
-                            Ozone.net
-                          </a>
-                          <br/>
-                          <i class ="fa fa-phone"></i>
-                          0 973 01 1000
-                        </div>
-                      </td>
-                      <td style = "width:50%">
-                        <div class = "bg-info">
-
-                          <a
-                            href = "https://www.nordnet.com/connexion-internet/internet-radio"
-                            target = "_blank">
-                            <img style="height:40px;" src="./img/nordnet.png"/>
-                            <br/>
-                            Nordnet.com
-                          </a>
-                          <br/>
-                          <i class ="fa fa-phone"></i>
-                          3420
-                        </div>
-                      </td>
-                    </tr>
-                  </table>
-                </div>
-                <div
-                  class = "box-description-more"
-                  ng-if = "!results.mimo._advanced"
-                  style = "margin-bottom: 30px;">
-
-                  <a
-                    href     = ""
-                    ng-click = "results.mimo._advanced = true">
-
-                    + détails
-                  </a>
-                </div>
-
-                <div
-                  ng-if        = "results.mimo_advanced"
-                  ng-bind-html = "formatResults('mimo', results.mimo)">
-                </div>
-              </div>
-
-              <div
-                ng-init = "refreshInscriptionInfo()"
-                ng-if   = "(!results.ftth.date || !inscription.open) && (!results.adsl || results.adsl.LEGENDE === 'Non eligible') && !results.mimo && results.mimo !== undefined">
-
-                <p class="bg-warning">Nous vous invitons à contacter les services de <a href="http://www.manchenumerique.fr" >Manche Numérique</a> qui vous indiqueront la procédure pour une connecion internet par satellite et bénéficier d'une prise en charge de l'installation du kit satellitaire par un antenniste.</p>
-
-              </div>
-
-              <div
-                ng-if = "results.mimo === undefined"
-                class = "box-eligibilite-spinner">
-
-                <md-progress-circular class="md-warn md-hue-3" md-mode="indeterminate"></md-progress-circular>
-              </div>
-            </div>
-          </div>
-        </div>
-      </div>
-    </div>
-
-    <!-- Modal -->
-    <div
-      class           = "modal fade"
-      id              = "mn_inscription"
-      tabindex        = "-1"
-      role            = "dialog"
-      backdrop        = "static"
-      aria-labelledby = "mn_inscriptionLabel">
-
-      <div
-        class = "modal-dialog"
-        role  = "document">
-
-        <div class = "modal-content">
-
-          <div class = "modal-header">
-
-            <button
-              type         = "button"
-              class        = "close"
-              data-dismiss = "modal"
-              aria-label   = "Close">
-
-              <span aria-hidden = "true">&times;</span>
-            </button>
-
-            <h4
-              class = "modal-title"
-              id    = "mn_inscriptionLabel">
-
-              FORMULAIRE DE MANIFESTATION D'INTERET À LA FIBRE OPTIQUE
-            </h4>
-          </div>
-
-          <div class = "modal-body">
-
-            <div ng-if = "!postForm">
-
-              Vous souhaitez bénéficier d’un abonnement à la fibre optique et pouvoir être raccordé au réseau FttH au tarif préférentiel de 50€, nous vous remercions de bien vouloir compléter ce formulaire. Après vérification, Manche Numérique se chargera de transmettre votre demande ainsi que vos coordonnées à la société Manche Fibre, délégataire de service public, qui vous informera des modalités du raccordement final et de la date d’ouverture du réseau à la commercialisation.
-            </div>
-
-            <div
-              class      = "mn-form"
-              ng-if      = "!postForm"
-              ng-include = "'./html/form.html'">
-
-            </div>
-
-            <div
-              class      = "mn-form-in-progress"
-              ng-if      = "postForm.inProgress">
-
-                <i class="fa fa-circle-o-notch fa-spin"></i>
-                <br/>
-                Enregistrement en cours...
-            </div>
-
-            <div
-              class      = "mn-form-error"
-              ng-if      = "postForm.error">
-
-                <i class="fa fa-exclamation-circle"></i>
-                <br/>
-                Error: {{postForm.error}}
-            </div>
-
-            <div
-              class      = "mn-form-ok"
-              ng-if      = "postForm.ok">
-
-                <i class="fa fa-check-circle-o"></i>
-                <br/>
-                Votre demande a bien été prise en compte. Un mail de confirmation vous a été envoyé.
-            </div>
-          </div>
-
-          <div class = "modal-footer">
-
-            <button
-              type         = "button"
-              class        = "btn btn-default"
-              data-dismiss = "modal">
-
-              Fermer
-            </button>
-
-            <button
-              type        = "button"
-              ng-if       = "!postForm"
-              ng-click    = "ready = true; isFormValid() ? postFormEl() : null"
-              class       = "btn btn-primary">
-
-              Valider
-            </button>
-          </div>
-        </div>
-      </div>
-    </div>
-  </body>
-</html>
+<!DOCTYPE html>
+<html
+  ng-app = "application"
+  lang   = "en-US">
+
+  <head>
+
+    <!-- Page title -->
+    <title>Manche Numérique</title>
+
+    <!-- Meta tags -->
+    <meta charset = "UTF-8">
+    <meta name = "description" content = "Zeno-Labs">
+    <meta name = "keywords"    content = "HTML,CSS,JavaScript">
+    <meta name = "author"      content = "Francois Beaufils">
+
+    <!-- Angulars Material CSS using RawGit to load directly from `bower-material/master` -->
+    <link rel = "stylesheet" href = "css/angular-material.css">
+    <link rel = "stylesheet" href = "css/theme.css">
+
+    <!-- Favicon-->
+    <link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">
+
+    <!-- Material design CSS font http://zavoloklom.github.io/material-design-iconic-font/examples.html -->
+    <link rel="stylesheet" href="css/material-design-iconic-font.min.css">
+    <link rel="stylesheet" href="css/font-awesome.min.css">
+
+    <!-- Roboto font-->
+    <link href='http://fonts.googleapis.com/css?family=Roboto:500,300,400' rel='stylesheet' type='text/css'>
+
+    <!-- Specific CSS -->
+    <link rel = "stylesheet" href = "css/main.css">
+
+    <script type = "text/javascript" src = "https://code.jquery.com/jquery-1.11.3.min.js"></script>
+    <script type = "text/javascript" src = "https://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js"></script>
+    <script type = "text/javascript" src = "js/proj4js/dist/proj4.js"></script>
+
+    <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
+    <script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
+
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment-with-locales.min.js"></script>
+
+    <!-- Angular Material Dependencies -->
+    <script type = "text/javascript" src = "http://cdn.jsdelivr.net/hammerjs/2.0.4/hammer.js"></script>
+    <script type = "text/javascript" src = "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular.js"></script>
+    <script type = "text/javascript" src = "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular-animate.js"></script>
+    <script type = "text/javascript" src = "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular-aria.js"></script>
+
+    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/skrollr/0.6.29/skrollr.min.js"></script>
+
+
+    <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
+
+    <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
+    <script src="js/typeahead.js"></script>
+    <!-- Angular Material Javascript using RawGit to load directly from `bower-material/master` -->
+    <script type = "text/javascript" src = "js/angular-material.js"></script>
+
+    <script type = "text/javascript" src = "js/angular-adaptive-detection.js"></script>
+    <script type = "text/javascript" src = "js/app.js"></script>
+  </head>
+
+  <!--[If lte IE 9]>
+
+    <div class = "ie-compatibility">
+        Votre navigateur Internet Explorer n'est pas compatible avec notre logiciel, il vous faut au minimum Internet Explorer 10.<br><br>
+        Vous pouvez aussi télécharger un de ces navigateurs:<br><br>
+        - <a href="https://www.google.fr/intl/fr/chrome/" target = "_blank">Google Chrome</a><br>
+        - <a href="http://www.mozilla.org/download" target = "_blank">Mozilla Firefox</a>
+    </div>
+  <![endif]-->
+
+  <body ng-controller = "mainController">
+
+    <div class = "title">
+
+      <img
+        src      = "img/logo.png"
+        ng-click = "toggleResultPane()"/>
+    </div>
+
+    <div class = "address-bar">
+
+      <div class = "input-type">
+
+        <input
+          type                 = "text"
+          placeholder          = "Pour tester votre éligibilité, merci de saisir une adresse"
+          ng-model             = "address"
+          ng-focus             = "closeRight()"
+          class                = "typeahead"
+          options              = "typeAheadOpts"
+          datasets             = "allAdresses"
+          typeahead-on-select  = "onSubmitAddress($item, $model, $label)"
+          uib-typeahead        = "address for address in suggestLocation($viewValue)"
+          typeahead-loading    = "loadingLocations"
+          typeahead-no-results = "noResults"
+          autofocus/>
+
+        <div
+          ng-show = "loadingLocations"
+          class   = "loading-typeahead-results">
+
+          <i
+            class   = "glyphicon glyphicon-refresh">
+          </i>
+
+          Recherche en cours...
+        </div>
+
+
+        <div
+          ng-show = "noResults"
+          class   = "no-typeahead-results">
+
+          <i class = "glyphicon glyphicon-remove"></i>
+
+          Aucun résultat trouvé!
+        </div>
+      </div>
+
+      <md-button
+        aria-label = "submit"
+        ng-click   = "suggestionsReady && onSubmitAddress()"
+        class      = "md-raised md-primary">
+
+        <i class = "md-search md-2x"></i>
+      </md-button>
+
+      <i class = "md-menu md-2x" ng-click = "toggleRight()"></i>
+    </div>
+
+    <md-sidenav class="md-sidenav-right md-whiteframe-z2" md-component-id="right">
+      <md-toolbar class="md-theme-light">
+        <h1 class="md-toolbar-tools">Options</h1>
+
+        <md-progress-circular
+          id          = "layer-loading"
+          class       = "md-warn md-hue-3 force-hidden"
+          md-mode     = "indeterminate"
+          md-diameter = "25">
+        </md-progress-circular>
+      </md-toolbar>
+      <md-content class="md-padding">
+
+        <div class = "section-title">
+
+          Type de vue
+        </div>
+
+        <md-radio-group ng-model="mapType">
+
+          <md-radio-button
+            value      = "Satellite"
+            ng-click   = "changeMap('satellite')"
+            aria-label = "Satellite">Satellite
+          </md-radio-button>
+
+          <br/>
+
+          <md-radio-button
+            value      = "Carte"
+            ng-click   = "changeMap('carte')"
+            aria-label = "Carte">Carte
+          </md-radio-button>
+        </md-radio-group>
+      </md-content>
+    </md-sidenav>
+
+    <div id="map"></div>
+
+    <div id="result">
+
+      <div
+        class         = "result-container"
+        layout        = "row"
+        layout-margin>
+
+        <div
+          flex
+          flex-order = "1"
+          class      = "result-box">
+
+          <div class = "box-header">
+            <div class = "box-logo">
+
+              <img src = "img/fibre.png"/>
+            </div>
+
+            <div class = "box-title-description">
+
+              <div class = "box-title">
+
+                Fibre optique (FTTH)
+              </div>
+
+              <div class = "box-desc">
+
+                Le Ftth (Fiber To The Home) “signifie la fibre optique jusqu'à l'abonné”. Cette technologie présente des atouts majeurs (un débit  très fortement  augmenté - de l’ordre de 100 Mbit/s à 1 Gbit/s)  et ouvre des possibilités nouvelles en termes d 'usages numériques.
+
+                <a
+                  href   = "http://www.manchenumerique.fr/Un-citoyen/Equipes-et-connectes/Internet-a-tres-haut-debit#ancre_contenu"
+                  target = "_blank">
+
+                  En savoir plus
+                </a>
+              </div>
+            </div>
+          </div>
+
+          <div
+            class    = "box-body  box-body-ftth"
+            ng-style = "{'border-color': colors.ftth}">
+
+            <hr>
+
+            <div
+              class = "box-eligibilite-title"
+              ng-if = "results.ftth !== undefined && results.ftth.date !== true && !results.ftth.eligible && inscription.cas !== 6">
+
+              possibilité inscription
+
+              <span ng-init = "refreshInscriptionInfo()">
+
+                <span
+                  ng-if = "inscription.open"
+                  class = "box-eligibilite-yes">
+
+                  OUI
+                </span>
+
+                <span
+                  ng-if = "!inscription.open"
+                  class = "box-eligibilite-no">
+
+                  NON
+                </span>
+
+                <div
+                  ng-if = "results.ftth.date && inscription.open"
+                  style = "text-align: center; margin-top: 14px;">
+
+                  <button
+                    type          = "button"
+                    class         = "btn btn-primary btn-lg"
+                    data-toggle   = "modal"
+                    data-backdrop = "static"
+                    data-keyboard = "false"
+                    ng-click      = "initPopup()"
+                    data-target   = "#mn_inscription">
+
+                    Inscription
+                  </button>
+                </div>
+              </span>
+            </div>
+
+            <div class = "box-eligibilite">
+
+              <div
+                ng-if = "results.ftth !== undefined">
+
+                <div
+                  ng-if        = "results.ftth && results.ftth.date !== true && inscription.cas !== 5 && inscription.cas !== 6"
+                  style        = "margin-top: 30px;"
+                  ng-bind-html = "formatDateFTTH(results.ftth.date)">
+                </div>
+
+                <div
+                  ng-if        = "results.ftth.eligible"
+                  style        = "text-align: center; font-weight: bold;">
+
+                  <i
+                    class = "fa fa-check-circle"
+                    style = "font-size: 45px; color: #1fa67a">
+                  </i>
+
+                  <br>
+
+                  Vous êtes situé dans une zone éligible à la fibre optique.<br>
+                  Si vous souhaitez souscrire à une offre très haut débit merci de contacter:<br>
+
+                  <table style = "width: 100%;">
+                    <tr>
+                      <td style = "text-align: center;">
+
+                        <a
+                          href   = "https://boutique.orange.fr/internet/offres-fibre"
+                          target = "_blank">
+
+                          <img
+                            src   = "img/orange.jpg"
+                            alt   = "Orange"
+                            style = "width: 80px;"/>
+                        </a>
+                      </td>
+
+                      <td>
+
+                        <a
+                          href   = "http://www.sfr.fr/offre-internet/fibre-optique"
+                          target = "_blank">
+
+                          <img
+                            src   = "img/sfr.jpg"
+                            alt   = "SFR"
+                            style = "width: 80px;"/>
+                        </a>
+                      </td>
+                    </tr>
+                  </table>
+                </div>
+
+                <div ng-if = "inscription.message">
+
+                  {{inscription.message}}
+
+                  <div ng-if = "inscription.cas === 6">
+
+                    <table style="width:100%;">
+                      <tr>
+                        <td style="width:33%;text-align:center;">
+                          <a href = "http://www.comcable.fr" target="_blank">
+                            <img style="width:100%;" src="./img/comcable.png"/>
+                          </a>
+                        </td>
+                        <td style="width:33%;text-align:center;">
+                          <a href = "http://www.k-net.fr" target="_blank">
+                            <img style="width:100%;" src="./img/knet.png"/>
+                          </a>
+                        </td>
+                        <td style="width:33%;text-align:center;">
+                          <a href = "http://www.ozone.net" target="_blank">
+                            <img style="width:100%;" src="./img/ozone.png"/>
+                          </a>
+                        </td>
+                      </tr>
+                      <tr>
+                        <td style="width:33%;text-align:center;">
+                          <a href = "http://www.wibox.fr" target="_blank">
+                            <img style="width:110%;" src="./img/wibox.png"/>
+                          </a>
+                        </td>
+                        <td style="width:33%;text-align:center;">
+                          <a href = "http://www.lafibrevideofutur.fr/" target="_blank">
+                            <img style="width:80%;" src="./img/videofutur.png"/>
+                          </a>
+                        </td>
+                        <td style="width:33%;text-align:center;">
+                          <a href = "https://www.coriolis.com/forfait-internet/fibre" target="_blank">
+                            <img style="width:80%;" src="./img/coriolis.png"/>
+                          </a>
+                        </td>
+                      </tr>
+                      <tr>
+                        <td style="width:33%;text-align:center;">
+                          <a href = "https://www.nordnet.com/connexion-internet/internet-fibre" target="_blank">
+                            <img style="width:100%;" src="./img/nordnet.png"/>
+                          </a>
+                        </td>
+                        <td style="width:33%;text-align:center;">
+                          &nbsp;
+                        </td>
+                        <td style="width:33%;text-align:center;">
+                          &nbsp;
+                        </td>
+                      </tr>
+                    </table>
+                  </div>
+                </div>
+
+                <div
+                  class = "box-description-more"
+                  ng-if = "!results.ftth._advanced"
+                  style = "margin-bottom: 30px;">
+
+                  <a
+                    href     = ""
+                    ng-click = "results.ftth._advanced = true">
+
+                    + détails
+                  </a>
+                </div>
+
+                <div
+                  ng-if        = "results.ftth._advanced"
+                  ng-bind-html = "formatResults('ftth', results.ftth)">
+                </div>
+              </div>
+
+              <div
+                ng-if = "results.ftth === undefined"
+                class = "box-eligibilite-spinner">
+
+                <md-progress-circular class="md-warn md-hue-3" md-mode="indeterminate"></md-progress-circular>
+              </div>
+            </div>
+          </div>
+        </div>
+
+        <div
+          flex
+          flex-order = "2"
+          class      = "result-box">
+
+          <div class = "box-header">
+            <div class = "box-logo">
+
+              <img src = "img/adsl.png"/>
+            </div>
+
+            <div class = "box-title-description">
+
+              <div class = "box-title">
+
+                ADSL (téléphone)
+              </div>
+
+              <div class = "box-desc">
+
+                L'ADSL est une technologie permettant l'accès à internet haut débit par le biais de la ligne téléphonique, constituée  de fils de cuivre.  Cette  ligne  téléphonique  relie  votre domicile  au central téléphonique  de France Télécom.
+                <a
+                  href   = "http://www.manchenumerique.fr/Un-citoyen/Equipes-et-connectes/Acceder-a-internet-haut-debit-partout-dans-la-Manche"
+                  target = "_blank">
+
+                  En savoir plus
+                </a>
+              </div>
+            </div>
+          </div>
+
+          <div
+            class    = "box-body  box-body-adsl"
+            ng-style = "{'border-color': colors.adsl}">
+
+            <div class = "box-description-more">
+
+
+            </div>
+
+
+            <hr>
+
+            <div
+              class = "box-eligibilite-title"
+              ng-if = "results.adsl !== undefined">
+
+              éligibilité
+
+              <span>
+
+                <span
+                  ng-if = "results.adsl && results.adsl.LEGENDE !== 'Non eligible' && results.adsl.classedebi !== '0'"
+                  class = "box-eligibilite-yes">
+
+                  OUI
+                </span>
+
+                <span
+                  ng-if = "!results.adsl || results.adsl.LEGENDE === 'Non eligible' || results.adsl.classedebi === '0'"
+                  class = "box-eligibilite-no">
+
+                  NON
+                </span>
+              </span>
+            </div>
+
+            <div class = "box-eligibilite">
+
+              <div
+                ng-if = "results.adsl !== undefined">
+
+                <div
+                  class = "popup-line"
+                  ng-if = "!results.adsl._advanced && results.adsl.classedebi && results.adsl.classedebi !== 'Non eligible'">
+
+                  <span class="popup-title">
+
+                    <span
+                      ng-if = "results.adsl.classedebi === '0'">
+
+                      Non éligible
+                    </span>
+
+                    <span
+                      ng-if = "results.adsl.classedebi === '1'">
+
+                      ADSL < 3 Mbit/s
+                    </span>
+
+                    <span
+                      ng-if = "results.adsl.classedebi === '2'">
+
+                      ADSL 3 à 8 Mbit/s
+                    </span>
+
+                    <span
+                      ng-if = "results.adsl.classedebi === '3'">
+
+                      ADSL 8 à 30 Mbit/s
+                    </span>
+
+                    <span
+                      ng-if = "results.adsl.classedebi === '4'">
+
+                      ADSL 30 à 100 Mbit/s
+                    </span>
+                  </span>
+                </div>
+
+                <div
+                  class = "box-description-more"
+                  ng-if = "!results.adsl._advanced"
+                  style = "margin-bottom: 30px;">
+
+                  <a
+                    href     = ""
+                    ng-click = "results.adsl._advanced = true">
+
+                    + détails
+                  </a>
+                </div>
+
+                <div
+                  ng-if        = "results.adsl._advanced"
+                  ng-bind-html = "formatResults('adsl', results.adsl)">
+                </div>
+              </div>
+
+              <div
+                ng-if = "results.adsl === undefined"
+                class = "box-eligibilite-spinner">
+
+                <md-progress-circular class="md-warn md-hue-3" md-mode="indeterminate"></md-progress-circular>
+              </div>
+            </div>
+          </div>
+        </div>
+
+        <div
+          flex
+          flex-order = "3"
+          class      = "result-box">
+
+          <div class = "box-header">
+            <div class = "box-logo">
+
+              <img src = "img/mimo.png"/>
+            </div>
+
+            <div class = "box-title-description">
+
+              <div class = "box-title">
+
+                Réseau MiMo
+              </div>
+
+              <div class = "box-desc">
+
+                Cette technologie hertzienne, déployée par Manche Numérique, permet de desservir les zones non-éligibles à I'ADSL dites "zones blanches" et les zones qui seront déployées ultérieurement par la fibre optique.  Le MiMo permet un accès à internet et à un service de téléphonie. Cette technologie offre des débits de l'ordre de 20 Mbit/s descendants et de 3 Mbit/s montants.
+
+                <a
+                  href   = "http://www.manchenumerique.fr/Un-citoyen/Equipes-et-connectes/MiMo"
+                  target = "_blank">
+
+                  En savoir plus
+                </a>
+              </div>
+            </div>
+          </div>
+
+          <div
+            class    = "box-body  box-body-mimo"
+            ng-style = "{'border-color': colors.mimo}">
+
+            <hr>
+
+            <div
+              class = "box-eligibilite-title"
+              ng-if = "results.mimo !== undefined">
+
+              éligibilité
+
+              <span>
+
+                <span
+                  ng-if = "results.mimo"
+                  class = "box-eligibilite-yes">
+
+                  OUI
+                </span>
+
+                <span
+                  ng-if = "!results.mimo"
+                  class = "box-eligibilite-no">
+
+                  NON
+                </span>
+              </span>
+            </div>
+
+            <div class = "box-eligibilite">
+
+              <div
+                ng-if = "results.mimo">
+
+                <p class="bg-warning">Votre éligibilité à la technologie MiMo est théorique. Seul le passage d'un antenniste pourra confirmer votre niveau de signal.</p>
+
+                <div>
+                Vous pouvez souscrire à une offre d'accès internet auprès de l'un de ces FAI:
+
+                  <table style = "width:100%">
+                    <tr>
+                      <td style = "width:50%">
+                        <div class = "bg-info">
+
+                          <a
+                            href = "https://www.ozone.net/"
+                            target = "_blank">
+                            <img style="height:40px;" src="./img/ozone.png"/>
+                            <br/>
+                            Ozone.net
+                          </a>
+                          <br/>
+                          <i class ="fa fa-phone"></i>
+                          0 973 01 1000
+                        </div>
+                      </td>
+                      <td style = "width:50%">
+                        <div class = "bg-info">
+
+                          <a
+                            href = "https://www.nordnet.com/connexion-internet/internet-radio"
+                            target = "_blank">
+                            <img style="height:40px;" src="./img/nordnet.png"/>
+                            <br/>
+                            Nordnet.com
+                          </a>
+                          <br/>
+                          <i class ="fa fa-phone"></i>
+                          3420
+                        </div>
+                      </td>
+                    </tr>
+                  </table>
+                </div>
+                <div
+                  class = "box-description-more"
+                  ng-if = "!results.mimo._advanced"
+                  style = "margin-bottom: 30px;">
+
+                  <a
+                    href     = ""
+                    ng-click = "results.mimo._advanced = true">
+
+                    + détails
+                  </a>
+                </div>
+
+                <div
+                  ng-if        = "results.mimo_advanced"
+                  ng-bind-html = "formatResults('mimo', results.mimo)">
+                </div>
+              </div>
+
+              <div
+                ng-init = "refreshInscriptionInfo()"
+                ng-if   = "(!results.ftth.date || !inscription.open) && (!results.adsl || results.adsl.legende === 'Non eligible') && !results.mimo && results.mimo !== undefined">
+
+                <p class="bg-warning">Nous vous invitons à contacter les services de <a href="http://www.manchenumerique.fr" >Manche Numérique</a> qui vous indiqueront la procédure pour une connecion internet par satellite et bénéficier d'une prise en charge de l'installation du kit satellitaire par un antenniste.</p>
+
+              </div>
+
+              <div
+                ng-if = "results.mimo === undefined"
+                class = "box-eligibilite-spinner">
+
+                <md-progress-circular class="md-warn md-hue-3" md-mode="indeterminate"></md-progress-circular>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <!-- Modal -->
+    <div
+      class           = "modal fade"
+      id              = "mn_inscription"
+      tabindex        = "-1"
+      role            = "dialog"
+      backdrop        = "static"
+      aria-labelledby = "mn_inscriptionLabel">
+
+      <div
+        class = "modal-dialog"
+        role  = "document">
+
+        <div class = "modal-content">
+
+          <div class = "modal-header">
+
+            <button
+              type         = "button"
+              class        = "close"
+              data-dismiss = "modal"
+              aria-label   = "Close">
+
+              <span aria-hidden = "true">&times;</span>
+            </button>
+
+            <h4
+              class = "modal-title"
+              id    = "mn_inscriptionLabel">
+
+              FORMULAIRE DE MANIFESTATION D'INTERET À LA FIBRE OPTIQUE
+            </h4>
+          </div>
+
+          <div class = "modal-body">
+
+            <div ng-if = "!postForm">
+
+              Vous souhaitez bénéficier d’un abonnement à la fibre optique et pouvoir être raccordé au réseau FttH au tarif préférentiel de 50€, nous vous remercions de bien vouloir compléter ce formulaire. Après vérification, Manche Numérique se chargera de transmettre votre demande ainsi que vos coordonnées à la société Manche Fibre, délégataire de service public, qui vous informera des modalités du raccordement final et de la date d’ouverture du réseau à la commercialisation.
+            </div>
+
+            <div
+              class      = "mn-form"
+              ng-if      = "!postForm"
+              ng-include = "'./html/form.html'">
+
+            </div>
+
+            <div
+              class      = "mn-form-in-progress"
+              ng-if      = "postForm.inProgress">
+
+                <i class="fa fa-circle-o-notch fa-spin"></i>
+                <br/>
+                Enregistrement en cours...
+            </div>
+
+            <div
+              class      = "mn-form-error"
+              ng-if      = "postForm.error">
+
+                <i class="fa fa-exclamation-circle"></i>
+                <br/>
+                Error: {{postForm.error}}
+            </div>
+
+            <div
+              class      = "mn-form-ok"
+              ng-if      = "postForm.ok">
+
+                <i class="fa fa-check-circle-o"></i>
+                <br/>
+                Votre demande a bien été prise en compte. Un mail de confirmation vous a été envoyé.
+            </div>
+          </div>
+
+          <div class = "modal-footer">
+
+            <button
+              type         = "button"
+              class        = "btn btn-default"
+              data-dismiss = "modal">
+
+              Fermer
+            </button>
+
+            <button
+              type        = "button"
+              ng-if       = "!postForm"
+              ng-click    = "ready = true; isFormValid() ? postFormEl() : null"
+              class       = "btn btn-primary">
+
+              Valider
+            </button>
+          </div>
+        </div>
+      </div>
+    </div>
+  </body>
+</html>

+ 24 - 24
js/app.js

@@ -554,16 +554,16 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
 
     // Already deployed
     if (
-      $scope.results.ftth.PHASE_TRAV === 'Perimetre deploye FTTH MT' ||
-      $scope.results.ftth.PHASE_TRAV === 'Perimetre Manche Telecom'
+      $scope.results.ftth.phase_trav === 'Perimetre deploye FTTH MT' ||
+      $scope.results.ftth.phase_trav === 'Perimetre Manche Telecom'
     ) {
       $scope.results.ftth.eligible = true;
     }
 
     // Si date de début de travaux réelle est renseignée
-    if ($scope.results.ftth.DATE_DEB_TRAV_REEL) {
+    if ($scope.results.ftth.date_deb_trav_reel) {
       // Compute Date
-      momentDate = moment($scope.results.ftth.DATE_DEB_TRAV_REEL, 'DD/MM/YY');
+      momentDate = moment($scope.results.ftth.date_deb_trav_reel, 'YYYY-MM-DD');
 
       momentDate.add(nbJoursFTTH, 'days');
 
@@ -574,13 +574,13 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
 
       $scope.results.ftth.date = semester + ' semestre ' + momentDate.format('YYYY');
     } else if (
-      ($scope.results.ftth.PHASE_TRAV === 'Tranche 1 Travaux' ||
-        $scope.results.ftth.PHASE_TRAV === 'Tranche 1 Travaux completude') &&
-      $scope.results.ftth.DATE_DEB_TRAV_PREV
+      ($scope.results.ftth.phase_trav === 'Tranche 1 Travaux' ||
+        $scope.results.ftth.phase_trav === 'Tranche 1 Travaux completude') &&
+      $scope.results.ftth.date_deb_trav_prev
     ) {
       // Si date de début de travaux prévisionnelle est renseignée
       // Compute Date
-      momentDate = moment($scope.results.ftth.DATE_ABONNEMENT_PREV, 'DD/MM/YY');
+      momentDate = moment($scope.results.ftth.date_abonnement_prev, 'YYYY-MM-DD');
       momentDate.add(nbJoursFTTH, 'days');
 
       var semester = '1er';
@@ -597,7 +597,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
   };
 
   var formatDate = function(value) {
-    return moment(value, 'DD/MM/YY');
+    return moment(value, 'YYYY-MM-DD');
   };
 
   var getFullAddress = function(callback) {
@@ -675,7 +675,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
         // Debugging purpose
         if (window.location.hostname === 'localhost') {
           onResults(
-            '{"x":-1.763289,"y":49.3660125,"ftth":[{"ID_ZAPM_PARTIELLE":"049AP0","PHASE_TRAV":"Tranche 1 Travaux","DATE_DEB_TRAV_PREV":"19/02/16","DATE_DEB_TRAV_REEL":"26/10/17","DATE_OUV_BUL_PRERACCO":"01/01/16","DATE_FERM_BUL_PRERACCO":null,"DATE_ABONNEMENT_PREV":"26/10/19","DATE_OUV_COMMERCIALISATION":null,"eligible":false,"date":"2nd semestre 2019"}],"adsl":{"ID_ADSL_MTHD":"2842","CLASSEDEBI":"2","CLASSE_LEGENDE":"ADSL 3 a 8 Mbit/s"},"mimo":{"ID_MIMO_ANTC_COUVERTURE_6KM":"10","DATE_OUV_SERVICE_REEL":"19/02/16","DATE_OUV_SERVICE_PREV":"T1 2016"},"address":"Rue des Fauvettes, 50270, Barneville-Plage, Barneville-Carteret, Manche, Normandie, FRA"}'
+            '{"x":-1.763289,"y":49.3660125,"ftth":[{"id_zapm_partielle":"049AP0","phase_trav":"Tranche 1 Travaux","date_deb_trav_prev":"19/02/16","date_deb_trav_reel":"26/10/17","date_ouv_bul_preracco":"01/01/16","date_ferm_bul_preracco":null,"date_abonnement_prev":"26/10/19","date_ouv_commercialisation":null,"eligible":false,"date":"2nd semestre 2019"}],"adsl":{"id_num":"2842","classedebi":"2","classe_legende":"ADSL 3 a 8 Mbit/s"},"mimo":{"id_num":"10","date_ouv_service_reel":"19/02/16","date_ouv_service_prev":"T1 2016"},"address":"Rue des Fauvettes, 50270, Barneville-Plage, Barneville-Carteret, Manche, Normandie, FRA"}'
           );
         } else {
           console.error(e);
@@ -750,7 +750,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
 
   var isDate = function(value) {
     return (
-      value.toString().length === 8 && value.toString().substr(2, 1) === '/' && value.toString().substr(5, 1) === '/'
+    	/^\d{4}-\d{2}-\d{2}$/.test(value.toString())
     );
   };
 
@@ -978,7 +978,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
       value = $scope.dictionary[value] || value;
 
       var date;
-      if (property.substring(0, 5) === 'DATE_' && !$scope.dictionary[value] && isDate(value)) {
+      if (property.substring(0, 5) === 'date_' && !$scope.dictionary[value] && isDate(value)) {
         date = formatDate(value);
       }
 
@@ -1073,9 +1073,9 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
       return false;
     }
 
-    var dateDeb = moment($scope.results.ftth.DATE_OUV_BUL_PRERACCO, 'DD/MM/YY');
-    var dateFin = moment($scope.results.ftth.DATE_FERM_BUL_PRERACCO, 'DD/MM/YY');
-    var dateCom = moment($scope.results.ftth.DATE_OUV_COMMERCIALISATION, 'DD/MM/YY');
+    var dateDeb = moment($scope.results.ftth.date_ouv_bul_preracco, 'YYYY-MM-DD');
+    var dateFin = moment($scope.results.ftth.date_ferm_bul_preracco, 'YYYY-MM-DD');
+    var dateCom = moment($scope.results.ftth.date_ouv_commercialisation, 'YYYY-MM-DD');
     var dateEndButton = dateFin.add(31, 'days');
 
     var now = moment();
@@ -1085,7 +1085,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
 
     var diffDaysEndButton = now.diff(dateEndButton) / 1000 / 3600 / 24;
 
-    var isOpen = diffDaysDeb > 0 && (!$scope.results.ftth.DATE_FERM_BUL_PRERACCO || diffDaysEndButton < 0);
+    var isOpen = diffDaysDeb > 0 && (!$scope.results.ftth.date_ferm_bul_preracco || diffDaysEndButton < 0);
     var isMarketable = !!diffDaysCom;
 
     var cas = 0;
@@ -1095,7 +1095,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
       // Perimetre MT Saint Love et Cherbourg
       cas = 7;
       message = null;
-    } else if ($scope.results.ftth.DATE_OUV_COMMERCIALISATION && isMarketable) {
+    } else if ($scope.results.ftth.date_ouv_commercialisation && isMarketable) {
       var jct = diffDaysCom < 0 ? 'va débuter' : 'a débuté';
       message =
         'La commercialisation des offres FttH sur votre secteur ' +
@@ -1104,7 +1104,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
         dateCom.lang('fr').format('ll') +
         '. Pour souscrire à une offre internet Très Haut Débit, contactez les fournisseurs d’accès présents sur le réseau :';
       cas = 6;
-    } else if ($scope.results.ftth.DATE_FERM_BUL_PRERACCO && diffDaysFin > 31) {
+    } else if ($scope.results.ftth.date_ferm_bul_preracco && diffDaysFin > 31) {
       cas = 5;
       isOpen = false;
       message =
@@ -1116,7 +1116,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
           : '';
       cas = 3;
 
-      if (!message && $scope.results.ftth.DATE_FERM_BUL_PRERACCO) {
+      if (!message && $scope.results.ftth.date_ferm_bul_preracco) {
         if (diffDaysFin < 31) {
           message =
             'Les travaux dans votre secteur sont terminés. Il vous reste ' +
@@ -1125,11 +1125,11 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
           cas = 4;
         }
       }
-    } else if ($scope.results.ftth.DATE_OUV_BUL_PRERACCO && diffDaysDeb < 0) {
-      message = 'L’inscription sera possibe à partir du ' + dateDeb.lang('fr').format('ll');
+    } else if ($scope.results.ftth.date_ouv_bul_preracco && diffDaysDeb < 0) {
+      message = 'L’inscription sera possible à partir du ' + dateDeb.lang('fr').format('ll');
       cas = 2;
-    } else if ($scope.results.ftth.DATE_DEB_TRAV_PREV) {
-      var date = moment($scope.results.ftth.DATE_DEB_TRAV_PREV, 'DD/MM/YY').add(24, 'M');
+    } else if ($scope.results.ftth.date_deb_trav_prev) {
+      var date = moment($scope.results.ftth.date_deb_trav_prev, 'YYYY-MM-DD').add(24, 'M');
 
       message = null;
       cas = 1;
@@ -1188,7 +1188,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
     $scope.postForm = { inProgress: true };
 
     // Add ID_ZAPM_PARTIELLE
-    $scope.result.eligibilite.id_zapm_partielle = $scope.results.ftth.ID_ZAPM_PARTIELLE;
+    $scope.result.eligibilite.id_zapm_partielle = $scope.results.ftth.id_zapm_partielle;
 
     _.each($scope.result.autres, function(value, key) {
       $scope.result.eligibilite[key] = value;