Fixed input validation in all forms

This commit is contained in:
HooVee
2016-08-25 20:25:43 +03:00
parent 5c11fdfdbd
commit 107b332358
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -26,6 +26,6 @@
<label>Asuinkunta: </label>
<input id="PORField" required type="text" placeholder="Otaniemi" class="form-control" ng-model="POR"></input>
</div>
<button ng-click="send()" type="submit" class="btn btn-success" id="sendmember">Tallenna</button>
<button ng-click="memberForm.$valid && send()" type="submit" class="btn btn-success" id="sendmember">Tallenna</button>
</form>
</div>
+1 -1
View File
@@ -26,7 +26,7 @@
<label>Asuinkunta: </label>
<input id="PORField" required type="text" placeholder="Otaniemi" class="form-control" ng-model="application.member.POR"></input>
</div>
<button class="btn btn-success" ng-click="sendappl()" type="submit" id="sendmember">Tallenna</button>
<button class="btn btn-success" ng-click="applicationForm.$valid && sendappl()" type="submit" id="sendmember">Tallenna</button>
<button class="btn btn-warning" ng-click="cancelappl()" type="submit" id="sendmember">Peruuta</button>
</form>
</div>
+1 -1
View File
@@ -26,7 +26,7 @@
<label>Asuinkunta: </label>
<input id="PORField" required type="text" placeholder="Otaniemi" class="form-control" ng-model="member.POR"></input>
</div>
<button class="btn btn-success" ng-click="send()" type="submit" id="sendmember">Tallenna</button>
<button class="btn btn-success" ng-click="memberForm.$valid && send()" type="submit" id="sendmember">Tallenna</button>
<button class="btn btn-warning" ng-click="cancel()" type="submit" id="sendmember">Peruuta</button>
</form>
</div>
+2 -2
View File
@@ -147,13 +147,13 @@ app.controller("applController", function($scope, $http, $route, $routeParams, $
app.controller("editController",editor("/list"));
app.controller("appleditController", editor("/applications"));
app.controller("addManyController", function($scope, $http, $location) {
app.controller("addManyController", function($scope, $http, $window) {
$scope.memberData = '';
$scope.sendCSV = function() {
$http.post("/members/api/csvimport", $scope.memberData).then(
function(response) {
notySuccess("Lähetys onnistui");
$location.path("/addmany");
$window.location.reload();
},
function(response) {
notyError("Lähetys epäonnistui");