-
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.
MID-9661: adding check option for removing data on confirm popup of s…
…hadow removing
- Loading branch information
Showing
4 changed files
with
111 additions
and
10 deletions.
There are no files selected for viewing
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
23 changes: 23 additions & 0 deletions
23
...c/main/java/com/evolveum/midpoint/web/component/dialog/DeleteShadowConfirmationPanel.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,23 @@ | ||
<!DOCTYPE html> | ||
<!-- | ||
~ Copyright (c) 2010-2020 Evolveum | ||
~ | ||
~ This work is dual-licensed under the Apache License 2.0 | ||
~ and European Union Public License. See LICENSE file for details. | ||
--> | ||
|
||
<wicket:panel xmlns:wicket="http://wicket.apache.org"> | ||
<div class="d-flex flex-column"> | ||
<p class="text-center" wicket:id="confirmText"/> | ||
<div class="col-12"> | ||
<div class="card p-4 mb-2" wicket:id="deleteResourceData"/> | ||
</div> | ||
</div> | ||
|
||
<wicket:fragment wicket:id="buttons"> | ||
<div class="d-flex flex-wrap gap-2 w-100"> | ||
<a class="btn btn-primary" wicket:id="yes"/> | ||
<a class="btn btn-default" wicket:id="no"/> | ||
</div> | ||
</wicket:fragment> | ||
</wicket:panel> |
54 changes: 54 additions & 0 deletions
54
...c/main/java/com/evolveum/midpoint/web/component/dialog/DeleteShadowConfirmationPanel.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,54 @@ | ||
/* | ||
* Copyright (c) 2010-2021 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.web.component.dialog; | ||
|
||
import com.evolveum.midpoint.gui.api.component.form.ToggleCheckBoxPanel; | ||
import com.evolveum.midpoint.gui.api.page.PageAdminLTE; | ||
import com.evolveum.midpoint.gui.api.page.PageBase; | ||
|
||
import org.apache.wicket.model.IModel; | ||
import org.apache.wicket.model.Model; | ||
import org.apache.wicket.model.StringResourceModel; | ||
|
||
public class DeleteShadowConfirmationPanel extends ConfirmationPanel { | ||
|
||
public DeleteShadowConfirmationPanel(String id) { | ||
super(id); | ||
} | ||
|
||
public DeleteShadowConfirmationPanel(String id, IModel<String> message) { | ||
super(id, message); | ||
} | ||
|
||
private static final String ID_DELETE_RESOURCE_DATA = "deleteResourceData"; | ||
|
||
private IModel<Boolean> deleteResourceData = Model.of(false); | ||
@Override | ||
public StringResourceModel getTitle() { | ||
return ((PageBase)getPage()).createStringResource("AssignmentTablePanel.modal.title.confirmDeletion"); | ||
} | ||
|
||
@Override | ||
protected void onInitialize() { | ||
super.onInitialize(); | ||
iniLayout(); | ||
} | ||
|
||
private void iniLayout() { | ||
ToggleCheckBoxPanel simulationPanel = new ToggleCheckBoxPanel(ID_DELETE_RESOURCE_DATA, | ||
deleteResourceData, | ||
createStringResource("DeleteShadowConfirmationPanel.deleteResourceData.label"), | ||
createStringResource("DeleteShadowConfirmationPanel.deleteResourceData.tooltip")); | ||
simulationPanel.setOutputMarkupId(true); | ||
add(simulationPanel); | ||
} | ||
|
||
protected final boolean isDeletedResourceData(){ | ||
return deleteResourceData.getObject(); | ||
} | ||
} |
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