Fixed input validation in all forms
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user