Merge "Replicate demo/boot/portal_vm_init.sh"
[portal.git] / ecomp-portal-BE-common / src / main / webapp / WEB-INF / jsp / login_external.jsp
1 <%--
2   ================================================================================
3   ECOMP Portal
4   ================================================================================
5   Copyright (C) 2017 AT&T Intellectual Property
6   ================================================================================
7   Licensed under the Apache License, Version 2.0 (the "License");
8   you may not use this file except in compliance with the License.
9   You may obtain a copy of the License at
10   
11        http://www.apache.org/licenses/LICENSE-2.0
12   
13   Unless required by applicable law or agreed to in writing, software
14   distributed under the License is distributed on an "AS IS" BASIS,
15   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   See the License for the specific language governing permissions and
17   limitations under the License.
18   ================================================================================
19   --%>
20 <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
21 <%@ taglib prefix="c"      uri="http://java.sun.com/jsp/jstl/core" %>
22 <%@ taglib prefix="fmt"    uri="http://java.sun.com/jsp/jstl/fmt" %>
23 <%@ page import="org.openecomp.portalsdk.core.util.SystemProperties" %>
24 <c:set var="title" value="Login" />
25 <c:set var="isMobileEnabled"
26         value="<%=(SystemProperties.getProperty(SystemProperties.MOBILE_ENABLE)!= null && SystemProperties.getProperty(SystemProperties.MOBILE_ENABLE).trim().equals(\"true\"))%>" />
27
28 <!DOCTYPE html>
29 <html ng-app="abs">
30         <head>
31             <title>
32               Login
33         </title>
34                 <meta charset="utf-8">
35                 <meta http-equiv="X-UA-Compatible" content="IE=edge">
36                 <meta name="viewport" content="width=device-width, initial-scale=1"> 
37         <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
38                 <link rel="stylesheet" type="text/css" href="static/ebz/fn-ebz.css" >
39         <link rel="stylesheet" type="text/css" href="static/fusion/css/jquery-ui.css">
40                 <script src="static/js/jquery-1.10.2.js" type="text/javascript"></script>
41                 <script src= "static/ebz/angular_js/angular.js"></script> 
42                 <script src= "static/ebz/angular_js/angular-sanitize.js"></script>
43                 <script src= "static/ebz/angular_js/att_abs_tpls.js"></script>
44                 <script src= "static/ebz/angular_js/app.js"></script>
45                 <script src= "static/ebz/angular_js/gestures.js"></script>
46                 <script src="static/js/modalService.js"></script>
47                 <style>
48                         .terms {
49                                 font-family: Verdana,Arial,Helvetica, sans-serif;
50                                 font-size: 9px;
51                         }
52                 </style>
53         </head>
54         <body style="padding-top: 15px;">
55         <div ng-controller="externalLoginController">
56                 <!-- Remove Video -----                         
57             <div style="position: fixed; left: -25%; top: -25%; height: 150%; width: 150%; z-index:-1;">
58                    <video src="http://www.business.att.com/content/mixedmedia/network-on-demand.mp4" autoplay="true" defaultmuted="true" muted="true" height="100%" width="100%"></video>
59             </div>
60             -->
61         <div style="position: fixed; left:15px; top:15px;z-index:-1;">
62                 <img src="static/fusion/images/logo_att_header.jpg" alt="AT&T" />
63         </div>
64                 <div class="centered style="-webkit-transform: translateZ(0);background:white, z-index:0;">
65                         <div align="center" id="errorInfo" style="display:none;float:left;font-size:12px;margin-left:5px"><span style="color:red">Invaild username or password, Please try again</span></div>
66                         <br/>
67                         <div align="center" style="margin-left:auto;margin-right:auto;width:40%;padding:6px;background-color:white">
68                                 <img src="static/fusion/images/ecomp-login.jpg"/><span style="    color: #c97d25;   font-size: 56px; position: relative;     text-shadow: 3px 0 #8F9477, 0 2px #d7e7dc, 4px 0 #72b7b2, 0 0px black; top:-144px;  left: -26px;  font-weight: bold;  font-style: italic; font-family:sans-serif">Portal</span>
69                                 <h2> ECOMP Portal </h2>
70                                 <label>
71                                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label class="form-field__label">Login ID:</label>
72                                 </label>
73                                 <input  type="text" class="fn-ebz-text" ng-model="loginId" style="width: 140px;height:25px;border-radius:7px;font-size:18px;padding-left:5px;"
74                                         maxlength="30" />
75                                 <br/>
76                                 <br/>
77                                 <label >&nbsp;Password:</label>
78                                 <input type="password" class="span3" ng-model="password" style="width: 140px;height:25px;border-radius:7px;font-size:18px;padding-left:5px;"
79                                         maxlength="30" onkeydown="if (event.keyCode == 13) document.getElementById('loginBtn').click()"/> 
80                                 <br />
81                                 <br />
82                                 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
83                                 <input id="loginBtn" type="image" ng-click="loginExternal();" src="static/fusion/images/login_button.gif" alt="Login" />
84                                 <br>
85                         </div>
86                 </div>
87                 <br/><br/><br/><br/><br/><br/><br/>
88                 <div id="footer">
89                         <div style="margin-left:auto;margin-right:auto;text-align: center;">
90                                 <p><font class="terms">
91                                         <b>Warning:</b> This system is restricted to AT&T authorized users for business purposes. Unauthorized access is a violation of the law. This service may be monitored for administrative and security reasons. By proceeding, you consent to this monitoring.
92                                 </font></p>
93                         </div>  
94                         <div class="terms" align="left">
95                                 <a target="_top" href="http://www.att.com/terms/">Terms and Conditions</a> | <a target="_top" href="http://www.att.com/privacy/">Privacy Policy</a>.<br><span>&#169; 2016 AT&amp;T.  All rights reserved.</span>
96                     </div>
97                 </div>
98     </div>
99     </body>
100 <script>
101 app.controller("externalLoginController", function ($scope) { 
102         // Table Data
103         
104         $scope.viewPerPage = 200;
105         $scope.currentPage = 2;
106         $scope.totalPage;
107         $scope.searchCategory = "";
108         $scope.searchString = "";
109         $scope.loginId="";
110         $scope.password="";
111         $scope.loginError=true;
112         $scope.viewPerPage = 200;
113         $scope.currentPage = 2;
114         $scope.totalPage;
115         $scope.searchCategory = "";
116         $scope.searchString = "";
117         $scope.loginId="";
118         $scope.password="";
119         
120         
121         $scope.loginExternal = function() {
122
123                 $.ajax({
124                     url: "login_external/login?"+"loginId="+$scope.loginId+"&password="+$scope.password,
125                 type : "POST",
126                 success:function (response){
127                   if(response=="success"){
128                     window.location.href = 'welcome.htm';
129                   }else{
130                         $("#errorInfo").show();
131                   }
132                 },
133                 error:function( jqXHR, status,error ){
134                         $("#errorInfo").show();
135                 }
136                 
137         });
138
139     };
140         
141         
142         /**
143         $scope.loginExternal = function() {
144
145         
146                   var redirectUrl = "login_external/login";
147           var form = $('<form action="' + redirectUrl + '" method="post">' +
148                   '<input type="hidden" name="loginId" value='+$scope.loginId+' />' +
149                   '<input type="hidden" name="password" value='+$scope.password+' />' +
150                   '</form>');
151                   
152                   $('body').append(form);
153                   $(form).submit();
154          
155
156     };
157     */
158         
159 });
160 </script>
161         
162 </html>