From 18a1badf267bc76e72f477f063c1e502b6d2e582 Mon Sep 17 00:00:00 2001 From: Martin Geno Date: Wed, 7 Dec 2016 21:57:21 +0100 Subject: [PATCH] host: fix signup --- public/app/host/admin/profil.jade | 2 +- public/app/host/signup.jade | 7 ++++--- public/app/host/signup.js | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/public/app/host/admin/profil.jade b/public/app/host/admin/profil.jade index e5d936b..48ee51b 100644 --- a/public/app/host/admin/profil.jade +++ b/public/app/host/admin/profil.jade @@ -7,4 +7,4 @@ td(data-title="'ProfilID'", filter="{'ID': 'text'}") {{item.ID}} 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-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)") diff --git a/public/app/host/signup.jade b/public/app/host/signup.jade index e01854d..8f0772c 100644 --- a/public/app/host/signup.jade +++ b/public/app/host/signup.jade @@ -6,10 +6,11 @@ .panel-footer(ng-if="!profil.ID && status") .checkbox label - input(type="checkbox",ng-model="agb") + input(type="checkbox",ng-model="obj.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") - | 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") | You have already signup diff --git a/public/app/host/signup.js b/public/app/host/signup.js index 1615ccb..462e9c5 100644 --- a/public/app/host/signup.js +++ b/public/app/host/signup.js @@ -4,7 +4,7 @@ angular.module('warehost') .controller('SignupHostCtrl',function(session,config,alert,$scope,$http){ $scope.status = false; $scope.profil = {}; - $scope.agb = false; + $scope.obj = {agb: false}; alert.set({}); function load(){ $http.get(config.api+'/host/profil').then(function(res){ @@ -20,7 +20,7 @@ angular.module('warehost') }); } $scope.signup = function(){ - if($scope.agb){ + if($scope.obj.agb){ $http.post(config.api+'/host/signup').then(function(res){ session.set(res); alert.set(res);