-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kateryna Honchar
committed
Apr 20, 2022
1 parent
0a6be19
commit e3962c7
Showing
4 changed files
with
187 additions
and
1 deletion.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
...in-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/search/SaveSearchPanel.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!-- | ||
~ Copyright (c) 2022 Evolveum | ||
~ | ||
~ This work is dual-licensed under the Apache License 2.0 | ||
~ and European Union Public License. See LICENSE file for details. | ||
--> | ||
<html xmlns:wicket="http://wicket.apache.org"> | ||
<head/> | ||
<body> | ||
<wicket:panel> | ||
<div> | ||
<div class="pull-left"> | ||
<label> | ||
<wicket:message key="SaveSearchPanel.enterSearchNameLabel"/> | ||
</label> | ||
</div> | ||
<input type="text" class="pull-right form-control input-sm" wicket:id="searchName"/> | ||
</div> | ||
<div wicket:id="buttonsPanel" class="box-footer pull-right"> | ||
<a wicket:id="saveButton" class="btn btn-group btn-sm btn-default"></a> | ||
<a wicket:id="cancelButton" class="btn btn-group btn-sm btn-default"></a> | ||
</div> | ||
</wicket:panel> | ||
</body> | ||
</html> |
100 changes: 100 additions & 0 deletions
100
...in-gui/src/main/java/com/evolveum/midpoint/gui/impl/component/search/SaveSearchPanel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
/* | ||
* Copyright (c) 2022 Evolveum and contributors | ||
* | ||
* This work is dual-licensed under the Apache License 2.0 | ||
* and European Union Public License. See LICENSE file for details. | ||
*/ | ||
package com.evolveum.midpoint.gui.impl.component.search; | ||
|
||
import com.evolveum.midpoint.gui.api.component.BasePanel; | ||
import com.evolveum.midpoint.prism.Containerable; | ||
import com.evolveum.midpoint.web.component.AjaxButton; | ||
import com.evolveum.midpoint.web.component.dialog.Popupable; | ||
|
||
import com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour; | ||
import com.evolveum.midpoint.web.page.admin.certification.dto.CertDefinitionDto; | ||
|
||
import org.apache.wicket.Component; | ||
import org.apache.wicket.ajax.AjaxRequestTarget; | ||
import org.apache.wicket.markup.html.WebMarkupContainer; | ||
import org.apache.wicket.markup.html.form.TextField; | ||
import org.apache.wicket.model.IModel; | ||
import org.apache.wicket.model.PropertyModel; | ||
import org.apache.wicket.model.StringResourceModel; | ||
|
||
public class SaveSearchPanel<C extends Containerable> extends BasePanel<Search<C>> implements Popupable { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
private static final String ID_SEARCH_NAME = "searchName"; | ||
private static final String ID_BUTTONS_PANEL = "buttonsPanel"; | ||
private static final String ID_SAVE_BUTTON = "saveButton"; | ||
private static final String ID_CANCEL_BUTTON = "cancelButton"; | ||
|
||
public SaveSearchPanel(String id, IModel<Search<C>> searchModel) { | ||
super(id, searchModel); | ||
} | ||
|
||
@Override | ||
protected void onInitialize() { | ||
super.onInitialize(); | ||
initLayout(); | ||
} | ||
|
||
private void initLayout() { | ||
TextField<String> nameField = new TextField(ID_SEARCH_NAME); | ||
nameField.setOutputMarkupId(true); | ||
add(nameField); | ||
|
||
WebMarkupContainer buttonsPanel = new WebMarkupContainer(ID_BUTTONS_PANEL); | ||
buttonsPanel.setOutputMarkupId(true); | ||
add(buttonsPanel); | ||
|
||
AjaxButton saveButton = new AjaxButton(ID_SAVE_BUTTON, createStringResource("PageBase.button.save")) { | ||
@Override | ||
public void onClick(AjaxRequestTarget ajaxRequestTarget) { | ||
|
||
} | ||
}; | ||
buttonsPanel.add(saveButton); | ||
|
||
AjaxButton cancelButton = new AjaxButton(ID_CANCEL_BUTTON, createStringResource("Button.cancel")) { | ||
@Override | ||
public void onClick(AjaxRequestTarget ajaxRequestTarget) { | ||
|
||
} | ||
}; | ||
buttonsPanel.add(cancelButton); | ||
} | ||
|
||
@Override | ||
public int getWidth() { | ||
return 500; | ||
} | ||
|
||
@Override | ||
public int getHeight() { | ||
return 400; | ||
} | ||
|
||
@Override | ||
public String getWidthUnit(){ | ||
return "px"; | ||
} | ||
|
||
@Override | ||
public String getHeightUnit(){ | ||
return "px"; | ||
} | ||
|
||
@Override | ||
public Component getComponent() { | ||
return this; | ||
} | ||
|
||
@Override | ||
public StringResourceModel getTitle() { | ||
return getPageBase().createStringResource("SaveSearchPanel.saveSearch"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters