AuthenticationUnavailable.js revision e26e5073e1266868172d72453c97f413fe2fb603
0N/A/**
2362N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
0N/A *
0N/A * Copyright (c) 2011-2015 ForgeRock AS. All rights reserved.
0N/A *
0N/A * The contents of this file are subject to the terms
0N/A * of the Common Development and Distribution License
0N/A * (the License). You may not use this file except in
0N/A * compliance with the License.
0N/A *
0N/A * You can obtain a copy of the License at
0N/A * http://forgerock.org/license/CDDLv1.0.html
0N/A * See the License for the specific language governing
0N/A * permission and limitations under the License.
0N/A *
0N/A * When distributing Covered Code, include this CDDL
0N/A * Header Notice in each file and include the License file
0N/A * at http://forgerock.org/license/CDDLv1.0.html
2362N/A * If applicable, add the following below the CDDL Header,
2362N/A * with the fields enclosed by brackets [] replaced by
2362N/A * your own identifying information:
0N/A * "Portions Copyrighted [year] [name of copyright owner]"
0N/A */
0N/A
0N/A/*global define */
0N/A
0N/Adefine("org/forgerock/openidm/ui/common/login/AuthenticationUnavailable", [
0N/A "org/forgerock/commons/ui/common/main/AbstractView",
0N/A "org/forgerock/commons/ui/common/util/Constants",
0N/A "org/forgerock/commons/ui/common/main/EventManager",
0N/A "org/forgerock/commons/ui/common/main/Configuration"
0N/A], function(AbstractView, constants, eventManager, conf) {
0N/A var AuthenticationUnavailableView = AbstractView.extend({
0N/A template: "templates/admin/login/AuthenticationUnavailableTemplate.html",
0N/A baseTemplate: "templates/common/LoginBaseTemplate.html",
0N/A
0N/A events: {
0N/A "click #loginLink":"login"
0N/A },
0N/A render: function(args, callback) {
0N/A this.parentRender(function(){
0N/A if(callback){
0N/A callback();
0N/A }
0N/A });
0N/A },
0N/A login: function(e){
0N/A e.preventDefault();
0N/A
0N/A conf.globalData.authenticationUnavailable = false;
0N/A eventManager.sendEvent(constants.ROUTE_REQUEST, {routeName: "login", args: []});
0N/A location.reload();
0N/A }
0N/A });
0N/A
0N/A return new AuthenticationUnavailableView();
0N/A});
0N/A