Skip to content
This repository has been archived by the owner on Apr 8, 2019. It is now read-only.

GTNPORTAL-3548 Add Label for user status filter in quicksearch form of user management #915

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions component/web/resources/src/test/resources/Stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -6358,6 +6358,13 @@ background: url('/eXoResources/skin/DefaultSkin/webui/component/UIPageIterator/b
font-size: 11px;
}

.UISearch .UISearchForm .QuickSet label {
float: left; /* orientation=lt */
float: right; /* orientation=rt */
margin: -9px 5px 0;
color: #333;
}

.UISearch .UISearchForm .QuickSet input {
float: left; /* orientation=lt */
margin: 0px 5px 0px 10px; /* orientation=lt */
Expand All @@ -6374,6 +6381,13 @@ background: url('/eXoResources/skin/DefaultSkin/webui/component/UIPageIterator/b
width: 120px;
}

.UIFormTabPane .UISearch .UISearchForm .QuickSet label {
float: left; /* orientation=lt */
float: right; /* orientation=rt */
margin: -9px 5px 0;
color: #333;
}

.UIFormTabPane .UISearch .UISearchForm .QuickSet input {
float: left;
margin: 3px 5px 0px 0px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@
height: 20px;
}

.UISearch .UISearchForm .QuickSet label {
color: #333;
}

.UISearch .UISearchForm .QuickSet input {
border: 1px solid #cccccc;
}
Expand All @@ -71,6 +75,13 @@
width: 120px;
}

.UIFormTabPane .UISearch .UISearchForm .QuickSet label {
float: left; /* orientation=lt */
float: right; /* orientation=rt */
margin: -9px 5px 0;
color: #333;
}

.UIFormTabPane .UISearch .UISearchForm .QuickSet input {
float: left;
margin: 3px 5px 0px 0px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
import org.exoplatform.webui.form.UIFormInputSet;
import org.exoplatform.webui.form.UIFormSelectBox;
import org.exoplatform.webui.form.UIFormStringInput;
import org.exoplatform.webui.form.UISearchForm;
import org.gatein.web.security.impersonation.ImpersonatedIdentity;
import org.gatein.web.security.impersonation.ImpersonationUtils;

Expand Down Expand Up @@ -120,6 +121,7 @@ public UIListUsers() throws Exception {
if(showDisableUserFilterCheckbox) {
UIFormSelectBox selectBox = new UIFormSelectBox("UIListUsers-" + USER_STATUS_FILTER, null, USER_STATUS_OPTIONS);
selectBox.setValue(UserStatus.ENABLED.name());
selectBox.setLabel("status");
selectBox.setId("UIListUsers-" + USER_STATUS_FILTER);
inputSet.addChild(selectBox);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ UIListUsers.msg.insufficient-permission-to-impersonate-user=Insufficient permiss
UIListUsers.msg.already-impersonated=You are already impersonating another user. Please exit the present impersonation to be able to impersonate somebody else.
UIListUsers.action.title.disableUser=Disable user
UIListUsers.action.title.enableUser=Enable user
UISearchForm.label.status=Status:

UIListMembershipType.deleteMemberShip=Are you sure you want to delete this membership?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ UIListUsers.msg.DeleteSuperUser={0} est un utilisateur syst\u00e8me, suppression
UIListUsers.deleteUser=Confirmez-vous la suppression de cet utilisateur : {0} ?
UIListUsers.action.title.disableUser=Désactiver l’utilisateur
UIListUsers.action.title.enableUser=Activer l’utilisateur
UISearchForm.label.status=Statut:

UIListMembershipType.deleteMemberShip=Confirmez-vous la suppression de ce r\u00f4le ?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@
margin-right: 5px;
}

.UISearch .UISearchForm .QuickSet label {
float: left; /* orientation=lt */
float: right; /* orientation=rt */
margin: -9px 5px 0;
color: #333;
}

.UISearch .UISearchForm .QuickSet input {
float: left; /* orientation=lt */
float: right; /* orientation=rt */
Expand Down Expand Up @@ -135,6 +142,13 @@
width: 120px;
}

.UIFormTabPane .UISearch .UISearchForm .QuickSet label {
float: left; /* orientation=lt */
float: right; /* orientation=rt */
margin: -9px 5px 0;
color: #333;
}

.UIFormTabPane .UISearch .UISearchForm .QuickSet input {
float: left;
margin: 3px 5px 0px 0px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@
<%
QuickSearchInputSet = uiform.getQuickSearchInputSet();
for(field in QuickSearchInputSet.getChildren()) {
uiform.renderField(field)
def label = uiform.getLabel(field);
if(label != null && label != "") {
%>
<label for="<%=field.getId()%>"><%=label%></label>
<%
}
uiform.renderField(field)
}
%>
<a class="SimpleSearchIcon" href="javascript:void(0);" onclick="$quickSearchlink" title="<%= _ctx.appRes("UISearch.label.QuickSearch") %>">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,19 @@ public void setOptions(List<SelectItemOption<String>> options) {
uiSelect.setOptions(options);
}

public String getLabel(UIFormInput input) {
String label = input.getLabel();
if(label == null) {
return null;
} else {
try {
return getLabel(label);
} catch (Exception ex) {
return label;
}
}
}

public UIFormInputSet getQuickSearchInputSet() {
return (UIFormInputSet) getChild(0);
}
Expand Down