Fixed input validation in all forms
This commit is contained in:
@@ -26,6 +26,6 @@
|
|||||||
<label>Asuinkunta: </label>
|
<label>Asuinkunta: </label>
|
||||||
<input id="PORField" required type="text" placeholder="Otaniemi" class="form-control" ng-model="POR"></input>
|
<input id="PORField" required type="text" placeholder="Otaniemi" class="form-control" ng-model="POR"></input>
|
||||||
</div>
|
</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>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<label>Asuinkunta: </label>
|
<label>Asuinkunta: </label>
|
||||||
<input id="PORField" required type="text" placeholder="Otaniemi" class="form-control" ng-model="application.member.POR"></input>
|
<input id="PORField" required type="text" placeholder="Otaniemi" class="form-control" ng-model="application.member.POR"></input>
|
||||||
</div>
|
</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>
|
<button class="btn btn-warning" ng-click="cancelappl()" type="submit" id="sendmember">Peruuta</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
<label>Asuinkunta: </label>
|
<label>Asuinkunta: </label>
|
||||||
<input id="PORField" required type="text" placeholder="Otaniemi" class="form-control" ng-model="member.POR"></input>
|
<input id="PORField" required type="text" placeholder="Otaniemi" class="form-control" ng-model="member.POR"></input>
|
||||||
</div>
|
</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>
|
<button class="btn btn-warning" ng-click="cancel()" type="submit" id="sendmember">Peruuta</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -147,13 +147,13 @@ app.controller("applController", function($scope, $http, $route, $routeParams, $
|
|||||||
app.controller("editController",editor("/list"));
|
app.controller("editController",editor("/list"));
|
||||||
app.controller("appleditController", editor("/applications"));
|
app.controller("appleditController", editor("/applications"));
|
||||||
|
|
||||||
app.controller("addManyController", function($scope, $http, $location) {
|
app.controller("addManyController", function($scope, $http, $window) {
|
||||||
$scope.memberData = '';
|
$scope.memberData = '';
|
||||||
$scope.sendCSV = function() {
|
$scope.sendCSV = function() {
|
||||||
$http.post("/members/api/csvimport", $scope.memberData).then(
|
$http.post("/members/api/csvimport", $scope.memberData).then(
|
||||||
function(response) {
|
function(response) {
|
||||||
notySuccess("Lähetys onnistui");
|
notySuccess("Lähetys onnistui");
|
||||||
$location.path("/addmany");
|
$window.location.reload();
|
||||||
},
|
},
|
||||||
function(response) {
|
function(response) {
|
||||||
notyError("Lähetys epäonnistui");
|
notyError("Lähetys epäonnistui");
|
||||||
|
|||||||
Reference in New Issue
Block a user