Skip to content

Commit

Permalink
better icons
Browse files Browse the repository at this point in the history
  • Loading branch information
car031 committed Jan 15, 2025
1 parent a44e876 commit 5a0f2f6
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ public LDAPServerDetailsPanel(LDAPServersPanel listing, GUILDAPServer server) {
password.setWidth(300);

// Default groups

defaultGroupsItem = ItemFactory.newMultiComboBoxItem("defaultGroups", "defaultassignedgroups", new GroupsDS(),
server.getDefaultGroups().stream().map(g -> g.getId()).collect(Collectors.toList())
.toArray(new Long[0]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class DownloadFormItemIcon extends FormItemIcon {
*/
public DownloadFormItemIcon(String url) {
setPrompt(I18N.message("download"));
setSrc("[SKIN]/page_white_put.png");
setSrc("[SKIN]/download.svg");
setWidth(16);
setHeight(16);
addFormItemClickHandler(event -> Util.download(url));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import java.io.Serializable;

import com.logicaldoc.gui.common.client.beans.GUIUser;

/**
* A bean to store the SAML settings
*
Expand Down Expand Up @@ -43,11 +45,15 @@ public class GUISamlSettings implements Serializable {
private boolean keepLocalMemberships = true;

private boolean singleLogOut = false;

private boolean logoutRequestSigned = false;

private boolean logoutResponseSigned = false;

private int userType = GUIUser.TYPE_DEFAULT;

private String validation;

public boolean isSingleLogOut() {
return singleLogOut;
}
Expand Down Expand Up @@ -191,4 +197,20 @@ public boolean isLogoutResponseSigned() {
public void setLogoutResponseSigned(boolean logoutResponseSigned) {
this.logoutResponseSigned = logoutResponseSigned;
}

public int getUserType() {
return userType;
}

public void setUserType(int userType) {
this.userType = userType;
}

public String getValidation() {
return validation;
}

public void setValidation(String validation) {
this.validation = validation;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,16 @@ private void initGUI(GUISamlSettings settings) {
login.setWrapTitle(false);
login.setWrap(false);

SelectItem userType = ItemFactory.newUserTypeSelector("usertype", settings.getUserType());
userType.setEndRow(true);

TextAreaItem validation = ItemFactory.newTextAreaItemForAutomation("validation", settings.getValidation(), null,
false);
validation.setHeight(150);
validation.setWidth(400);
validation.setWrapTitle(false);
validation.setColSpan(2);

DynamicForm generalForm = new DynamicForm();
generalForm.setValuesManager(vm);
generalForm.setTitleOrientation(TitleOrientation.TOP);
Expand All @@ -238,7 +248,8 @@ private void initGUI(GUISamlSettings settings) {
attributeMappingsForm.setAlign(Alignment.LEFT);
attributeMappingsForm.setHeight(1);
attributeMappingsForm.setWidth(1);
attributeMappingsForm.setFields(username, firstName, lastName, email, groups, keepMembership);
attributeMappingsForm.setFields(username, firstName, lastName, email, groups, keepMembership, userType,
validation);

HLayout forms = new HLayout();
forms.setMembersMargin(10);
Expand Down Expand Up @@ -283,6 +294,8 @@ private IButton prepareSaveButton(ValuesManager form) {
settings.setCertificate(form.getValueAsString(SP_CERTIFICATE));
settings.setPrivateKey(form.getValueAsString(SP_PRIVATEKEY));
settings.setIdpMetadata(form.getValueAsString(IDP_METADATA));
settings.setUserType(Integer.parseInt(form.getValueAsString("usertype")));
settings.setValidation(form.getValueAsString("validation"));

SamlService.Instance.get().saveSettings(settings, new DefaultAsyncCallback<>() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class UploadFormItemIcon extends FormItemIcon {
*/
public UploadFormItemIcon(String title) {
setPrompt(I18N.message("upload"));
setSrc("[SKIN]/page_white_get.png");
setSrc("[SKIN]/upload.svg");
setWidth(16);
setHeight(16);
addFormItemClickHandler(event -> new SamlUploader(title, event.getItem()).show());
Expand Down

0 comments on commit 5a0f2f6

Please sign in to comment.