Created js controller for the mass import and changed style of the mass
import page
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
<h1> Lisää useampi jäsen </h1>
|
||||
|
||||
<div>
|
||||
<input id="fileUpload" type="file" accept=".csv" ></input>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<textarea ng-model="memberData" rows="20" cols="120"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<button ng-click="sendCSV()" type="submit" class="btn btn-success" id="sendMembers">Lähetä</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -146,3 +146,18 @@ 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) {
|
||||
$scope.memberData = '';
|
||||
$scope.sendCSV = function($scope.memberData){
|
||||
$http.post("/members/api/csvimport").then(
|
||||
function(response) {
|
||||
notySuccess("Lähetys onnistui");
|
||||
$location.path("/addmany");
|
||||
},
|
||||
function(response) {
|
||||
notyError("Lähetys epäonnistui");
|
||||
}
|
||||
);
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user