Browse Source

fixed conflicts

pull/146/head
Mohammed Tantawy 7 years ago
parent
commit
583e46e3a7
12 changed files with 238 additions and 217 deletions
  1. +2
    -1
      src/assets/scripts/app/index.js
  2. +27
    -0
      src/assets/scripts/app/shared.service.js
  3. +7
    -13
      src/assets/scripts/dashboard/dashboard.controller.js
  4. +3
    -3
      src/assets/scripts/dashboard/index.js
  5. +1
    -1
      src/assets/scripts/index.js
  6. +0
    -30
      src/assets/scripts/login/controller.js
  7. +22
    -0
      src/assets/scripts/nwLogin/controller.js
  8. +9
    -4
      src/assets/scripts/nwLogin/index.js
  9. +156
    -0
      src/assets/scripts/nwLogin/nwLogin.html
  10. +5
    -5
      src/assets/scripts/nwLogin/service.js
  11. +6
    -3
      src/index.html
  12. +0
    -157
      src/login.html

+ 2
- 1
src/assets/scripts/app/index.js View File

@ -1,5 +1,6 @@
import angular from 'angular';
import ngRoute from 'angular-route';
import UserService from './shared.service';
angular.module('NomitWisp',
[
@ -14,9 +15,9 @@ angular.module('NomitWisp',
ngRoute
])
.factory(UserService.name, UserService)
.config(function ($routeProvider, $httpProvider) {
$httpProvider.defaults.withCredentials = true;
$routeProvider
.when('/', {
controller: 'DashboardController',


+ 27
- 0
src/assets/scripts/app/shared.service.js View File

@ -0,0 +1,27 @@
import * as $ from 'jquery';
function parseJwt(token) {
var base64Url = token.split('.')[1];
var base64 = base64Url.replace('-', '+').replace('_', '/');
return JSON.parse(window.atob(base64));
};
const UserService = ($cookies, $rootScope) => {
let serv = {};
//load user has been called (is called on page load in menu controller and after login on modal controller)
serv.loadUser = function () {
if(typeof $cookies.get('access_token') !== 'undefined' ){
$rootScope.$broadcast('loadUserSuccess', parseJwt( $cookies.get('access_token') ));
$('#modalLoginForm').modal('hide');
} else {
$('#modalLoginForm').modal('show');
}
}
return serv;
};
export default UserService;

+ 7
- 13
src/assets/scripts/dashboard/dashboard.controller.js View File

@ -1,17 +1,11 @@
/** @ngInject */
const DashboardController = ($scope, $cookies) => {
const token = $cookies.get('access_token');
console.log(token);
if(typeof(token) !== "undefined"){
$scope.user = parseJwt( token );
}
}
const DashboardController = ($scope) => {
$scope.$on('loadUserSuccess', function(user) {
$scope.user = user;
function parseJwt(token) {
var base64Url = token.split('.')[1];
var base64 = base64Url.replace('-', '+').replace('_', '/');
return JSON.parse(window.atob(base64));
};
// tutte le funzioni del controller
});
}
export default DashboardController;

+ 3
- 3
src/assets/scripts/dashboard/index.js View File

@ -1,6 +1,6 @@
import * as angular from 'angular';
import ngCookies from 'angular-cookies';
import DashboardController from './dashboard.controller';
angular.module('nwDashboard', [ngCookies])
.controller(DashboardController.name, DashboardController);
angular.module('nwDashboard', [])
.controller(DashboardController.name, DashboardController);

+ 1
- 1
src/assets/scripts/index.js View File

@ -17,8 +17,8 @@ import './fullcalendar';
import './googleMaps';
import './utils';
import './user-form';
import './login';
import './logout';
import './nwLogin';
import './nwFooter';
import './nwSidebar';
import './nwTopbar';


+ 0
- 30
src/assets/scripts/login/controller.js View File

@ -1,30 +0,0 @@
const LoginController = ($scope, LoginService, $cookies) => {
$scope.userLogged = false;
if(typeof $cookies.get('access_token') !== 'undefined' ){
$scope.userLogged = true;
$scope.user = parseJwt( $cookies.get('access_token') );
}
$scope.userLogin = async () => {
let result = await LoginService.loginUserService($scope.user);
if( $scope.user !== "" || $scope.user !== "undefined"){
console.log(result);
$scope.userLogged = true;
$scope.user = parseJwt( result );
$cookies.put('access_token', result);
console.log('Redirect me to Dashboard.');
} else {
console.log("User is empty");
}
}
};
function parseJwt(token) {
var base64Url = token.split('.')[1];
var base64 = base64Url.replace('-', '+').replace('_', '/');
return JSON.parse(window.atob(base64));
};
export default LoginController;

+ 22
- 0
src/assets/scripts/nwLogin/controller.js View File

@ -0,0 +1,22 @@
const LoginController = ($scope, $cookies, LoginService, UserService) => {
// load the user if already logged in, for all controllers
UserService.loadUser();
$scope.userLogin = async () => {
let result = await LoginService.loginUserService($scope.user);
if( typeof result.token !== "undefined"){
// save the cookie and reload the user for all controllers
$cookies.put('access_token', result.token);
UserService.loadUser();
} else {
alert(result);
}
}
};
export default LoginController;

src/assets/scripts/login/index.js → src/assets/scripts/nwLogin/index.js View File


+ 156
- 0
src/assets/scripts/nwLogin/nwLogin.html View File

@ -0,0 +1,156 @@
<!-- Modal -->
<div class="modal fade" id="modalLoginForm" tabindex="-1" role="dialog" aria-labelledby="modalLoginFormLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body d-flex">
<div class="modal-left" >
<p class="mo-title">Let's start with getting connected.</p>
<div class="subtitle-modal">Sign up and join the WISP. </div>
<button type="button" class="btn btn-signup ">SIGNUP</button>
</div>
<div class="modal-right ">
<div class="logo-wisp-right">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 138.8360748 39.8824463" style="enable-background:new 0 0 138.8360748 39.8824463;" xml:space="preserve">
<style type="text/css">
.st0{fill:url(#SVGID_1_);}
.st1{fill:url(#SVGID_2_);}
.st2{fill:url(#SVGID_3_);}
.st3{fill:url(#SVGID_4_);}
.st4{fill:url(#SVGID_5_);}
.st5{fill:url(#SVGID_6_);}
.st6{fill:url(#SVGID_7_);}
.st7{fill:url(#SVGID_8_);}
.st8{fill:url(#SVGID_9_);}
.st9{fill:url(#SVGID_10_);}
.st10{fill:url(#SVGID_11_);}
.st11{fill:#FFFFFF;}
.st12{fill:url(#SVGID_12_);}
.st13{fill:url(#SVGID_13_);}
.st14{fill:url(#SVGID_14_);}
.st15{fill:url(#SVGID_15_);}
.st16{fill:url(#SVGID_16_);}
.st17{fill:url(#SVGID_17_);}
.st18{fill:url(#SVGID_18_);}
.st19{fill:url(#SVGID_19_);}
</style>
<g>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="13.806386" y1="30.5149899" x2="13.806386" y2="0.0000301">
<stop offset="0" style="stop-color:#8B00B1"/>
<stop offset="0" style="stop-color:#EE38A4"/>
<stop offset="0.0866544" style="stop-color:#C832A9"/>
<stop offset="0.1996946" style="stop-color:#9D2AAF"/>
<stop offset="0.3094908" style="stop-color:#7C24B3"/>
<stop offset="0.4136127" style="stop-color:#6420B6"/>
<stop offset="0.5097673" style="stop-color:#551EB8"/>
<stop offset="0.5903056" style="stop-color:#501DB9"/>
<stop offset="0.6045721" style="stop-color:#501DB9"/>
<stop offset="0.7748037" style="stop-color:#501DB9"/>
<stop offset="0.8825542" style="stop-color:#7311B4"/>
<stop offset="1" style="stop-color:#9506B0"/>
<stop offset="1" style="stop-color:#9103B0"/>
</linearGradient>
<path class="st0" d="M18.4649811,27.823019l-0.0005131,0.0005131c0.0724716-0.0724716,0.1342678-0.1448421,0.204174-0.2173138
l-3.4111109-3.4110069l-0.558629-0.55863L6.319869,15.2575493l2.234416-2.234416l6.7032461-6.7032471l2.234416,2.234416
l5.6520958,5.6520948l3.0811882-3.0812902l-3.0811882,3.0812902l0,0l4.2584972-4.2586002L27.612772,9.737566l-7.8864098-7.8864594
c-2.468153-2.4681017-6.4696112-2.4681017-8.9376621,0l-8.9376621,8.9376106c-2.4680505,2.468051-2.4680505,6.4695606,0,8.9376621
l8.9376621,8.9376125c2.468051,2.4679985,6.4695091,2.4679985,8.9376621,0v-0.0000515l-1.0511513-1.0511513L18.4649811,27.823019z
"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="49.3865204" y1="27.2705288" x2="37.6677437" y2="6.9730129">
<stop offset="0" style="stop-color:#8B00B1"/>
<stop offset="0" style="stop-color:#EE38A4"/>
<stop offset="0.5092942" style="stop-color:#9103B0"/>
<stop offset="1" style="stop-color:#501DB9"/>
<stop offset="1" style="stop-color:#9506B0"/>
</linearGradient>
<path class="st1" d="M55.4768066,10.7887173l-8.9376602-8.9376106l-4.4687309,4.4687796l6.7032471,6.7032471l2.234314,2.234416
l-6.7031441,6.7032471l-2.234417,2.2344151l-7.7302742-7.7302761l-0.2102318,0.2102318l-4.2584972,4.2586002l7.7301731,7.7301731
v0.0000515c2.4680519,2.4679985,6.4696121,2.4679985,8.937561,0l8.9376602-8.9376125
C57.9449615,17.2582779,57.9449615,13.2567682,55.4768066,10.7887173z"/>
<g>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="10.7887001" y1="15.2575035" x2="46.5391464" y2="15.2575035">
<stop offset="0" style="stop-color:#8B00B1"/>
<stop offset="0" style="stop-color:#EE38A4"/>
<stop offset="0.1175187" style="stop-color:#D634A7"/>
<stop offset="0.4183493" style="stop-color:#9D2AAF"/>
<stop offset="0.6763742" style="stop-color:#7323B4"/>
<stop offset="0.8785662" style="stop-color:#591FB8"/>
<stop offset="1" style="stop-color:#501DB9"/>
</linearGradient>
<path class="st2" d="M37.6015854,1.8511064l-8.9376621,8.9376106l-4.468729,4.468832l-0.55863,0.558629l-8.3790331,8.3790331
l-4.4688311,4.468832c2.467948,2.4677925,6.4688931,2.4678955,8.937149,0.0004101l0.0005131-0.0005131l13.4063931-13.4063911
l8.3790321-8.379034l0.5586281-0.5586295l4.4687309-4.4687796C44.0711975-0.6169954,40.0696373-0.6169954,37.6015854,1.8511064z"
/>
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="24.1951942" y1="13.6117887" x2="27.4866123" y2="13.6117887">
<stop offset="0" style="stop-color:#8B00B1"/>
<stop offset="0" style="stop-color:#EE38A4"/>
<stop offset="0.1175187" style="stop-color:#D634A7"/>
<stop offset="0.4183493" style="stop-color:#9D2AAF"/>
<stop offset="0.6763742" style="stop-color:#7323B4"/>
<stop offset="0.8785662" style="stop-color:#591FB8"/>
<stop offset="1" style="stop-color:#501DB9"/>
</linearGradient>
<polygon class="st3" points="24.1951942,15.2574978 24.1951942,15.2575493 27.4866123,11.9660282 "/>
</g>
</g>
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="77.3990173" y1="-7.8904157" x2="122.914917" y2="37.6254807">
<stop offset="0" style="stop-color:#8B00B1"/>
<stop offset="0" style="stop-color:#EE38A4"/>
<stop offset="0.0727272" style="stop-color:#D634A7"/>
<stop offset="0.2166433" style="stop-color:#AD2DAD"/>
<stop offset="0.3643613" style="stop-color:#8C27B1"/>
<stop offset="0.5144968" style="stop-color:#7123B5"/>
<stop offset="0.6680248" style="stop-color:#5F20B7"/>
<stop offset="0.8269761" style="stop-color:#541EB9"/>
<stop offset="1" style="stop-color:#501DB9"/>
</linearGradient>
<path class="st4" d="M73.7269974,4.3174438v5.8997192v11.3051758v5.3615112
c-0.4117432,2.0700073-1.6452637,3.1047974-3.7012939,3.1047974c-1.9445801,0-3.1610107-0.9794312-3.6466064-2.94104v-5.3562012
V10.0534058V4.1483765c0.4855957-2.0239868,1.7020264-3.036438,3.6466064-3.036438
C72.0817337,1.1119385,73.3152542,2.180603,73.7269974,4.3174438z M106.2809982,19.8569603
c0-1.8695717-0.9047928-3.7108078-2.7115402-5.5251274c-1.8067474-1.8133755-3.6427689-2.7205353-5.5052414-2.7205353h-6.3165283
c-1.0814056-0.3452024-1.6216354-1.055913-1.6216354-2.1316605c0-1.1130533,0.5383453-1.8237638,1.6159668-2.1311879h3.5096054
c1.9682465-0.5189838,2.9523697-1.7250671,2.9523697-3.6182499c0-2.0782979-1.0483475-3.3216877-3.1412582-3.7301693h-3.8703918
c-1.9077988,0-3.7872696,0.9000763-5.6374664,2.7002289c-1.8511353,1.8001525-2.7767029,3.6574452-2.7767029,5.5699892v2.4192505
c0,1.8752375,0.9038467,3.7230854,2.7105942,5.5416546c1.8067474,1.8195152,3.6427689,2.7285633,5.5061874,2.7285633h6.3165283
c1.0804596,0.3367023,1.6216354,1.0474129,1.6216354,2.1316605c0,1.0474129-0.5392838,1.7387619-1.6150208,2.0754642h-3.3981628
c-2.0060272,0.5605412-3.0090408,1.7765408-3.0090408,3.6461124c0,1.9446564,1.0105743,3.1776562,3.0298233,3.7018356h4.0951614
c1.8690872,0,3.7098312-0.8972435,5.5250778-2.6922016c1.8133621-1.7949581,2.7200394-3.6267509,2.7200394-5.4972649V19.8569603z
M138.8360748,10.5393066v2.6487427c0,2.5925903-1.1069336,4.9976807-3.3208008,7.2142944
c-2.2138672,2.2171631-4.6164551,3.3250122-7.2062988,3.3250122h-2.5329514c-0.7498779,0-1.7822266-0.2800293-3.0959473-0.8410645
v13.7991333c-0.4117432,2.1312256-1.6452637,3.1970215-3.7012939,3.1970215c-1.9447021,0-3.1610107-1.0115356-3.6466064-3.0331421
V3.0893555c0-0.262085,0.1303711-0.6176758,0.3929443-1.0672607C116.5467758,0.6738892,117.6329575,0,118.9787827,0
c0.9718018,0,1.8690186,0.4118042,2.692627,1.2339478C123.354393,0.4118042,124.7372055,0,125.821434,0h2.525383
c2.5803223,0,4.9726562,1.1088257,7.1798096,3.3250122C137.7328033,5.5426025,138.8360748,7.9467773,138.8360748,10.5393066z
M131.4881744,10.4920654c0-0.6478882-0.3929443-1.3340454-1.1787109-2.0579834
c-0.7858887-0.723938-1.4960938-1.0856323-2.1315918-1.0856323h-2.1874924c-0.6364746,0-1.3458252,0.3711548-2.1315918,1.1144409
s-1.1787109,1.4384155-1.1787109,2.0863647v2.6293945c0,0.5713501,0.3835449,1.2481079,1.1503906,2.0286865
c0.7668457,0.7820435,1.4309082,1.1720581,1.9909668,1.1720581h2.525383c0.5610352,0,1.2241211-0.3900146,1.9909668-1.1720581
c0.7658691-0.7805786,1.1503906-1.4573364,1.1503906-2.0286865V10.4920654z"/>
</g>
</svg>
</div> <!--logo-->
<div ng-controller="LoginController">
<h4 class=""><strong>Sign In </strong>
<form ng-submit="userLogin()" name="LoginForm">
<input class="modal-username" ng-model="user.email" type="text" placeholder="Email" required>
<input class="modal-username" type="password" ng-model="user.password" placeholder="Password" required>
<button type="submit" class="btn btn-gradient btn-centered mt-2" ng-disabled="LoginForm.$invalid">SIGN IN</button>
</form>
<div ng-show="userLogged">
<h2>Welcome {{user.fullname}}!</h2>
<p ng-show="user.role == 'user'">This text is only visible to Users</p>
<p ng-show="user.role == 'company'">This text is only visible to Companies</p>
<p ng-show="user.role == 'nomit' || user.role == 'admin'">This text is visible to both Nomit and Admin</p>
<p ng-show="user.role == 'nomit'">This text is only visible to Nomit</p>
<p ng-show="user.role == 'admin'">This text is only visible to Admin</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

src/assets/scripts/login/service.js → src/assets/scripts/nwLogin/service.js View File


+ 6
- 3
src/index.html View File

@ -86,10 +86,13 @@
</div>
<!-- ### $App Screen Footer ### -->
<nw-footer></nw-footer>
<!-- ### $App Screen Footer ### -->
<nw-footer></nw-footer>
</div>
</body>
<!-- ### $App Login Modal ### -->
<nw-login></nw-login>
</body>
</html>

+ 0
- 157
src/login.html View File

@ -75,163 +75,6 @@
Launch demo modal
</button>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body d-flex">
<div class="modal-left" >
<p class="mo-title">Let's start with getting connected.</p>
<div class="subtitle-modal">Sign up and join the WISP. </div>
<button type="button" class="btn btn-signup ">SIGNUP</button>
</div>
<div class="modal-right ">
<div class="logo-wisp-right">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 138.8360748 39.8824463" style="enable-background:new 0 0 138.8360748 39.8824463;" xml:space="preserve">
<style type="text/css">
.st0{fill:url(#SVGID_1_);}
.st1{fill:url(#SVGID_2_);}
.st2{fill:url(#SVGID_3_);}
.st3{fill:url(#SVGID_4_);}
.st4{fill:url(#SVGID_5_);}
.st5{fill:url(#SVGID_6_);}
.st6{fill:url(#SVGID_7_);}
.st7{fill:url(#SVGID_8_);}
.st8{fill:url(#SVGID_9_);}
.st9{fill:url(#SVGID_10_);}
.st10{fill:url(#SVGID_11_);}
.st11{fill:#FFFFFF;}
.st12{fill:url(#SVGID_12_);}
.st13{fill:url(#SVGID_13_);}
.st14{fill:url(#SVGID_14_);}
.st15{fill:url(#SVGID_15_);}
.st16{fill:url(#SVGID_16_);}
.st17{fill:url(#SVGID_17_);}
.st18{fill:url(#SVGID_18_);}
.st19{fill:url(#SVGID_19_);}
</style>
<g>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="13.806386" y1="30.5149899" x2="13.806386" y2="0.0000301">
<stop offset="0" style="stop-color:#8B00B1"/>
<stop offset="0" style="stop-color:#EE38A4"/>
<stop offset="0.0866544" style="stop-color:#C832A9"/>
<stop offset="0.1996946" style="stop-color:#9D2AAF"/>
<stop offset="0.3094908" style="stop-color:#7C24B3"/>
<stop offset="0.4136127" style="stop-color:#6420B6"/>
<stop offset="0.5097673" style="stop-color:#551EB8"/>
<stop offset="0.5903056" style="stop-color:#501DB9"/>
<stop offset="0.6045721" style="stop-color:#501DB9"/>
<stop offset="0.7748037" style="stop-color:#501DB9"/>
<stop offset="0.8825542" style="stop-color:#7311B4"/>
<stop offset="1" style="stop-color:#9506B0"/>
<stop offset="1" style="stop-color:#9103B0"/>
</linearGradient>
<path class="st0" d="M18.4649811,27.823019l-0.0005131,0.0005131c0.0724716-0.0724716,0.1342678-0.1448421,0.204174-0.2173138
l-3.4111109-3.4110069l-0.558629-0.55863L6.319869,15.2575493l2.234416-2.234416l6.7032461-6.7032471l2.234416,2.234416
l5.6520958,5.6520948l3.0811882-3.0812902l-3.0811882,3.0812902l0,0l4.2584972-4.2586002L27.612772,9.737566l-7.8864098-7.8864594
c-2.468153-2.4681017-6.4696112-2.4681017-8.9376621,0l-8.9376621,8.9376106c-2.4680505,2.468051-2.4680505,6.4695606,0,8.9376621
l8.9376621,8.9376125c2.468051,2.4679985,6.4695091,2.4679985,8.9376621,0v-0.0000515l-1.0511513-1.0511513L18.4649811,27.823019z
"/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="49.3865204" y1="27.2705288" x2="37.6677437" y2="6.9730129">
<stop offset="0" style="stop-color:#8B00B1"/>
<stop offset="0" style="stop-color:#EE38A4"/>
<stop offset="0.5092942" style="stop-color:#9103B0"/>
<stop offset="1" style="stop-color:#501DB9"/>
<stop offset="1" style="stop-color:#9506B0"/>
</linearGradient>
<path class="st1" d="M55.4768066,10.7887173l-8.9376602-8.9376106l-4.4687309,4.4687796l6.7032471,6.7032471l2.234314,2.234416
l-6.7031441,6.7032471l-2.234417,2.2344151l-7.7302742-7.7302761l-0.2102318,0.2102318l-4.2584972,4.2586002l7.7301731,7.7301731
v0.0000515c2.4680519,2.4679985,6.4696121,2.4679985,8.937561,0l8.9376602-8.9376125
C57.9449615,17.2582779,57.9449615,13.2567682,55.4768066,10.7887173z"/>
<g>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="10.7887001" y1="15.2575035" x2="46.5391464" y2="15.2575035">
<stop offset="0" style="stop-color:#8B00B1"/>
<stop offset="0" style="stop-color:#EE38A4"/>
<stop offset="0.1175187" style="stop-color:#D634A7"/>
<stop offset="0.4183493" style="stop-color:#9D2AAF"/>
<stop offset="0.6763742" style="stop-color:#7323B4"/>
<stop offset="0.8785662" style="stop-color:#591FB8"/>
<stop offset="1" style="stop-color:#501DB9"/>
</linearGradient>
<path class="st2" d="M37.6015854,1.8511064l-8.9376621,8.9376106l-4.468729,4.468832l-0.55863,0.558629l-8.3790331,8.3790331
l-4.4688311,4.468832c2.467948,2.4677925,6.4688931,2.4678955,8.937149,0.0004101l0.0005131-0.0005131l13.4063931-13.4063911
l8.3790321-8.379034l0.5586281-0.5586295l4.4687309-4.4687796C44.0711975-0.6169954,40.0696373-0.6169954,37.6015854,1.8511064z"
/>
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="24.1951942" y1="13.6117887" x2="27.4866123" y2="13.6117887">
<stop offset="0" style="stop-color:#8B00B1"/>
<stop offset="0" style="stop-color:#EE38A4"/>
<stop offset="0.1175187" style="stop-color:#D634A7"/>
<stop offset="0.4183493" style="stop-color:#9D2AAF"/>
<stop offset="0.6763742" style="stop-color:#7323B4"/>
<stop offset="0.8785662" style="stop-color:#591FB8"/>
<stop offset="1" style="stop-color:#501DB9"/>
</linearGradient>
<polygon class="st3" points="24.1951942,15.2574978 24.1951942,15.2575493 27.4866123,11.9660282 "/>
</g>
</g>
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="77.3990173" y1="-7.8904157" x2="122.914917" y2="37.6254807">
<stop offset="0" style="stop-color:#8B00B1"/>
<stop offset="0" style="stop-color:#EE38A4"/>
<stop offset="0.0727272" style="stop-color:#D634A7"/>
<stop offset="0.2166433" style="stop-color:#AD2DAD"/>
<stop offset="0.3643613" style="stop-color:#8C27B1"/>
<stop offset="0.5144968" style="stop-color:#7123B5"/>
<stop offset="0.6680248" style="stop-color:#5F20B7"/>
<stop offset="0.8269761" style="stop-color:#541EB9"/>
<stop offset="1" style="stop-color:#501DB9"/>
</linearGradient>
<path class="st4" d="M73.7269974,4.3174438v5.8997192v11.3051758v5.3615112
c-0.4117432,2.0700073-1.6452637,3.1047974-3.7012939,3.1047974c-1.9445801,0-3.1610107-0.9794312-3.6466064-2.94104v-5.3562012
V10.0534058V4.1483765c0.4855957-2.0239868,1.7020264-3.036438,3.6466064-3.036438
C72.0817337,1.1119385,73.3152542,2.180603,73.7269974,4.3174438z M106.2809982,19.8569603
c0-1.8695717-0.9047928-3.7108078-2.7115402-5.5251274c-1.8067474-1.8133755-3.6427689-2.7205353-5.5052414-2.7205353h-6.3165283
c-1.0814056-0.3452024-1.6216354-1.055913-1.6216354-2.1316605c0-1.1130533,0.5383453-1.8237638,1.6159668-2.1311879h3.5096054
c1.9682465-0.5189838,2.9523697-1.7250671,2.9523697-3.6182499c0-2.0782979-1.0483475-3.3216877-3.1412582-3.7301693h-3.8703918
c-1.9077988,0-3.7872696,0.9000763-5.6374664,2.7002289c-1.8511353,1.8001525-2.7767029,3.6574452-2.7767029,5.5699892v2.4192505
c0,1.8752375,0.9038467,3.7230854,2.7105942,5.5416546c1.8067474,1.8195152,3.6427689,2.7285633,5.5061874,2.7285633h6.3165283
c1.0804596,0.3367023,1.6216354,1.0474129,1.6216354,2.1316605c0,1.0474129-0.5392838,1.7387619-1.6150208,2.0754642h-3.3981628
c-2.0060272,0.5605412-3.0090408,1.7765408-3.0090408,3.6461124c0,1.9446564,1.0105743,3.1776562,3.0298233,3.7018356h4.0951614
c1.8690872,0,3.7098312-0.8972435,5.5250778-2.6922016c1.8133621-1.7949581,2.7200394-3.6267509,2.7200394-5.4972649V19.8569603z
M138.8360748,10.5393066v2.6487427c0,2.5925903-1.1069336,4.9976807-3.3208008,7.2142944
c-2.2138672,2.2171631-4.6164551,3.3250122-7.2062988,3.3250122h-2.5329514c-0.7498779,0-1.7822266-0.2800293-3.0959473-0.8410645
v13.7991333c-0.4117432,2.1312256-1.6452637,3.1970215-3.7012939,3.1970215c-1.9447021,0-3.1610107-1.0115356-3.6466064-3.0331421
V3.0893555c0-0.262085,0.1303711-0.6176758,0.3929443-1.0672607C116.5467758,0.6738892,117.6329575,0,118.9787827,0
c0.9718018,0,1.8690186,0.4118042,2.692627,1.2339478C123.354393,0.4118042,124.7372055,0,125.821434,0h2.525383
c2.5803223,0,4.9726562,1.1088257,7.1798096,3.3250122C137.7328033,5.5426025,138.8360748,7.9467773,138.8360748,10.5393066z
M131.4881744,10.4920654c0-0.6478882-0.3929443-1.3340454-1.1787109-2.0579834
c-0.7858887-0.723938-1.4960938-1.0856323-2.1315918-1.0856323h-2.1874924c-0.6364746,0-1.3458252,0.3711548-2.1315918,1.1144409
s-1.1787109,1.4384155-1.1787109,2.0863647v2.6293945c0,0.5713501,0.3835449,1.2481079,1.1503906,2.0286865
c0.7668457,0.7820435,1.4309082,1.1720581,1.9909668,1.1720581h2.525383c0.5610352,0,1.2241211-0.3900146,1.9909668-1.1720581
c0.7658691-0.7805786,1.1503906-1.4573364,1.1503906-2.0286865V10.4920654z"/>
</g>
</svg>
</div> <!--logo-->
<div ng-controller="LoginController">
<h4 class=""><strong>Sign In </strong>
<form ng-submit="userLogin()" name="LoginForm">
<input class="modal-username" ng-model="user.email" type="text" placeholder="Email" required>
<input class="modal-username" type="password" ng-model="user.password" placeholder="Password" required>
<button type="submit" class="btn btn-gradient btn-centered mt-2" ng-disabled="LoginForm.$invalid">SIGN IN</button>
</form>
<div ng-show="userLogged">
<h2>Welcome {{user.fullname}}!</h2>
<p ng-show="user.role == 'user'">This text is only visible to Users</p>
<p ng-show="user.role == 'company'">This text is only visible to Companies</p>
<p ng-show="user.role == 'nomit' || user.role == 'admin'">This text is visible to both Nomit and Admin</p>
<p ng-show="user.role == 'nomit'">This text is only visible to Nomit</p>
<p ng-show="user.role == 'admin'">This text is only visible to Admin</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>


Loading…
Cancel
Save