setup-profile-settings.jsp 4.36 KB
Newer Older
1 2 3 4 5 6
<%--
  -	$RCSfile$
  -	$Revision: 1410 $
  -	$Date: 2005-05-26 23:00:40 -0700 (Thu, 26 May 2005) $
--%>

7
<%@ page import="org.jivesoftware.openfire.XMPPServer"%>
Matt Tucker's avatar
Matt Tucker committed
8
<%@ page import="org.jivesoftware.util.JiveGlobals"%>
9
<%@ page import="java.util.Map" %>
10 11 12 13 14 15 16 17 18 19 20 21 22 23

<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>

<%
	// Redirect if we've already run setup:
	if (!XMPPServer.getInstance().isSetupMode()) {
        response.sendRedirect("setup-completed.jsp");
        return;
    }
%>

<%
    // Get parameters
24
    boolean isLDAP = "org.jivesoftware.openfire.ldap.LdapAuthProvider".equals(
25
            JiveGlobals.getProperty("provider.auth.className"));
26
    boolean isCLEARSPACE = "org.jivesoftware.openfire.clearspace.ClearspaceAuthProvider".equals(
27
            JiveGlobals.getProperty("provider.auth.className"));
28 29
    boolean next = request.getParameter("continue") != null;
    if (next) {
30 31 32 33
        // Figure out where to send the user.
        String mode = request.getParameter("mode");

        if ("default".equals(mode)) {
Matt Tucker's avatar
Matt Tucker committed
34
            // Set to default providers by deleting any existing values.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
            @SuppressWarnings("unchecked")
            Map<String,String> xmppSettings = (Map<String,String>)session.getAttribute("xmppSettings");
            xmppSettings.put("provider.auth.className",
                    org.jivesoftware.openfire.auth.DefaultAuthProvider.class.getName());
            xmppSettings.put("provider.user.className",
                    org.jivesoftware.openfire.user.DefaultUserProvider.class.getName());
            xmppSettings.put("provider.group.className",
                    org.jivesoftware.openfire.group.DefaultGroupProvider.class.getName());
            xmppSettings.put("provider.vcard.className",
                    org.jivesoftware.openfire.vcard.DefaultVCardProvider.class.getName());
            xmppSettings.put("provider.lockout.className",
                    org.jivesoftware.openfire.lockout.DefaultLockOutProvider.class.getName());
            xmppSettings.put("provider.securityAudit.className",
                    org.jivesoftware.openfire.security.DefaultSecurityAuditProvider.class.getName());
            xmppSettings.put("provider.admin.className",
                    org.jivesoftware.openfire.admin.DefaultAdminProvider.class.getName());
Matt Tucker's avatar
Matt Tucker committed
51
            // Redirect
52 53 54 55 56 57 58
            response.sendRedirect("setup-admin-settings.jsp");
            return;
        }
        else if ("ldap".equals(mode)) {
            response.sendRedirect("setup-ldap-server.jsp");
            return;
        }
59 60 61 62
        else if ("clearspace".equals(mode)) {
            response.sendRedirect("setup-clearspace-integration.jsp");
            return;
        }
63
    }
64 65
%>
<html>
66
<head>
Matt Tucker's avatar
Matt Tucker committed
67
    <title><fmt:message key="setup.profile.title" /></title>
68
    <meta name="currentStep" content="3"/>
69
</head>
70 71
<body>

72
	<h1>
Matt Tucker's avatar
Matt Tucker committed
73
    <fmt:message key="setup.profile.title" />
74
	</h1>
75

76
	<p>
Matt Tucker's avatar
Matt Tucker committed
77
	<fmt:message key="setup.profile.description" />
78
	</p>
79

80 81 82 83 84 85 86
	<!-- BEGIN jive-contentBox -->
	<div class="jive-contentBox">
	<form action="setup-profile-settings.jsp" name="profileform" method="post">

<table cellpadding="3" cellspacing="2" border="0">
<tr>
    <td align="center" valign="top">
87
        <input type="radio" name="mode" value="default" id="rb01" <% if (!isLDAP && !isCLEARSPACE) { %>checked<% } %>>
88 89
    </td>
    <td>
Matt Tucker's avatar
Matt Tucker committed
90 91
        <label for="rb01"><b><fmt:message key="setup.profile.default" /></b></label><br>
	    <fmt:message key="setup.profile.default_description" />
92 93 94 95
    </td>
</tr>
<tr>
    <td align="center" valign="top">
Matt Tucker's avatar
Matt Tucker committed
96
        <input type="radio" name="mode" value="ldap" id="rb02" <% if (isLDAP) { %>checked<% } %>>
97 98
    </td>
    <td>
Matt Tucker's avatar
Matt Tucker committed
99 100
        <label for="rb02"><b><fmt:message key="setup.profile.ldap" /></b></label><br>
	    <fmt:message key="setup.profile.ldap_description" />
101 102
    </td>
</tr>
103 104 105 106 107 108 109 110 111
<tr>
    <td align="center" valign="top">
        <input type="radio" name="mode" value="clearspace" id="rb03" <% if (isCLEARSPACE) { %>checked<% } %>>
    </td>
    <td>
        <label for="rb03"><b><fmt:message key="setup.profile.clearspace" /></b></label><br>
        <fmt:message key="setup.profile.clearspace_description" />
    </td>
</tr>
112 113 114 115 116 117 118 119 120 121
</table>

<br>
		<div align="right">
			<input type="Submit" name="continue" value="<fmt:message key="global.continue" />" id="jive-setup-save" border="0">
		</div>

	</form>
	</div>
	<!-- END jive-contentBox -->
122 123

</body>
Matt Tucker's avatar
Matt Tucker committed
124
</html>