diff --git a/core/src/org/labkey/core/user/UserController.java b/core/src/org/labkey/core/user/UserController.java index 7e493474997..f5bddcfcff1 100644 --- a/core/src/org/labkey/core/user/UserController.java +++ b/core/src/org/labkey/core/user/UserController.java @@ -816,10 +816,7 @@ protected ModelAndView getHtmlView(ShowUsersForm form, BindException errors) VBox users = new VBox(); users.setTitle("Users"); users.setFrame(WebPartView.FrameType.PORTAL); - - JspView toggleInactiveView = new JspView<>("/org/labkey/core/user/toggleInactive.jsp", form); - - users.addView(toggleInactiveView); + users.addView(new JspView<>("/org/labkey/core/user/usersGridHeader.jsp", form)); users.addView(createQueryView(form, errors, false, "Users")); return users; diff --git a/core/src/org/labkey/core/user/toggleInactive.jsp b/core/src/org/labkey/core/user/usersGridHeader.jsp similarity index 50% rename from core/src/org/labkey/core/user/toggleInactive.jsp rename to core/src/org/labkey/core/user/usersGridHeader.jsp index 36515f5ec63..83325bd9789 100644 --- a/core/src/org/labkey/core/user/toggleInactive.jsp +++ b/core/src/org/labkey/core/user/usersGridHeader.jsp @@ -1,86 +1,83 @@ -<% -/* - * Copyright (c) 2008-2026 LabKey Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file 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. - */ -%> -<%@ page import="org.labkey.api.security.AuthenticationManager" %> -<%@ page import="org.labkey.api.view.ActionURL" %> -<%@ page import="org.labkey.api.view.HttpView" %> -<%@ page import="org.labkey.core.user.LimitActiveUsersSettings" %> -<%@ page import="org.labkey.core.user.UserController" %> -<%@ page extends="org.labkey.api.jsp.JspBase" %> -<% - String inactiveCaption; - String temporaryCaption; - UserController.ShowUsersForm form = (UserController.ShowUsersForm) HttpView.currentModel(); - ActionURL inactiveUrl = getViewContext().cloneActionURL(); - ActionURL temporaryUrl = getViewContext().cloneActionURL(); - - if (!form.isInactive()) - { - inactiveUrl.addParameter("inactive", true); - inactiveCaption = "include inactive users"; - } - else - { - inactiveUrl.deleteParameter("inactive"); - inactiveCaption = "hide inactive users"; - } - - if (!form.isTemporary()) - { - temporaryUrl.addParameter("temporary", true); - temporaryCaption = "show temporary accounts"; - } - else - { - temporaryUrl.deleteParameter("temporary"); - temporaryCaption = "show all accounts"; - } - - boolean showTemporaryLink = getContainer().isRoot() && AuthenticationManager.isAccountExpirationEnabled(); -%> - - <% - LimitActiveUsersSettings settings = new LimitActiveUsersSettings(); - - if (settings.isUserLimit()) - { - %> - - - <% - } - %> - - - - - - <% if (showTemporaryLink) - { - %> - - - - <% - } - %> - -
Number of users that can be added<%=h(getContainer().isRoot() ? " or reactivated" : "")%>: <%=settings.getRemainingUserCount()%>
 
- <%=link(inactiveCaption, inactiveUrl)%> -
- <%=link(temporaryCaption, temporaryUrl)%> -
+<% +/* + * Copyright (c) 2008-2026 LabKey Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file 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. + */ +%> +<%@ page import="org.labkey.api.security.AuthenticationManager" %> +<%@ page import="org.labkey.api.view.ActionURL" %> +<%@ page import="org.labkey.api.view.HttpView" %> +<%@ page import="org.labkey.core.user.LimitActiveUsersSettings" %> +<%@ page import="org.labkey.core.user.UserController" %> +<%@ page extends="org.labkey.api.jsp.JspBase" %> + + <% + LimitActiveUsersSettings settings = new LimitActiveUsersSettings(); + + if (settings.isUserLimit()) + { + %> + + + <% + } + + if (getContainer().isRoot()) + { + UserController.ShowUsersForm form = (UserController.ShowUsersForm) HttpView.currentModel(); + + String inactiveCaption; + String temporaryCaption; + + ActionURL inactiveUrl = getViewContext().cloneActionURL(); + ActionURL temporaryUrl = getViewContext().cloneActionURL(); + + if (!form.isInactive()) + { + inactiveUrl.addParameter("inactive", true); + inactiveCaption = "include inactive users"; + } + else + { + inactiveUrl.deleteParameter("inactive"); + inactiveCaption = "hide inactive users"; + } + + if (!form.isTemporary()) + { + temporaryUrl.addParameter("temporary", true); + temporaryCaption = "show temporary accounts"; + } + else + { + temporaryUrl.deleteParameter("temporary"); + temporaryCaption = "show all accounts"; + } + %> + + + + <% + if (AuthenticationManager.isAccountExpirationEnabled()) + { + %> + + + + <% + } + } + %> + +
Number of users that can be added<%=h(getContainer().isRoot() ? " or reactivated" : "")%>: <%=settings.getRemainingUserCount()%>
 
<%=link(inactiveCaption, inactiveUrl)%>
<%=link(temporaryCaption, temporaryUrl)%>