boutils před 10 roky
rodič
revize
3f522cf942
1 změnil soubory, kde provedl 8 přidání a 4 odebrání
  1. 8 4
      js/app.js

+ 8 - 4
js/app.js

@@ -468,7 +468,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
     }
   };
 
-  var computeFullAdress = function() {
+  var computeFullAddress = function() {
     return $scope.result.eligibilite.complement_addresse;
   };
 
@@ -1204,7 +1204,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
         // Adresse
         body += '<tr>';
         body += '<th style="text-align: left;white-space: nowrap;height: 40px;color: #666;">Adresse</th>';
-        body += '<td>' + computeFullAdress() + '</td>';
+        body += '<td>' + computeFullAddress() + '</td>';
         body += '</tr>';
 
         // Vous etes
@@ -1240,6 +1240,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
 
         body += 'A bientôt sur:  <a href="' + siteUrl + '">' + siteName + '</a>';
 
+        console.log('body', body);
         var mail = {
           to     : $scope.result.eligibilite.email,
           sujet  : 'Votre demande de pré-raccordement FTTH n° ' + numDemande,
@@ -1258,13 +1259,16 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
         });
 
         $scope.result.eligibilite = {};
+        $scope.autres             = {};
+        $scope.address            = null;
+        $scope.magicKey           = null;
+
       }
       else {
         $scope.postForm = {error: msg};
       }
 
-      $scope.autres = {};
-
+      $scope.hideResultPane();
       $scope.$apply();
     });
   };