aboutsummaryrefslogtreecommitdiffstats
path: root/d2ice.att.io/app/main/activation/updatePassword
diff options
context:
space:
mode:
Diffstat (limited to 'd2ice.att.io/app/main/activation/updatePassword')
-rwxr-xr-xd2ice.att.io/app/main/activation/updatePassword/updatePassword.controller.js95
-rwxr-xr-xd2ice.att.io/app/main/activation/updatePassword/updatePassword.html76
-rwxr-xr-xd2ice.att.io/app/main/activation/updatePassword/updatePassword.less85
-rwxr-xr-xd2ice.att.io/app/main/activation/updatePassword/updatePassword.module.js68
4 files changed, 324 insertions, 0 deletions
diff --git a/d2ice.att.io/app/main/activation/updatePassword/updatePassword.controller.js b/d2ice.att.io/app/main/activation/updatePassword/updatePassword.controller.js
new file mode 100755
index 00000000..364dcc77
--- /dev/null
+++ b/d2ice.att.io/app/main/activation/updatePassword/updatePassword.controller.js
@@ -0,0 +1,95 @@
+//
+// ============LICENSE_START==========================================
+// org.onap.vvp/portal
+// ===================================================================
+// Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+// ===================================================================
+//
+// Unless otherwise specified, all software contained herein is licensed
+// under the Apache License, Version 2.0 (the “License”);
+// you may not use this software except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http:www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+//
+// Unless otherwise specified, all documentation contained herein is licensed
+// under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+// you may not use this documentation except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https:creativecommons.org/licenses/by/4.0/
+//
+// Unless required by applicable law or agreed to in writing, documentation
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// ============LICENSE_END============================================
+//
+// ECOMP is a trademark and service mark of AT&T Intellectual Property.
+(function () {
+
+ 'use strict';
+
+ angular
+ .module('ice.activation.updatePassword')
+ .controller('UpdatePasswordController', ["$state", "usersService", "localStorageService", "$rootScope", "toastService", "$window", UpdatePasswordController]);
+
+ function UpdatePasswordController($state, usersService, localStorageService, $rootScope, toastService, $window) {
+
+ var vm = this;
+ vm.data = {};
+
+ var ngReq = true;
+
+ $rootScope.headerTitle = "Update Your Password";
+ $rootScope.headerSubTitle = "Please follow the instructions below to update your password";
+
+ vm.submitForm = function()
+ {
+ $rootScope.ice.loader.show = true;
+ var jsonPasswordConfirm =
+ {
+ password : vm.data.password,
+ confirm_password : vm.data.confirm_password
+ }
+
+ usersService.updatePassword(usersService.getUserData().uuid, jsonPasswordConfirm)
+ .then(function (response) {
+ if (response.status === 200) {
+ toastService.setToast('Password was updated Successfully!', 'success');
+ ngReq = false;
+ vm.data.password = "";
+ vm.data.confirm_password = "";
+ $rootScope.ice.loader.show = false;
+ //$timeout(function() { $state.go("app.dashboard"); }, 2000);
+ $state.go('app.dashboard.dashboard', {"messagePass": "Password was updated Successfully!"});
+ }
+ else
+ {
+ toastService.setToast('Error updating your password.', 'danger');
+ $rootScope.ice.loader.show = false;
+ }
+ })
+ .catch(function (error) {
+ toastService.setToast(error.message, 'danger');
+ $rootScope.ice.loader.show = false;
+ });
+ };
+
+ vm.sendMail = function()
+ {
+ $window.open("mailto:d2ice@att.com","_self");
+ }
+ }
+
+})();
diff --git a/d2ice.att.io/app/main/activation/updatePassword/updatePassword.html b/d2ice.att.io/app/main/activation/updatePassword/updatePassword.html
new file mode 100755
index 00000000..65569cdb
--- /dev/null
+++ b/d2ice.att.io/app/main/activation/updatePassword/updatePassword.html
@@ -0,0 +1,76 @@
+<!--
+============LICENSE_START==========================================
+org.onap.vvp/portal
+===================================================================
+Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+===================================================================
+
+Unless otherwise specified, all software contained herein is licensed
+under the Apache License, Version 2.0 (the “License”);
+you may not use this software except in compliance with the License.
+You may obtain a copy of the License at
+
+ http:www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+
+Unless otherwise specified, all documentation contained herein is licensed
+under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+you may not use this documentation except in compliance with the License.
+You may obtain a copy of the License at
+
+ https:creativecommons.org/licenses/by/4.0/
+
+Unless required by applicable law or agreed to in writing, documentation
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+============LICENSE_END============================================
+
+ECOMP is a trademark and service mark of AT&T Intellectual Property.-->
+<ice-loader selector=".updatePassword-form"></ice-loader>
+
+<div class="container">
+
+ <div class="row">
+ <div class="col-md-2"></div>
+ <form name="updatePasswordForm" ng-submit="vm.submitForm()" novalidate class="updatePassword-form col-md-8">
+ <div class="form-group" ng-class="{ 'has-error' : updatePasswordForm.password.$invalid && !updatePasswordForm.password.$pristine }">
+ <label class="ice-form-label">Password</label>
+ <input type="password" name="password" class="form-control" ng-model="vm.data.password" maxlength="32" ng-minlength="4" required >
+ <div class="ice-form-error" data-ng-show="updatePasswordForm.password.$error">
+ <span ng-show="updatePasswordForm.password.$error.required && !updatePasswordForm.password.$pristine && ngReq">Password is required field.</span>
+ <span ng-show="updatePasswordForm.password.$error.minlength && ngReq" >Password is too short.</span>
+ <span ng-show="updatePasswordForm.password.$error.maxlength" >Password is too long.</span>
+ </div>
+ </div>
+
+ <div class="form-group" ng-class="{ 'has-error' : updatePasswordForm.confirm_password.$invalid && !updatePasswordForm.confirm_password.$pristine }">
+ <label class="ice-form-label">Confirm password</label>
+ <input type="password" name="confirm_password" class="form-control" ng-model="vm.data.confirm_password" maxlength="32" required >
+ <div class="ice-form-error" data-ng-show="updatePasswordForm.confirm_password.$error">
+ <span ng-show="updatePasswordForm.confirm_password.$error.required && !updatePasswordForm.confirm_password.$pristine && ngReq">Confirm password is required field.</span>
+ <span ng-show="!updatePasswordForm.confirm_password.$error.required && updatePasswordForm.confirm_password.$error.noMatch && updatePasswordForm.password.$dirty">Passwords do not match.</span>
+ </div>
+ </div>
+
+
+ <button type="submit" class="btn btn-primary" data-ng-disabled="!updatePasswordForm.$valid">Update Password</button>
+
+ <div class="leftLink">
+ Still having problems? Please contact <a ng-click="vm.sendMail()">d2ice@att.com</a>
+ </div>
+
+ </form>
+ <div class="col-md-2"></div>
+ </div>
+
+</div>
diff --git a/d2ice.att.io/app/main/activation/updatePassword/updatePassword.less b/d2ice.att.io/app/main/activation/updatePassword/updatePassword.less
new file mode 100755
index 00000000..a6524df5
--- /dev/null
+++ b/d2ice.att.io/app/main/activation/updatePassword/updatePassword.less
@@ -0,0 +1,85 @@
+//
+// ============LICENSE_START==========================================
+// org.onap.vvp/portal
+// ===================================================================
+// Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+// ===================================================================
+//
+// Unless otherwise specified, all software contained herein is licensed
+// under the Apache License, Version 2.0 (the “License”);
+// you may not use this software except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http:www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+//
+// Unless otherwise specified, all documentation contained herein is licensed
+// under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+// you may not use this documentation except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https:creativecommons.org/licenses/by/4.0/
+//
+// Unless required by applicable law or agreed to in writing, documentation
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// ============LICENSE_END============================================
+//
+// ECOMP is a trademark and service mark of AT&T Intellectual Property.
+.updatePassword {
+
+ .updatePassword-form {
+ margin-top: 20px;
+ }
+
+ .btn {
+ width: 100%;
+ }
+
+ .btn-primary {
+ border: 1px solid #8799A3;
+ border-radius: 6px;
+ background: #1E79B0; /* For browsers that do not support gradients */
+ background: -webkit-linear-gradient(#1E79B0, #62ADD5); /* For Safari 5.1 to 6.0 */
+ background: -o-linear-gradient(#1E79B0, #62ADD5); /* For Opera 11.1 to 12.0 */
+ background: -moz-linear-gradient(#1E79B0, #62ADD5); /* For Firefox 3.6 to 15 */
+ background: linear-gradient(#1E79B0, #62ADD5); /* Standard syntax (must be last) */
+ }
+
+ a.register {
+ text-decoration: underline;
+ float: right;
+ margin: 10px 0 0 0;
+ }
+
+ .leftLink{
+ padding-top:5px;
+ width:50%;
+ text-align:left;
+ float:left;
+
+ a,
+ a:hover,
+ a:active,
+ a:focus
+ {
+ .m_14_r;
+ cursor: pointer;
+ }
+
+ a{
+ text-decoration:underline;
+ }
+ }
+
+}
diff --git a/d2ice.att.io/app/main/activation/updatePassword/updatePassword.module.js b/d2ice.att.io/app/main/activation/updatePassword/updatePassword.module.js
new file mode 100755
index 00000000..b00e619b
--- /dev/null
+++ b/d2ice.att.io/app/main/activation/updatePassword/updatePassword.module.js
@@ -0,0 +1,68 @@
+//
+// ============LICENSE_START==========================================
+// org.onap.vvp/portal
+// ===================================================================
+// Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+// ===================================================================
+//
+// Unless otherwise specified, all software contained herein is licensed
+// under the Apache License, Version 2.0 (the “License”);
+// you may not use this software except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http:www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+//
+// Unless otherwise specified, all documentation contained herein is licensed
+// under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
+// you may not use this documentation except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https:creativecommons.org/licenses/by/4.0/
+//
+// Unless required by applicable law or agreed to in writing, documentation
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// ============LICENSE_END============================================
+//
+// ECOMP is a trademark and service mark of AT&T Intellectual Property.
+(function () {
+
+ 'use strict';
+
+ angular
+ .module('ice.activation.updatePassword', [])
+ .config(config);
+
+ function config($stateProvider) {
+
+ $stateProvider
+ .state('app.updatePassword', {
+ url: '/updatePassword{engagement_uuid: (?:/[^/]+)?}',
+ views: {
+ 'main@': {
+ templateUrl: 'core/layouts/full-page-with-header/full-page-with-header.html',
+ controller: 'MainController as vm'
+ },
+ 'content@app.updatePassword': {
+ templateUrl: 'main/activation/updatePassword/updatePassword.html',
+ controller: 'UpdatePasswordController as vm'
+ }
+ },
+ params: {message: null,messagePass:null},
+ bodyClass: 'updatePassword'
+ });
+
+ }
+
+})();