sum7/warehost-frontend
sum7
/
warehost-frontend
Archived
1
0
Fork 0

host: fix signup

This commit is contained in:
Martin Geno 2016-12-07 21:57:21 +01:00
parent 787e98d0e6
commit 18a1badf26
3 changed files with 7 additions and 6 deletions

View File

@ -7,4 +7,4 @@
td(data-title="'ProfilID'", filter="{'ID': 'text'}") {{item.ID}} td(data-title="'ProfilID'", filter="{'ID': 'text'}") {{item.ID}}
td(data-title="'Reseller'", filter="{'reseller': 'components/ngfilter-boolean.html'}") td(data-title="'Reseller'", filter="{'reseller': 'components/ngfilter-boolean.html'}")
span.glyphicon.glyphicon-ok(aria-hidden="true",ng-if="item.reseller",ng-click="toggle(item)") span.glyphicon.glyphicon-ok(aria-hidden="true",ng-if="item.reseller",ng-click="toggle(item)")
span.glyphicon.glyphicon-lock(aria-hidden="true",ng-if="!item.reseller",ng-click="toggle(item)") span.glyphicon.glyphicon-remove(aria-hidden="true",ng-if="!item.reseller",ng-click="toggle(item)")

View File

@ -6,10 +6,11 @@
.panel-footer(ng-if="!profil.ID && status") .panel-footer(ng-if="!profil.ID && status")
.checkbox .checkbox
label label
input(type="checkbox",ng-model="agb") input(type="checkbox",ng-model="obj.agb")
| Accept AGB | Accept AGB
.btn.btn-default(type="submit",ng-click="signup()",ng-class="{'disabled':!agb}") Submit .btn.btn-default(type="submit",ng-click="signup()",ng-class="{'disabled':!obj.agb}") Submit
.panel-footer(ng-if="!profil.ID && !status") .panel-footer(ng-if="!profil.ID && !status")
| You are not allow to signup Hosting | You are not allow to signup Hosting:
| it could be you are not logged in, not a superadmin or your invitor is no reseller
.panel-footer(ng-if="profil.ID") .panel-footer(ng-if="profil.ID")
| You have already signup | You have already signup

View File

@ -4,7 +4,7 @@ angular.module('warehost')
.controller('SignupHostCtrl',function(session,config,alert,$scope,$http){ .controller('SignupHostCtrl',function(session,config,alert,$scope,$http){
$scope.status = false; $scope.status = false;
$scope.profil = {}; $scope.profil = {};
$scope.agb = false; $scope.obj = {agb: false};
alert.set({}); alert.set({});
function load(){ function load(){
$http.get(config.api+'/host/profil').then(function(res){ $http.get(config.api+'/host/profil').then(function(res){
@ -20,7 +20,7 @@ angular.module('warehost')
}); });
} }
$scope.signup = function(){ $scope.signup = function(){
if($scope.agb){ if($scope.obj.agb){
$http.post(config.api+'/host/signup').then(function(res){ $http.post(config.api+'/host/signup').then(function(res){
session.set(res); session.set(res);
alert.set(res); alert.set(res);