private-data-settings.jsp 3.59 KB
Newer Older
Bill Lynch's avatar
Bill Lynch committed
1
<%--
Matt Tucker's avatar
Matt Tucker committed
2 3 4
  -	$RCSfile$
  -	$Revision$
  -	$Date$
Bill Lynch's avatar
Bill Lynch committed
5 6 7 8 9
  -
  - Copyright (C) 2004 Jive Software. All rights reserved.
  -
  - This software is published under the terms of the GNU Public License (GPL),
  - a copy of which is included in this distribution.
Matt Tucker's avatar
Matt Tucker committed
10 11 12 13
--%>

<%@ page import="org.jivesoftware.util.*,
                 java.util.*,
Derek DeMoro's avatar
Derek DeMoro committed
14 15
                 org.jivesoftware.messenger.*,
                 org.jivesoftware.admin.*"
Bill Lynch's avatar
Bill Lynch committed
16
    errorPage="error.jsp"
Matt Tucker's avatar
Matt Tucker committed
17
%>
Bill Lynch's avatar
Bill Lynch committed
18

19
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
20
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt" %>
Matt Tucker's avatar
Matt Tucker committed
21 22 23
<jsp:useBean id="admin" class="org.jivesoftware.util.WebManager"  />
<% admin.init(request, response, session, application, out ); %>

Derek DeMoro's avatar
Derek DeMoro committed
24 25
<jsp:useBean id="pageinfo" scope="request" class="org.jivesoftware.admin.AdminPageBean" />
<%  // Title of this page and breadcrumbs
26
    String title = LocaleUtils.getLocalizedString("private.data.settings.title");
Derek DeMoro's avatar
Derek DeMoro committed
27
    pageinfo.setTitle(title);
28
    pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(LocaleUtils.getLocalizedString("global.main"), "index.jsp"));
Derek DeMoro's avatar
Derek DeMoro committed
29 30 31
    pageinfo.getBreadcrumbs().add(new AdminPageBean.Breadcrumb(title, "private-data-settings.jsp"));
    pageinfo.setPageID("server-data-settings");
%>
Bill Lynch's avatar
Bill Lynch committed
32
<jsp:include page="top.jsp" flush="true" />
Derek DeMoro's avatar
Derek DeMoro committed
33
<jsp:include page="title.jsp" flush="true" />
Matt Tucker's avatar
Matt Tucker committed
34 35 36 37 38 39

<%  // Get parameters:
    boolean update = request.getParameter("update") != null;
    boolean privateEnabled = ParamUtils.getBooleanParameter(request,"privateEnabled");

    // Get an audit manager:
40
    PrivateStorage privateStorage = admin.getPrivateStore();
Matt Tucker's avatar
Matt Tucker committed
41 42

    Map errors = new HashMap();
43 44
    if (update) {
      privateStorage.setEnabled(privateEnabled);
Matt Tucker's avatar
Matt Tucker committed
45
    %>
Bill Lynch's avatar
Bill Lynch committed
46 47 48 49 50
    <div class="jive-success">
    <table cellpadding="0" cellspacing="0" border="0">
    <tbody>
        <tr><td class="jive-icon"><img src="images/success-16x16.gif" width="16" height="16" border="0"></td>
        <td class="jive-icon-label">
51
        <fmt:message key="private.data.settings.update" />
Bill Lynch's avatar
Bill Lynch committed
52 53 54 55
        </td></tr>
    </tbody>
    </table>
    </div><br>
Matt Tucker's avatar
Matt Tucker committed
56 57 58 59 60 61
    <%
    
    }

    // Set page vars
    if (errors.size() == 0) {
62
        privateEnabled = privateStorage.isEnabled();
Matt Tucker's avatar
Matt Tucker committed
63 64 65
    }
%>

Bill Lynch's avatar
Bill Lynch committed
66
<p>
67
<fmt:message key="private.data.settings.info" />
Bill Lynch's avatar
Bill Lynch committed
68
</p>
Matt Tucker's avatar
Matt Tucker committed
69

Bill Lynch's avatar
Bill Lynch committed
70
<form action="private-data-settings.jsp">
Matt Tucker's avatar
Matt Tucker committed
71

Bill Lynch's avatar
Bill Lynch committed
72
<fieldset>
73
    <legend><fmt:message key="private.data.settings.policy" /></legend>
Bill Lynch's avatar
Bill Lynch committed
74 75 76 77 78 79 80 81 82 83
    <div>
    <table cellpadding="3" cellspacing="0" border="0" width="100%">
    <tbody>
        <tr valign="top">
            <td width="1%" nowrap>
                <input type="radio" name="privateEnabled" value="true" id="rb01"
                 <%= (privateEnabled ? "checked" : "") %>>
            </td>
            <td width="99%">
                <label for="rb01">
84 85
                <b><fmt:message key="private.data.settings.enable_storage" /></b> - 
                <fmt:message key="private.data.settings.enable_storage_info" />
Bill Lynch's avatar
Bill Lynch committed
86 87 88 89 90 91 92 93 94 95
                </label>
            </td>
        </tr>
        <tr valign="top">
            <td width="1%" nowrap>
                <input type="radio" name="privateEnabled" value="false" id="rb02"
                 <%= (!privateEnabled ? "checked" : "") %>>
            </td>
            <td width="99%">
                <label for="rb02">
96 97
                <b><fmt:message key="private.data.settings.disable_storage" /></b> - 
                <fmt:message key="private.data.settings.disable_storage_info" />
Bill Lynch's avatar
Bill Lynch committed
98 99 100 101 102 103 104 105 106
                </label>
            </td>
        </tr>
    </tbody>
    </table>
    </div>
</fieldset>

<br><br>
Matt Tucker's avatar
Matt Tucker committed
107

108
<input type="submit" name="update" value="<fmt:message key="global.save_settings" />">
Matt Tucker's avatar
Matt Tucker committed
109 110 111

</form>

Bill Lynch's avatar
Bill Lynch committed
112
<jsp:include page="bottom.jsp" flush="true" />