From 4f810ec04a2a3588ab4c8097847a0bb83b705ba2 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Tue, 2 May 2017 13:08:39 +0200 Subject: [PATCH] Properly reset add field when canceling --- js/public/app.js | 1 + templates/main.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/js/public/app.js b/js/public/app.js index 047d6c9..0077ca5 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -246,6 +246,7 @@ app.controller('WeatherController', ['$scope', '$interval', '$timeout', '$compil if (r.data != null && !undef(r.data['id'])) { $scope.cities.push({"name": city.name, "id": r.data['id']}) $scope.showAddCity = false; + city.name = ""; } else { $scope.addCityError = 'Failed to add city. Please contact your administrator'; diff --git a/templates/main.php b/templates/main.php index 3ba713c..79f9640 100644 --- a/templates/main.php +++ b/templates/main.php @@ -12,7 +12,7 @@
  • - Add a city... + Add a city...

    Add city